Hi Mark: (I also have an important note for Hazen at the end.)
On 2009-07-15 10:48+0200 Mark de Wever wrote: > Alan W. Irwin wrote: >> On 2009-07-14 15:01+0200 Mark de Wever wrote: >> >>> Hi, >>> >>> The calculation of the aspect ratio doesn't take the rotation angle of the >>> plot into account. This patch solves the aspect ratio for 90 and 270 >>> degrees. >>> Using other rotation angles still give odd results, should I file a bug >>> report for this issue? >> >> Could you be more specific by running one of our standard examples and >> giving the exact command-line options where you are seeing the problem? It >> is possible you are seeing a rotation bug for a specific device rather than >> a core issue. I have just run our first standard example using -dev xwin >> with -ori 0, -ori 1, -ori 2, and -ori 3, and the default 4:3 aspect ratio >> is >> preserved in the results. Historically, I have also run this test on other >> devices with good results as well. However, I may have missed one. > > I just tested with the xwin device, with the following command: > ./x01 -dev xwin -ori 3 -geometry 500x800 > This is what my patch is supposed to fix. That does look odd, but all it is doing is rotating (and shrinking to fit into the window) the odd aspect ratio you have specified for ./x01 -dev xwin -geometry 500x800 In other words, the -ori option preserves the aspect ratio you get with -ori 0 (or no -ori option at all). So this is designed behaviour and not a bug. I suspect you want the aspect ratio of the rotated plot adjusted to fit into the window. In that case, use the -freeaspect option. > > You mentioned the default aspect ratio so I started to play a little bit with > the aspect ratio and with the following command the plot also looks fine: > ./x01 -dev xwin -ori 3 -geometry 500x800 -a 2 If you specify the aspect ratio, I just double-checked that is what is plotted at all -ori values (rather than the default aspect ratio you get with -ori 0). I hope this explanation clears everything up for you. > I [...] also tested with the > xcairo driver and it seems that when plotting rotated the text is no longer > drawn. Good spotting! That is definitely a bug. The rest of this is a note for Hazen who is our cairo expert: Hazen, this cairo bug has to do with clipping of the subpage limits at the positions of the _original_ subpages rather than the rotated ones. To convince yourself of that try the series ./x01 -dev xcairo -ori 0.0 ./x01 -dev xcairo -ori 0.05 ./x01 -dev xcairo -ori 0.1 ./x01 -dev xcairo -ori 0.15 ./x01 -dev xcairo -ori 0.2 ... ./x01 -dev xcairo -ori 0.5 (which also nicely demonstrates the long-standing parallelogram bug in the PLplot core library, but that is beside the point here). You will see that in all series cases, the only text output is that which is still in the original subpage position. Of course, by the time you extend the series to -ori 1, -ori 2, and -ori 3, none of the rotated text is in its original (unrotated) sub_page window so all of the text is completely clipped. To further confirm the issue is a text clipping one, the problem disappears if you turn off text clipping completely with -drvopt text_clipping=0 which is a temporary workaround for the problem if you don't mind unclipped text. To fully deal with this cairo issue, the proper thing to do is to implement rotated sub-page boundary clipping limits for text. I hope that would be fairly trivial for you? Alan __________________________ Alan W. Irwin Astronomical research affiliation with Department of Physics and Astronomy, University of Victoria (astrowww.phys.uvic.ca). Programming affiliations with the FreeEOS equation-of-state implementation for stellar interiors (freeeos.sf.net); PLplot scientific plotting software package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of Linux Links project (loll.sf.net); and the Linux Brochure Project (lbproject.sf.net). __________________________ Linux-powered Science __________________________ ------------------------------------------------------------------------------ Enter the BlackBerry Developer Challenge This is your chance to win up to $100,000 in prizes! For a limited time, vendors submitting new applications to BlackBerry App World(TM) will have the opportunity to enter the BlackBerry Developer Challenge. See full prize details at: http://p.sf.net/sfu/Challenge _______________________________________________ Plplot-devel mailing list Plplot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/plplot-devel