From: John H. <jdh...@ac...> - 2004-08-02 16:20:07
|
>>>>> "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 |