Top "Legend" questions

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

Matplotlib legend, add items across columns instead of down

For a simple plot below, is there a way to make matplotlib populate the legend so that it fills the …

python matplotlib legend
Thicker lines in the legend of gnuplot

I'm plotting some data curves with gnuplot, and they look like this: However, the line samples in the legend are …

gnuplot legend presentation
How to increase the font size of the legend in my Seaborn plot?

I have the following codes to create a Seaborn strip plot. I am having a hard time figuring out how …

python matplotlib legend seaborn
Missing legend with ggplot2 and geom_line

How does one get a legend to display when plotting lines in ggplot? I've been trying all evening but have …

r ggplot2 legend linechart
ggplot2: Divide Legend into Two Columns, Each with Its Own Title

I have these factors require(ggplot2) names(table(diamonds$cut)) # [1] "Fair" "Good" "Very Good" "Premium" "Ideal" which I want to …

r ggplot2 legend
How to reverse legend (labels and color) so high value starts downstairs?

whats the best way to invert the legend label order so the 7 is down and the 1 is upstairs? df$day &…

r ggplot2 legend
Reducing legend size in ggplot beyond default size

My goal is to make several plots with ggplot and combine them into a single plot using grid.arrange in …

r ggplot2 legend
MATLAB: Assign multiple colors to text in legend

I'm trying to color code text in a legend. (Since I'm trying to sort several plots into different categories, I …

matlab plot legend textcolor legend-properties
Centring legend below two plots in r

I would like to centre a common legend below two plots. I have used xpd=TRUE to allow for printing …

r legend par
How to change legend fontname in matplotlib

I would like to display a font in Times New Roman in the legend of a matplotlib plot. I have …

python matplotlib legend legend-properties