[matplotlib-devel] A suggestion about legend defaults

2006-09-09 Thread Fernando Perez

Hi all,

I have a suggestion to make regarding the default results for legends when 
plots have both lines and markers.  Consider the following plot commands:


plot(range(10),marker='o',linestyle='-',markerfacecolor='r',label='data')
legend()

I've attached a small png of what I get on my system, with a very recent svn 
build.


This is a common (at least for me) way to plot data points with a line for 
visual aid connecting the dots.


What I think could be improved in the default behavior is the legend.  I'm 
sure there's a way to get the result even today, I'm just advocating for an 
improved out-of-the-box output.  Currently, the code puts so many markers in 
the legend that the line is not visible.  This isn't very pretty, nor very 
useful.  In contrast, I think the gnuplot default behavior is a lot better, 
see this page for a simple example (no, I don't think that graph looks better 
than mpl, I just think the way /legend/ labels are created is clearer):


http://www.sbml.org/software/libsbml/libsbml-vs-xerces-dom-memusage.png

What I think would be a better default legend behavior than the current one 
would be either (ascii art, with 0 denoting a marker and - a line):


  (a)0---0 OR (b)   --0--

meaning two markers bracketing a bit of the line, or (like gnuplot) two line 
segments bracketing a single marker.  The advantage of (a) IMO is that with 
dashed lines it is easier to read than (b), since there's a longer continuous 
section of line.


Just a suggestion...

f

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] A suggestion about legend defaults

2006-09-09 Thread John Hunter
> "Fernando" == Fernando Perez <[EMAIL PROTECTED]> writes:

Fernando> What I think could be improved in the default behavior
Fernando> is the legend.  I'm sure there's a way to get the result
Fernando> even today

Indeed

  legend(numpoints=2)

or set your rc setting

  legend.numpoints = 2

I'll change the default rc setting to two points if noone objects.

JDH

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] A suggestion about legend defaults

2006-09-09 Thread Fernando Perez
On 9/9/06, John Hunter <[EMAIL PROTECTED]> wrote:
> > "Fernando" == Fernando Perez <[EMAIL PROTECTED]> writes:
>
> Fernando> What I think could be improved in the default behavior
> Fernando> is the legend.  I'm sure there's a way to get the result
> Fernando> even today
>
> Indeed
>
>   legend(numpoints=2)
>
> or set your rc setting
>
>   legend.numpoints = 2

Great, thanks!

> I'll change the default rc setting to two points if noone objects.

+1 from me.

Cheers,

f

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel


Re: [matplotlib-devel] A suggestion about legend defaults

2006-09-09 Thread Gael Varoquaux
On Sat, Sep 09, 2006 at 10:40:47AM -0600, Fernando Perez wrote:
> On 9/9/06, John Hunter <[EMAIL PROTECTED]> wrote:
> > > "Fernando" == Fernando Perez <[EMAIL PROTECTED]> writes:

> > Fernando> What I think could be improved in the default behavior
> > Fernando> is the legend.  I'm sure there's a way to get the result
> > Fernando> even today

> > Indeed

> >   legend(numpoints=2)

> > or set your rc setting

> >   legend.numpoints = 2

> Great, thanks!

> > I'll change the default rc setting to two points if noone objects.

> +1 from me.

+1 from me to.

Gaƫl


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
___
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel