This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
other:python:matplotlib_by_jyp [2021/02/26 11:45] jypeter More gallery links updates |
other:python:matplotlib_by_jyp [2021/02/26 11:56] jypeter More link updates |
||
---|---|---|---|
Line 176: | Line 176: | ||
* [[https://matplotlib.org/stable/gallery/text_labels_and_annotations/titles_demo.html|Title and labels positions demo]] | * [[https://matplotlib.org/stable/gallery/text_labels_and_annotations/titles_demo.html|Title and labels positions demo]] | ||
* ''fontsize'': size in points, or (better!) string specifying a relative size (''xx-small'', ''x-small'', ''small'', ''medium'', ''large'', ''x-large'', ''xx-large'') | * ''fontsize'': size in points, or (better!) string specifying a relative size (''xx-small'', ''x-small'', ''small'', ''medium'', ''large'', ''x-large'', ''xx-large'') | ||
- | * [[https://matplotlib.org/api/text_api.html#matplotlib.text.Text|all the text properties]] | + | * [[https://matplotlib.org/stable/api/text_api.html|all the text properties]] |
- | * [[https://matplotlib.org/api/pyplot_api.html#matplotlib.pyplot.legend|legend(...)]] ([[https://matplotlib.org/examples/pylab_examples/legend_demo3.html|legend demo]], [[https://matplotlib.org/users/legend_guide.html|advanced legend guide]]) | + | * [[https://matplotlib.org/stable/api/_as_gen/matplotlib.pyplot.legend.html|legend(...)]] ([[https://matplotlib.org/stable/gallery/text_labels_and_annotations/legend_demo.html|legend demo]], [[https://matplotlib.org/stable/tutorials/intermediate/legend_guide.html|advanced legend guide]]) |
* The legend will //show// the lines (or other objects) that were associated with a //label// with the ''label='' keyword when creating/updating a plot | * The legend will //show// the lines (or other objects) that were associated with a //label// with the ''label='' keyword when creating/updating a plot | ||
* If there are some elements of a plot that you do not want to associate with a legend (e.g. there are several lines with the same color and markers, but you want to plot the legend only once), do not specify a ''label='' keyword for these elements, or add a ''_'' at the front of the label strings | * If there are some elements of a plot that you do not want to associate with a legend (e.g. there are several lines with the same color and markers, but you want to plot the legend only once), do not specify a ''label='' keyword for these elements, or add a ''_'' at the front of the label strings |