From: Vineet J. <vi...@al...> - 2004-08-03 12:42:37
|
That's fine. I'll start using ax.viewLim.intervaly().get_bounds() # the y limits to get the y limits. In any case though, the order in which the plot functions are called should not change the value returned by self.axMiddle.get_ylim. I think that is a bug. VJ -----Original Message----- From: mat...@li... [mailto:mat...@li...]On Behalf Of John Hunter Sent: Monday, August 02, 2004 10:56 AM To: Vineet Jain Cc: matplotlib-users Subject: Re: [Matplotlib-users] Settling y-axis scaling >>>>> "Vineet" == Vineet Jain <vi...@al...> writes: Vineet> After making changes to has_data I get the following: Vineet> (0.0, 400.0) (0.0, 400.0) (0.0, 400.0) Vineet> which is not correct it should be: Vineet> (300.0, 400.0) (100.0, 400.0) (100.0, 400.0) I'm not sure this is incorrect. matplotlib distinguishes between the data limits and the view limits. The latter are automatically adjusted to include the data limits but may incorporate more. For example, the x data limits in [0.1, 10] may produce view limits [0,10]. If you need the view limits to always equal the data limits, you could provide a custom ticker, as described in http://matplotlib.sourceforge.net/matplotlib.ticker.html and illustrated in the example http://matplotlib.sourceforge.net/examples/custom_ticker1.py. You might want to verify that the data limits are correct by printing ax.dataLim.intervalx().get_bounds() # the x limits ax.dataLim.intervaly().get_bounds() # the y limits where ax is your Axes instance. You can compare these with ax.viewLim.intervalx().get_bounds() # the x limits ax.viewLim.intervaly().get_bounds() # the y limits JDH ------------------------------------------------------- This SF.Net email is sponsored by OSTG. Have you noticed the changes on Linux.com, ITManagersJournal and NewsForge in the past few weeks? Now, one more big change to announce. We are now OSTG- Open Source Technology Group. Come see the changes on the new OSTG site. www.ostg.com _______________________________________________ Matplotlib-users mailing list Mat...@li... https://lists.sourceforge.net/lists/listinfo/matplotlib-users |