Greeting everyone,
In pylab (matplotlib 0.98.3.001 on Mac OS X) I've discovered that
changing the xscale from linear to log removes the previously set xlim.
For example
In [1]: import pylab
In [2]: x = pylab.arange(100)
In [3]: y = pylab.sin(x)
In [4]: pylab.plot(x, y)
Out[4]: [<matplotlib.lines.Line2D object at 0x1a0981f0>]
In [5]: pylab.xlim(30, 50)
Out[5]: (30, 50)
In [6]: print pylab.xlim()
(30.0, 50.0)
In [7]: pylab.xscale('log')
In [8]: print pylab.xlim()
(1.0, 100.0)
There are easy workarounds, such as saving the axes before switching
to log and restoring them after, but is this expected behavior?
Thanks,
Keoki
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Matplotlib-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-users