octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: dataaspectratio & plotboxaspectratio


From: Ben Abbott
Subject: Re: dataaspectratio & plotboxaspectratio
Date: Fri, 29 Jan 2010 22:12:38 -0500

On Jan 26, 2010, at 11:27 AM, Ben Abbott wrote:

> Currently the gnuplot backend ignores (I think) the plotboxaspectratio, and 
> treats the dataaspectratio as Matlab treats plotboxaspectratio.
> 
> For 2D plots, with axes units=centimeter / inches / pixels / points the 
> correct interpretation would be ...
> 
>       plotboxaspectratio = the aspect ratio of the rendered plot box.
> 
>       dataaspectratio = [diff(xlim), diff(ylim), diff(xlim)] / min 
> ([diff(xlim), diff(ylim), diff(xlim)])
> 
> Related to these axes properties are two functions that are not yet included 
> in Octave, pbaspect(), and daspect(). I hope to add these today or tomorrow.
> 
> I'd also like to correct how Octave treats the dataaspectratio and 
> plotboxaspectratio.
> 
> My thought was to go through m-files in scripts/plot and manually do a search 
> on dataaspectratio and replace it with plotboxaspectratio (I'll handle the 
> "mode" properties as well).
> 
> As I expect changing this behavior will result in quite a few emails, I 
> thought it prudent to give a heads-ups and ask if there are any concerns, 
> advice, and/or objections?
> 
> I'm not familiar with how the FLTK backend treats these properties, but 
> expect it is preferred to correct this problem now as opposed to later.
> 
> Ben

I've pushed the changeset which replaces the prior references to 
dataaspectratio / dataaspectratiomode with  plotboxaspectratio / 
plotboxaspectratiomode.

        http://hg.savannah.gnu.org/hgweb/octave/rev/2884758e265b

This is done to improve compatibility with Matlab. Presently, "demo pbaspect" 
should produce the proper result, but "demo daspect" will not.

Ben





reply via email to

[Prev in Thread] Current Thread [Next in Thread]