From: Andrew Ross <email@example.com>
To: phil rosenberg <firstname.lastname@example.org>
Cc: "email@example.com" <firstname.lastname@example.org>
Sent: Wednesday, 14 November 2012, 10:11
Subject: Re: [Plplot-devel] poor vectors when using wxwidgets
Thanks for the patch. Before applying I decided to try the same thing
on other drivers.
xwin - behaves the same as wxwidgets, i.e. it rescales the plot to fit
the page and distorts vectors (also text too so this is not a sensible
thing to do with xwin)
qtwidget - maintains the aspect ratio of the plot and scales it to fit
in the window
xcairo - makes no attempt to rescale the plot, so it may or may not
still fit in the window if the window size is changed.
All this behaviour is rather inconsistent. It would be nice if the
main interactive drivers behaved in a similar way. What should that
On Tue, Nov 13, 2012 at 05:04:10PM -0800, phil
> It turns out I've managed to solve my own problem. The wxWidgets driver was calling plP_setphy with constant values irrespective of the actual width and height of the window. I've replaced the constants with dev->width and dev->height which were assigned from pls->xlength and pls->ylength (which are int turn set by either a user or default call to plspage). I could see an argument for using higher resolution for AGG which has subpixel accuracy, but at least with this patch the distortions have been removed.
> This fixes the arrows and axes distances.
> Patch attached - tested on all three wxwidget backends.
> From: phil rosenberg <email@example.com
> To: "firstname.lastname@example.org
> Sent: Tuesday, 13 November 2012, 23:20
> Subject: poor vectors when using wxwidgets
> I've just been looking at using the plvect function to add vectors to a plot. Unfortunately they are not coming out well. Attached is a simple example with [1,1] vectors plotted at every integer from 0-9 in x and y. You can see that the arrow heads are distorted. I've traced this through the code and found that it's because the? plot is scaled independantly in x and y in the wxWidgets driver (in this case in wxPLDevGC::DrawPolyline() ). This scaling AFTER the rotation of the arrow causes distortion.
> I'm not
fully familiar with the plplot transformations from world to device coordinates, but I thought that this should be performed by plP_wcpcx()? Does anyone have any idea what could be going wrong here so I'm not debugging from scratch? Am I doing something wrong during initialisation?
> By the way, I thik this is related to another problem that I've experienced (but hadn't gotten round to reporting) where my y axis title moves further and further away from the y axis as I make my plot window wider.
> Any help much appreciated.
> Monitor your physical, virtual and cloud infrastructure from a single
> web console. Get in-depth insight into apps, servers, databases, vmware,
> SAP, cloud infrastructure, etc. Download 30-day Free Trial.
> Pricing starts from $795 for 25 servers or
> Plplot-devel mailing list