Python matplotlib.axes.Axes.legend() Examples
The following are 16
code examples of matplotlib.axes.Axes.legend().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
matplotlib.axes.Axes
, or try the search function
.
Example #1
Source File: pyplot.py From Computable with MIT License | 5 votes |
def figlegend(handles, labels, loc, **kwargs): """ Place a legend in the figure. *labels* a sequence of strings *handles* a sequence of :class:`~matplotlib.lines.Line2D` or :class:`~matplotlib.patches.Patch` instances *loc* can be a string or an integer specifying the legend location A :class:`matplotlib.legend.Legend` instance is returned. Example:: figlegend( (line1, line2, line3), ('label1', 'label2', 'label3'), 'upper right' ) .. seealso:: :func:`~matplotlib.pyplot.legend` """ l = gcf().legend(handles, labels, loc, **kwargs) draw_if_interactive() return l ## Figure and Axes hybrid ##
Example #2
Source File: pyplot.py From Computable with MIT License | 5 votes |
def legend(*args, **kwargs): ret = gca().legend(*args, **kwargs) draw_if_interactive() return ret # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost
Example #3
Source File: pyplot.py From matplotlib-4-abaqus with MIT License | 5 votes |
def figlegend(handles, labels, loc, **kwargs): """ Place a legend in the figure. *labels* a sequence of strings *handles* a sequence of :class:`~matplotlib.lines.Line2D` or :class:`~matplotlib.patches.Patch` instances *loc* can be a string or an integer specifying the legend location A :class:`matplotlib.legend.Legend` instance is returned. Example:: figlegend( (line1, line2, line3), ('label1', 'label2', 'label3'), 'upper right' ) .. seealso:: :func:`~matplotlib.pyplot.legend` """ l = gcf().legend(handles, labels, loc, **kwargs) draw_if_interactive() return l ## Figure and Axes hybrid ##
Example #4
Source File: pyplot.py From matplotlib-4-abaqus with MIT License | 5 votes |
def legend(*args, **kwargs): ret = gca().legend(*args, **kwargs) draw_if_interactive() return ret # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost
Example #5
Source File: pyplot.py From neural-network-animation with MIT License | 5 votes |
def figlegend(handles, labels, loc, **kwargs): """ Place a legend in the figure. *labels* a sequence of strings *handles* a sequence of :class:`~matplotlib.lines.Line2D` or :class:`~matplotlib.patches.Patch` instances *loc* can be a string or an integer specifying the legend location A :class:`matplotlib.legend.Legend` instance is returned. Example:: figlegend( (line1, line2, line3), ('label1', 'label2', 'label3'), 'upper right' ) .. seealso:: :func:`~matplotlib.pyplot.legend` """ l = gcf().legend(handles, labels, loc, **kwargs) draw_if_interactive() return l ## Figure and Axes hybrid ##
Example #6
Source File: pyplot.py From neural-network-animation with MIT License | 5 votes |
def legend(*args, **kwargs): ret = gca().legend(*args, **kwargs) draw_if_interactive() return ret # This function was autogenerated by boilerplate.py. Do not edit as # changes will be lost
Example #7
Source File: pyplot.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def figlegend(*args, **kwargs): """ Place a legend in the figure. *labels* a sequence of strings *handles* a sequence of :class:`~matplotlib.lines.Line2D` or :class:`~matplotlib.patches.Patch` instances *loc* can be a string or an integer specifying the legend location A :class:`matplotlib.legend.Legend` instance is returned. Examples -------- To make a legend from existing artists on every axes:: figlegend() To make a legend for a list of lines and labels:: figlegend( (line1, line2, line3), ('label1', 'label2', 'label3'), 'upper right' ) .. seealso:: :func:`~matplotlib.pyplot.legend` """ return gcf().legend(*args, **kwargs) ## Axes ##
Example #8
Source File: pyplot.py From GraphicDesignPatternByPython with MIT License | 5 votes |
def legend(*args, **kwargs): return gca().legend(*args, **kwargs) # Autogenerated by boilerplate.py. Do not edit as changes will be lost.
Example #9
Source File: pyplot.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
def figlegend(*args, **kwargs): """ Place a legend in the figure. *labels* a sequence of strings *handles* a sequence of :class:`~matplotlib.lines.Line2D` or :class:`~matplotlib.patches.Patch` instances *loc* can be a string or an integer specifying the legend location A :class:`matplotlib.legend.Legend` instance is returned. Examples -------- To make a legend from existing artists on every axes:: figlegend() To make a legend for a list of lines and labels:: figlegend( (line1, line2, line3), ('label1', 'label2', 'label3'), 'upper right' ) .. seealso:: :func:`~matplotlib.pyplot.legend` """ return gcf().legend(*args, **kwargs) ## Axes ##
Example #10
Source File: pyplot.py From python3_ios with BSD 3-Clause "New" or "Revised" License | 5 votes |
def legend(*args, **kwargs): return gca().legend(*args, **kwargs) # Autogenerated by boilerplate.py. Do not edit as changes will be lost.
Example #11
Source File: pyplot.py From coffeegrindsize with MIT License | 5 votes |
def figlegend(*args, **kwargs): """ Place a legend in the figure. *labels* a sequence of strings *handles* a sequence of :class:`~matplotlib.lines.Line2D` or :class:`~matplotlib.patches.Patch` instances *loc* can be a string or an integer specifying the legend location A :class:`matplotlib.legend.Legend` instance is returned. Examples -------- To make a legend from existing artists on every axes:: figlegend() To make a legend for a list of lines and labels:: figlegend( (line1, line2, line3), ('label1', 'label2', 'label3'), 'upper right' ) .. seealso:: :func:`~matplotlib.pyplot.legend` """ return gcf().legend(*args, **kwargs) ## Axes ##
Example #12
Source File: pyplot.py From coffeegrindsize with MIT License | 5 votes |
def legend(*args, **kwargs): return gca().legend(*args, **kwargs) # Autogenerated by boilerplate.py. Do not edit as changes will be lost.
Example #13
Source File: pyplot.py From CogAlg with MIT License | 5 votes |
def figlegend(*args, **kwargs): return gcf().legend(*args, **kwargs)
Example #14
Source File: pyplot.py From CogAlg with MIT License | 5 votes |
def legend(*args, **kwargs): return gca().legend(*args, **kwargs) # Autogenerated by boilerplate.py. Do not edit as changes will be lost.
Example #15
Source File: pyplot.py From twitter-stock-recommendation with MIT License | 5 votes |
def figlegend(*args, **kwargs): """ Place a legend in the figure. *labels* a sequence of strings *handles* a sequence of :class:`~matplotlib.lines.Line2D` or :class:`~matplotlib.patches.Patch` instances *loc* can be a string or an integer specifying the legend location A :class:`matplotlib.legend.Legend` instance is returned. Examples -------- To make a legend from existing artists on every axes:: figlegend() To make a legend for a list of lines and labels:: figlegend( (line1, line2, line3), ('label1', 'label2', 'label3'), 'upper right' ) .. seealso:: :func:`~matplotlib.pyplot.legend` """ return gcf().legend(*args, **kwargs) ## Figure and Axes hybrid ##
Example #16
Source File: pyplot.py From twitter-stock-recommendation with MIT License | 5 votes |
def legend(*args, **kwargs): ret = gca().legend(*args, **kwargs) return ret # Autogenerated by boilerplate.py. Do not edit as changes will be lost.