All Questions
15
questions
0
votes
1
answer
53
views
Add size legend to plotly.express.scatter_mapbox
I have a visualization done using plotly.express.scatter_mapbox. It basically shows the different institutions on the Saudi Arabia map. These institutions are marked by small circles that are color ...
0
votes
1
answer
107
views
Customize Legend Matplotlib
I have Shots Map Visualization like this :
The code that i used look like this :
pitch = VerticalPitch(half=True, goal_type='box',linewidth=1,line_color='white',pad_bottom= 0.21)
fig, ax = pitch.draw(...
-1
votes
2
answers
487
views
Problem with scatter plot legend using matplotlib
I am having a problem with my legend formatting, when using matpotlib to create a scatter graph. In this case, the data itself is being plotted correctly on the scatter graph, but the legend has ...
1
vote
1
answer
506
views
Issue with legend's markerscale in matplotlib [duplicate]
The last line does not change the size of markers(handles) in my graph. I have tried all mentioned options (as comment). In all the cases, the markerscale remains 1
What is my mistake? Thanks!
plt....
2
votes
1
answer
1k
views
Merge two legends in altair
I have a scatter plot in altair where I am representing a column using both shape and color. I would like to have a single legend with both pieces of information, but instead I am getting two legends, ...
0
votes
0
answers
44
views
How to prevent Matplotlib from mentioning the same lines in the legend
I've got a code like this.
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
import pyXSteam.XSteam
from pyXSteam.XSteam import XSteam
sns.set_style("...
1
vote
3
answers
779
views
How to display only Categories in the legend present in the data
I have a data frame as below:
In the above dataframe, 'Month' is an ordered Categorical column defined as:
cats = ['January', 'February', 'March', 'April','May','June', 'July', 'August','September', '...
5
votes
1
answer
3k
views
How to display all numeric legend values in seaborn
I am trying to create a sns.lineplot() for following dataframe:
overs:
season over total_runs total_overs avg_run
0 2008 1 703 745 0.943624
1 2008 2 ...
2
votes
2
answers
5k
views
Adding legend in geopandas plot with subplots changes size of plot
I want to plot two GeoPandas plots with matplotlib subplots. The two maps have the same legend, and therefore I only want to have one legend. However, if I add a legend to one of the GeoPandas plots, ...
0
votes
1
answer
1k
views
seaborn remove duplicate legend when applying style and size to same variable
How can I fix up the legend of seaborn?
When plotting: hue = 'group', style='bar', size='bar' is used for the various categories in 2 dimensions.
I want to apply bar to size and style for a better ...
0
votes
1
answer
390
views
Add STD to legend in python seaborn
I have the chart below and I would like to add STD per class in the legend.
It was created with the code:
subset1=data1[feats_to_explore+['wine_class']]
f, (ax1, ax2, ax3) = plt.subplots(3, figsize=(...
3
votes
1
answer
11k
views
How to create a legend for a seaborn lineplot with two separately calculated lines
I have the following lineplot and I need to create a legend for the two lines.
My problem is that I can't figure out how to use legend() with the two lines.
What I would like is having the legend box ...
2
votes
1
answer
2k
views
Adding legend to a radarchart in Python
I want to create a radarchart with legends for every plot that is created but until now it has been impossible. Then, you can see the code used to create the plot (thanks to another user that ...
2
votes
1
answer
213
views
Changing line style proportional spacing using matplotlib
With uneven distributed data, the color are too similar for almost all points. For example. the figure below represent too much shallow color corresponding to the value < 12000.
So, I thought ...
5
votes
1
answer
12k
views
matplotlib empty legend handles
I wanted to add some text to a legend in a matplotib plot in python. I was thinking about creating an empty handle, is there any way to do it? Already tried by using somethin similar to:
ax.legend([...