Linked Questions

0 votes
0 answers
218 views

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=...
Alex's user avatar
  • 13
0 votes
0 answers
19 views

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, ...
Fenrir's user avatar
  • 85
183 votes
5 answers
273k views

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 ...
Brady forcier's user avatar
37 votes
10 answers
46k views

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, ...
hashmuke's user avatar
  • 3,345
32 votes
5 answers
93k views

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 ...
Karnivaurus's user avatar
  • 24.4k
21 votes
3 answers
83k views

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 ...
Claudia's user avatar
  • 513
10 votes
4 answers
12k views

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 ...
Blink's user avatar
  • 1,514
12 votes
1 answer
39k views

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 ...
sristisravan's user avatar
7 votes
3 answers
14k views

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'...
user avatar
1 vote
1 answer
14k views

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 ...
owl's user avatar
  • 2,111
3 votes
1 answer
9k views

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 ...
O.rka's user avatar
  • 31k
4 votes
2 answers
1k views

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 ...
Shivid's user avatar
  • 1,351
4 votes
1 answer
2k views

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 ...
Baird Langenbrunner's user avatar
-1 votes
1 answer
353 views

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(...
Ryine's user avatar
  • 1