Re: [matplotlib-devel] Patch for scatter plot legend enhancement
John Hunter wrote: > On Wed, Oct 8, 2008 at 10:27 PM, Erik Tollerud <[EMAIL PROTECTED]> wrote: >> Ah, that makes more sense Jae-Joon - thanks! > > Jae-Joon -- could you handle this patch submission? > > Thanks, > JDH Hi, I also had a look at this patch -- as that's a feature I was interested in, too. There are a few things that I think need to be changed; just want to share my thoughts: - the parameter numpoints should be used (it's ignored right now) - Some private variables are accessed and a new RegularPolycollection is created (does this work eg. with a StarPolygonCollection? I haven't checked, but I don't think so !). Instead of creating a new RegularPolyCollection it might be more useful to make a copy of the existing object... I was thinking about a update_from() method for the Collection class(es) similar to update_from() for lines. mm > - > This SF.Net email is sponsored by the Moblin Your Move Developer's challenge > Build the coolest Linux based applications with Moblin SDK & win great prizes > Grand prize is a trip for two to an Open Source event anywhere in the world > http://moblin-contest.org/redirect.php?banner_id=100&url=/ > ___ > Matplotlib-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
[matplotlib-devel] unexpected behaviour of get_xlim
Dear developers, the following example shows a somewhat unexpected behaviour of the get_xlim() method of an axis object: it returns a view to the internal data structure used to store the data limits. Because of this saving and restoring the data limits failed in this example (I am using matplotlib 0.98.3): from pylab import * plot([0,1], [0,1]) #create some plot ax = gca() #keep reference to axis #after some time, I want to change the plot content, but keep the data limits xlimits = ax.get_xlim() #save limits print xlimits ax.clear()#first clear axis, then plot([1,2], [1,2])#create new plot content ax.set_xlim(xlimits) #does _not_ restore old limits print xlimits #since saved xlimits also changed Now I know that I have to use xlimits = ax.get_xlim().copy() if I want to save the data limits. Is this really an intended behaviour? Wouldn't it be better if get_xlim() already returns a copy? Or could at least the documentation be updated to mention this pitfall? Gregor - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
Re: [matplotlib-devel] unexpected behaviour of get_xlim
On Fri, Oct 10, 2008 at 11:31 AM, Gregor Thalhammer <[EMAIL PROTECTED]> wrote: > Is this really an intended behaviour? Wouldn't it be better if > get_xlim() already returns a copy? Or could at least the documentation > be updated to mention this pitfall? I think it should return a copy -- if I don't hear any objections I'll change it. JDH - This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ ___ Matplotlib-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/matplotlib-devel
