bug report, 'equal' aspect ratio

The following script demonstrates a problem in autoscaling. Not all the data
ends up in the window, when using set_aspect( aspect='equal',
adjustable='datalim' ). This is using the cvs version as of a few weeks ago.

Note: This uses a closed polygon as data. The type of shape which triggers the
bug is an asymmetical one (not symmetrical in x or y axes that is). Data which
is symmetrical in x and y axes does not trigger the bug.

If you have questions, please copy me on reply, as I get the digest.

import pylab

fig = pylab.figure( figsize = [ 8, 5 ] )
axes = fig.add_axes( [ 0.1, 0.1, 0.8, 0.8 ] )
axes.set_aspect( aspect='equal', adjustable='datalim' )

xs = [5.4, -6.3, -9.3, 0.5, 9.6, 5.4 ]
ys = [8.4, 7.7, -3.6, -9.9, -2.5, 8.4 ]

axes.plot( xs, ys )

pylab.savefig( 'figure.png' )

I have confirmed the problem with current svn; I will work on it.

Eric

MICHAEL P MOSSEY wrote:

···

The following script demonstrates a problem in autoscaling. Not all the data
ends up in the window, when using set_aspect( aspect='equal',
adjustable='datalim' ). This is using the cvs version as of a few weeks ago.

Note: This uses a closed polygon as data. The type of shape which triggers the
bug is an asymmetical one (not symmetrical in x or y axes that is). Data which
is symmetrical in x and y axes does not trigger the bug.

If you have questions, please copy me on reply, as I get the digest.

import pylab

fig = pylab.figure( figsize = [ 8, 5 ] )
axes = fig.add_axes( [ 0.1, 0.1, 0.8, 0.8 ] )
axes.set_aspect( aspect='equal', adjustable='datalim' )

xs = [5.4, -6.3, -9.3, 0.5, 9.6, 5.4 ]
ys = [8.4, 7.7, -3.6, -9.9, -2.5, 8.4 ]

axes.plot( xs, ys )

pylab.savefig( 'figure.png' )

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Michael,

I think this is fixed as part of a large set of changes that I just committed to svn.

Eric

MICHAEL P MOSSEY wrote:

···

The following script demonstrates a problem in autoscaling. Not all the data
ends up in the window, when using set_aspect( aspect='equal',
adjustable='datalim' ). This is using the cvs version as of a few weeks ago.

Note: This uses a closed polygon as data. The type of shape which triggers the
bug is an asymmetical one (not symmetrical in x or y axes that is). Data which
is symmetrical in x and y axes does not trigger the bug.

If you have questions, please copy me on reply, as I get the digest.

import pylab

fig = pylab.figure( figsize = [ 8, 5 ] )
axes = fig.add_axes( [ 0.1, 0.1, 0.8, 0.8 ] )
axes.set_aspect( aspect='equal', adjustable='datalim' )

xs = [5.4, -6.3, -9.3, 0.5, 9.6, 5.4 ]
ys = [8.4, 7.7, -3.6, -9.9, -2.5, 8.4 ]

axes.plot( xs, ys )

pylab.savefig( 'figure.png' )

-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel