23 Sep 07:17
Patch for scatter plot legend enhancement
From: Erik Tollerud <erik.tollerud@...>
Subject: Patch for scatter plot legend enhancement
Newsgroups: gmane.comp.python.matplotlib.devel
Date: 2008-09-23 05:20:16 GMT
Subject: Patch for scatter plot legend enhancement
Newsgroups: gmane.comp.python.matplotlib.devel
Date: 2008-09-23 05:20:16 GMT
Attached is a diff against revision 6115 that contains a patch to improve the behavior of the legend function when showing legends for Collections (e.g. pyplot.scatter plots). The implemented behavior shows three sample scatter points, adapting the properties and showing three different colors or sizes in the even that either vary across the points. However, this patch is not entirely correct - I've attached a testing script and an example of the output - as you can see, with a number of scatter plots, the alignment between the scatter symbols and the text is off in the legend. I suspect this has to do with the get_window_extent(self,render) function I had to add to the Collection class... I'm really not entirely sure what that function is supposed to do (or what coordinates it's supposed to be transformed into). Can anyone provide some guidance as to what should be done to fix this vertical offset problem?
------------------------------------------------------------------------- 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 Matplotlib-devel@...(Continue reading)
RSS Feed