Plot scaling #37
-
Hi Blake, your library looks very impressive, based on the demo. I am still trying to take a good look at it, but unfortunately, I am not very bright so I have been struggling with many basic things and just can't get the things going. So, I have few questions:
Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hi PB! So, rather than hard-coded sizes, the library takes more of a "scale and proportions" approach to sizing.
Canvas does have a separate "SetCanvasMinSize()" API that forces it to never go smaller than a certain size (otherwise the scrollbars go into effect). If the aforementioned suggested don't work, would a new Somewhat related, you can specify the proportions of things on a canvas. For example, you can have a histogram taking up a third of the canvas's width and a line plot next to it taking up two-thirds of the canvas's width. So this proportion method was the approach I went with rather than hard-coded sizes.
Axis labels font sizes are a little bit different from other text. The font size of them is a suggestion, as I sometimes need to scale them down a little bit to make them fit. That way they don't overlap each other (at least not too extremely). |
Beta Was this translation helpful? Give feedback.
-
So when I use this library to print to PDF, it is the same as ggplot2 when you use it with knitr to save to PDF. Same for when you save to PNG or other raster formats. It's just in the demo where you can change the window size that the graph then rescales things to fit the new size. I goal of mine has been to replace my current system of ggplot2/knitr reporting that I do because it doesn't give me the flexibility and unusual graphs that I need. It's been going nicely so far. |
Beta Was this translation helpful? Give feedback.
Hi PB!
So, rather than hard-coded sizes, the library takes more of a "scale and proportions" approach to sizing.
Canvas
also derives fromwxScrolled
, so the baseSetMaxSize()
andSetMinSize()
fromwxWindow
might do the trick (maybe depending on which type of container it is in).Canvas does have a separate "SetCanvasMinSize()" API that forces it to never go smaller than a certain size (otherwise the scrollbars go into effect). If the aforementioned suggested don't work, would a new
Set…