Top "Legend" questions

A graph legend is commonly used when plotting several sets of data within the same diagram.

How to put the legend out of the plot

I have a series of 20 plots (not subplots) to be made in a single figure. I want the legend to …

python matplotlib legend
How to change legend size with matplotlib.pyplot

Simple question here: I'm trying to get the size of my legend using matplotlib.pyplot to be smaller (i.e., …

python size matplotlib legend
Remove legend ggplot 2.2

I'm trying to keep the legend of one layer (smooth) and remove the legend of the other (point). I have …

r ggplot2 legend
Plot a legend outside of the plotting area in base graphics?

As the title says: How can I plot a legend outside the plotting area when using base graphics? I thought …

r plot legend
Add legend to ggplot2 line plot

I have a question about legends in ggplot2. I managed to plot three lines in the same graph and want …

r ggplot2 legend r-faq
matplotlib: colorbars and its text labels

I'd like to create a colorbar legend for a heatmap, such that the labels are in the center of each …

python matplotlib label legend colorbar
Secondary axis with twinx(): how to add to legend?

I have a plot with two y-axes, using twinx(). I also give labels to the lines, and want to show …

python matplotlib axis legend
Matplotlib scatter plot legend

I created a 4D scatter plot graph to represent different temperatures in a specific area. When I create the legend, …

python matplotlib legend scatter-plot
Remove the legend on a matplotlib figure

To add a legend to a matplotlib plot, one simply runs legend(). How to remove a legend from a plot? (…

matplotlib legend
Moving matplotlib legend outside of the axis makes it cutoff by the figure box

I'm familiar with the following questions: Matplotlib savefig with a legend outside the plot How to put the legend out …

python matplotlib legend