Clean up and fix issues in the StatisticalPlots.pl macro.#37
Conversation
The POD is rather heftily rewritten, and there were a lot of issues in the code that were fixed. I don't even remember all of them, since I did this several months ago. One issue was with the `set_plot_option_aliases` method. It defined the aliases with a hash with duplicate keys. That means only the last one of the duplicates actually worked. So the definition needed to be inverted to function right. Another option was with incorrectly names svg colors. Also, switch to using the new plots `padding` option instead of using a multiplier. The `padding` options scales better. Don't blindly add the `fill => 'self'` option to everything. Just add it to things that can be possible filled. Also, there was quite a bit of general code clean up.
|
Looks good. About the histogram, were you mentioning trying to programmatically find the max/min in way for it to line up better than just the min/max of the dataset? |
|
Yes. That and the maximum value of the range. In general for a single vertical histogram the vertical axis should be on the leftmost boundary of the image and be a little to the left of the leftmost box, and the rightmost edge of the image should be a little to the right of the rightmost box (as far to the right as the left is). Also, the maximum of the vertical range should be a little more than the top of the highest bar. Of course similar constraints for a horizontal histogram. Things are complicated if multiple histograms are in the same image though. |
|
I was also thinking that there should be an option that disables the setting of these ranges optimally for a single histogram. Of course, the point of that would be for multiple histograms. |
The POD is rather heftily rewritten, and there were a lot of issues in the code that were fixed. I don't even remember all of them, since I did this several months ago.
One issue was with the
set_plot_option_aliasesmethod. It defined the aliases with a hash with duplicate keys. That means only the last one of the duplicates actually worked. So the definition needed to be inverted to function right.Another option was with incorrectly names svg colors.
Also, switch to using the new plots
paddingoption instead of using a multiplier. Thepaddingoptions scales better.Don't blindly add the
fill => 'self'option to everything. Just add it to things that can be possible filled.Also, there was quite a bit of general code clean up.