Andrea Gavana wrote: > Hi All, > > I have switched from matplotlib 0.91.2 to 0.98.1, and I have > noticed a couple of "strange" behaviours (I am not using PyLab, but > matplotlib embedded in wxPython): > > 1) If I use: > > ylims = self.myAxis.get_ylim() > > And then I add other lines to the plot, the value of ylims is > modified. It gets modified even if I use something like this: > > ylims = self.myAxis.get_ylim()[:] > > The only way of keeping the ylims list untouched by other plotting > commands I have to do this: > > ylims = copy.deepcopy(self.leftaxis.get_ylim()) > > Which is a bit of an overkill. See the attached Python script for an > example. This did not happen before in 0.91.2. > That is the intended behavior and is preferred in many cases. Most of the transformations and dimensions are now stored in numpy arrays that are mutable and updated in place. Since these are numpy arrays, you could also do:
ylims = self.leftaxis.get_ylim().copy() which is a bit less typing. Sorry about the change. I will note it in the API_CHANGES document. > 2) The dashed text positioning is wrong, you can see it by running > dashpointlabel.py in the > matplotlib_examples_0.98.1\examples\pylab_examples: the position of > the values should be at the other end of the dash, not over the > plotted point. > Yes, you're right. That is a bug. I will look into this. Cheers, Mike -- Michael Droettboom Science Software Branch Operations and Engineering Division Space Telescope Science Institute Operated by AURA for NASA ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users