Linked Questions
14 questions linked to/from How to make custom legend
0
votes
0
answers
218
views
Add single legend for subplots [duplicate]
How can I add one legend for all subplots? The legend should be on the side with 4 markers one below the other:
c='738A3E', alpha=0.3, marker='^'
c='#738A3E', alpha=0.3, marker='v'
c='#007CAE', alpha=...
0
votes
0
answers
19
views
create custom matplotlib legend with points [duplicate]
I'm trying to create a custom legend for my seaborn plots.
Using the following I can create a custom legend using square patches. What I want is something similar but with point in round, caret, ...
183
votes
5
answers
273k
views
How to manually create a legend
I am using matplotlib and I would like to manually add items to the legend that are a color and a label. I am adding data to to the plot to specifying there would lead to a lot of duplicates.
My ...
37
votes
10
answers
46k
views
Combine multiple line labels in legend
I have data that results in multiple lines being plotted, I want to give these lines a single label in my legend. I think this can be better demonstrated using the example below,
a = np.array([[ 3.57, ...
32
votes
5
answers
93k
views
Scatter plot with legend for each color in c
I want to create a Matplotlib scatter plot, with a legend showing the color for each class. For example, I have a list of x and y values, and a list of classes values. Each element in the x, y and ...
21
votes
3
answers
83k
views
set legend for plot with several lines (in python)
I have several lines plotted in the same figure and I want name this group of lines according to its content. Over those lines I intended yet to plot the average with the errorbar. But two main ...
10
votes
4
answers
12k
views
Combine two patches for legend
I am trying to plot some data with confidence bands. I am doing this with two plots for each data stream: plot, and fill_between. I would like the legend to look similar to the plots, where each entry ...
12
votes
1
answer
39k
views
Python legend in 3dplot
I am plotting a 3d plot in python 2.7
When I try to plot a 3d plot with color and marker as in 2D plot() function. I come across an error.
So I tried to plot line separately and measured points ...
7
votes
3
answers
14k
views
Legend outside the plot in Python - matplotlib
I'm trying to place a rather extensive legend outside my plot in matplotlib. The legend has quite a few entries, and each entry can be quite long (but I don't know exactly how long).
Obviously, that'...
1
vote
1
answer
14k
views
Matplotlib: Getting different colors in data lines with error bars
I am trying to draw two data lines with error bars, each having the same color as the data line. However, I get another thin line with a color I have not specified in each data line when I add an ...
3
votes
1
answer
9k
views
Custom legend for Seaborn regplot (Python 3)
I've been trying to follow this How to make custom legend in matplotlib SO question but I think a few things are getting lost in translation. I used a custom color mapping for the different classes ...
4
votes
2
answers
1k
views
User defined legend in python
I have this plot in which some areas between curves are being filled by definition. Is there any way to include them in legend? Especially where those filled areas are overlapped and as well as that a ...
4
votes
1
answer
2k
views
Matplotlib scatterplot legend: Customize handles to look like tiny scatter plots
I'm making a couple scatter plots in matplotlib with a legend. The marker sizes are small, so plotting just a few example points in the legend handle will be hard to see. Instead, I want to format ...
-1
votes
1
answer
353
views
how to make the legend show all str value in list?
I have a code like
import matplotlib.pyplot as plt
x_axis=(0,10)
y_axis=(0,10)
label = [1,2,3,4,5,6,7]
print(type(label))
plt.figure()
plt.plot(x_axis,y_axis,color='none')
plt.plot([label])
plt.legend(...