[Matplotlib-users] Legend frame edgecolor and linewidth
Hello, there is a way to control the edgecolor and the linewidth of the frame drawn around the legend? I set the axes linewidth to 0.5 but the legend frame linewidth is set to 1.0 and it does not look nice. Also, most of the time I don't want the frame edge to be drawn at all. Always doing: l = plt.legend() l.get_frame().set_edgecolor('none') is boring. If the setting are not there, would a patch adding a setting to style the legend frame be considered? Additionally, would it make sense to default the legend frame linewidth to the axes linewidth? Cheers, Daniele -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Legend frame edgecolor and linewidth
Indeed, it looks like there isn't a very good way to control all of the properties of the frame portion of a legend. This could certainly use some improvements, partly in allowing a dictionary of property values to be passed in `plt.legend()` (there is already a dictionary of font properties), but also to have some rcParams that could be made available, too. Such improvements are always welcome! Cheers! Ben Root On Fri, Nov 13, 2015 at 7:57 AM, Daniele Nicolodi wrote: > Hello, > > there is a way to control the edgecolor and the linewidth of the frame > drawn around the legend? I set the axes linewidth to 0.5 but the legend > frame linewidth is set to 1.0 and it does not look nice. Also, most of > the time I don't want the frame edge to be drawn at all. > > Always doing: > > l = plt.legend() > l.get_frame().set_edgecolor('none') > > is boring. > > If the setting are not there, would a patch adding a setting to style > the legend frame be considered? Additionally, would it make sense to > default the legend frame linewidth to the axes linewidth? > > Cheers, > Daniele > > > -- > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
[Matplotlib-users] Generating animated PNG files with numpngw
Matplotlib users, I just put the package "numpngw" up on pypi: https://pypi.python.org/pypi/numpngw The development version is on github: https://github.com/WarrenWeckesser/numpngw The reason this might be of interest to maplotlib users is the class "numpngw.AnimatedPNGWriter". This class can be used as the "writer" argument of the "save" method of the Animation class. So if you've ever wanted to use matplotlib to create an animated PNG (and who hasn't?), now you can! If you go to the github page, scroll down to Example 8 to see an example of how to save an animation as an animated PNG. You'll need a browser that supports animated PNG to actually see the animation. Firefox does, Safari doesn't, and I haven't checked any others. If you use it and find problems or have suggestions for improvements, email me or create an issue on github. Warren -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Re: [Matplotlib-users] Generating animated PNG files with numpngw
I needed an apng viewer plug-in for Chrome https://chrome.google.com/webstore/detail/apng/ehkepjiconegkhpodgoaeamnpckdbblp?hl=en -Sterling On Nov 13, 2015, at 1:31PM, Warren Weckesser wrote: > Matplotlib users, > > I just put the package "numpngw" up on pypi: > https://pypi.python.org/pypi/numpngw > The development version is on github: > https://github.com/WarrenWeckesser/numpngw > > The reason this might be of interest to maplotlib users is the class > "numpngw.AnimatedPNGWriter". This class can be used as the "writer" argument > of the "save" method of the Animation class. So if you've ever wanted to use > matplotlib to create an animated PNG (and who hasn't?), now you can! > > If you go to the github page, scroll down to Example 8 to see an example of > how to save an animation as an animated PNG. You'll need a browser that > supports animated PNG to actually see the animation. Firefox does, Safari > doesn't, and I haven't checked any others. > > If you use it and find problems or have suggestions for improvements, email > me or create an issue on github. > > Warren > > -- > ___ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users -- ___ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users