SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Neal B. <ndb...@gm...> - 2015年06月10日 18:36:40
Is there some way I can add a short text to the legend box? Rather than 
having
label='foo=0'
label='foo=1'
...
I'd like to just put 'foo' say at the top of the legend box. Any thoughts?
From: Sterling S. <sm...@fu...> - 2015年06月11日 05:25:57
Neal,
legend[1] has the title keyword
legend(loc=‘best’,title=‘foo’)
-Sterling
[1] http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.legend
On Jun 10, 2015, at 11:36AM, Neal Becker <ndb...@gm...> wrote:
> Is there some way I can add a short text to the legend box? Rather than 
> having
> label='foo=0'
> label='foo=1'
> ...
> 
> I'd like to just put 'foo' say at the top of the legend box. Any thoughts?
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
From: Sterling S. <sm...@fu...> - 2015年06月11日 05:32:13
Neal,
If you also want to get rid of the lines, you could just color the texts of the legend labels using a VPacker in something like
http://stackoverflow.com/questions/17086847/box-around-text-in-matplotlib/17092777#17092777
-Sterling
On Jun 10, 2015, at 10:25PM, Sterling Smith <sm...@fu...> wrote:
> Neal,
> 
> legend[1] has the title keyword
> legend(loc=‘best’,title=‘foo’)
> 
> -Sterling
> 
> [1] http://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.legend
> On Jun 10, 2015, at 11:36AM, Neal Becker <ndb...@gm...> wrote:
> 
>> Is there some way I can add a short text to the legend box? Rather than 
>> having
>> label='foo=0'
>> label='foo=1'
>> ...
>> 
>> I'd like to just put 'foo' say at the top of the legend box. Any thoughts?
>> 
>> 
>> ------------------------------------------------------------------------------
>> _______________________________________________
>> Matplotlib-users mailing list
>> Mat...@li...
>> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
> 
> 
> ------------------------------------------------------------------------------
> _______________________________________________
> Matplotlib-users mailing list
> Mat...@li...
> https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /