legend: dash pattern length

I need a longer sample of the dash pattern in the legend.
Possible? (numpoints does not work.)

Thanks,
Alan Isaac

Did you try *handlelength*?

http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.legend

Regards,

-JJ

···

On Wed, Mar 10, 2010 at 4:50 PM, Alan G Isaac <aisaac@...310...> wrote:

I need a longer sample of the dash pattern in the legend.
Possible? (numpoints does not work.)

Thanks,
Alan Isaac

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

OK, now I know what "handlelength" means.

1. What are the units (and why not points)?
2. Can this be set on a legend object (after creation)?
(There does not appear to be a setter on the legend;
do I have to get the handles and set each?)

Thanks,
Alan

···

On 3/11/2010 1:44 PM, Jae-Joon Lee wrote:

Did you try*handlelength*?
http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.legend

1. What are the units (and why not points)?

Fraction of (legend) font size (in points). It was decided that it is
these dimensions are better to be scale with font size.
For example, handlelength=5 means 50 points when legend font size is 10 points.

2. Can this be set on a legend object (after creation)?
(There does not appear to be a setter on the legend;
do I have to get the handles and set each?)

Right now, public setter method is not supported for these attributes.
While this is possible it is a bit tricky. I need to double-check but
you need to change the dimension of not only the associated artist
(e.g., lines) but also its container (offsetbox).
The current design recommends you to create a new legend (by calling
legend again) if you want to change its attribute.
If this approach is not applicable, please describe your use case.

Regards,

-JJ

As of now, some (maybe most) of legend attributes are not exposed is
possible but a bit tricky to do

···

On Thu, Mar 11, 2010 at 8:32 PM, Alan G Isaac <aisaac@...310...> wrote:

10 points.

OK, I see the reasoning,
although I personally would still prefer points.

In any case, I see that this information was in
the documentation, but I failed to understand it.
The documentation reads:
"The dimensions of these values are given as a fraction of the fontsize."
I suggest instead
"These values are measure in font-size units.
E.g., a fontsize of 10 points and a handlelength=5
implies a handlelength of 50 points."

Thanks!
Alan Isaac

···

On Thu, Mar 11, 2010 at 8:32 PM, Alan G Isaac <aisaac@...310...> wrote:
> 1. What are the units (and why not points)?

On 3/11/2010 11:00 PM, Jae-Joon Lee wrote:

Fraction of (legend) font size (in points). It was decided that it is
these dimensions are better to be scale with font size.
For example, handlelength=5 means 50 points when legend font size is

Thanks. Applied in r8159.
Regards,

-JJ

···

On Fri, Mar 12, 2010 at 3:47 PM, Alan G Isaac <alan.isaac@...287...> wrote:

I suggest instead
"These values are measure in font-size units.
E.g., a fontsize of 10 points and a handlelength=5
implies a handlelength of 50 points."