<div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi Ben,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hmm, traitlets sound interesting, though I want one of the traits (i.e. the marker edge width) to differ.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Actually, it turns out that copying using copy does work. I'm not sure what I was doing wrong before, but now I'm getting what I wanted.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Regards,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Jon</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 16, 2015 at 10:37 AM, Benjamin Root <span dir="ltr"><<a href="mailto:ben.v.root@gmail.com" target="_blank">ben.v.root@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Traitlets might be the solution here. You set up your proxy artist to have properties that are linked to the properties of the plot object. When one is updated, the other gets updated as well. The automatic linking of plot objects to legend proxy artists is is one of the many benefits that would come about with the future inclusion of traitlets in matplotlib. However, I don't think you need to wait for us to get that aspect working. Since you are already creating proxy artists, I think it shouldn't be that much more effort to link their properties together with traitlets.<br><br></div><div>Unfortunately, the documentation is fairly sparse, and examples are minimal as well. I know there was some decent examples during the SciPy tutorials, but I can't seem to find it at the moment...<br><br></div>Ben Root<br><br></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Fri, Oct 16, 2015 at 10:10 AM, Slavin, Jonathan <span dir="ltr"><<a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Hi,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">I have a plot on which I want to plot many points as open circles. I also want to include a legend. The problem is that while a thin marker edge width works very nicely for the plot, it is difficult to see in the legend. My solution, which does work, is to define Line2D objects as proxy artists and keep all the attributes the same except the mew, which I increase. However, this seems error prone: if one changes attributes of the line, then one has to also make those same changes to the proxy artist line. I thought a better solution was to create the proxy artist as a duplicate (copy) of the line and then change the mew via line.set_mew(n). However, I haven't been able to figure out how to duplicate a Line2D object. I tried copy and deepcopy from the python builtin copy module, but those didn't work. Any help on this (including alternative ways of approaching the problem) would be appreciated.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Thanks,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif">Jon</div><span><font color="#888888"><div><br></div>-- <br><div><div dir="ltr"><div><div dir="ltr">________________________________________________________<br>Jonathan D. Slavin Harvard-Smithsonian CfA<br><a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a> 60 Garden Street, MS 83<br>phone: <a href="tel:%28617%29%20496-7981" value="+16174967981" target="_blank">(617) 496-7981</a> Cambridge, MA 02138-1516<br>cell: <a href="tel:%28781%29%20363-0035" value="+17813630035" target="_blank">(781) 363-0035</a> USA<br>________________________________________________________<br><br></div></div></div></div>
</font></span></div>
<br></div></div>_______________________________________________<br>
Matplotlib-users mailing list<br>
<a href="mailto:Matplotlib-users@python.org" target="_blank">Matplotlib-users@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/matplotlib-users" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/matplotlib-users</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr">________________________________________________________<br>Jonathan D. Slavin Harvard-Smithsonian CfA<br><a href="mailto:jslavin@cfa.harvard.edu" target="_blank">jslavin@cfa.harvard.edu</a> 60 Garden Street, MS 83<br>phone: (617) 496-7981 Cambridge, MA 02138-1516<br>cell: (781) 363-0035 USA<br>________________________________________________________<br><br></div></div></div></div>
</div>