All Questions
Tagged with legend legend-properties
253
questions
1
vote
1
answer
2k
views
Legend in geopandas plot for color as well as for markersize
I am creating a geopandas plot in which I have colors dependent on a column value and the markersize on another column value. When I put legend= True the plot only shows the colors in the legend and ...
2
votes
1
answer
746
views
How to add a new (custom) variable to a ggplot legend
I've run a number of models with two estimated parameters per model with five groups and two treatments. I'm trying to graph the confidence intervals of these estimates in a large panel plot. Since, I'...
0
votes
0
answers
154
views
matplolib legend elements bold: font size too big
I have a plot and would like to have some things in my legend bold. Unfortunately if I do this then the font size of the bold text is bigger than that of the rest. How can I keep the font size the ...
0
votes
1
answer
96
views
anchor two legends for the same plot in line one line
I have a plot with two legends that are not of the same height. I would like to place them such that their titles start at the same place on the y-axis. I know I could go and manually change ...
-1
votes
2
answers
40
views
Can any one help me fix this legend issue?
Can any expert help me merge the following legend?
I would like all the two legends to be merged
Can any expert help me merge the following legend?
I would like all the two legends to be merged
def ...
2
votes
1
answer
659
views
Add text to legend symbols in ggplot
Using geom_rect I am separating my data into classes in a ggplot.
These classes (v high, high, medium, low, v low) are denoted in the legend.
Is there a possibility to add the lower and upper limits ...
2
votes
1
answer
4k
views
Manually add legend entry to Seaborn Legend
I create overlaying distribution plots by group memberships using
gfg = sns.displot(hist_dat, x="Outcome", hue="Group", kind="kde", fill = True,
palette=...
1
vote
1
answer
1k
views
Add linetype to geom_segment legend
Aim: add the linetypes of the segments to the legend, as well as the colour.
Problem: only the colour is showing.
Data:
m = as.data.frame(matrix(c(1:10), ncol = 2, nrow = 10))
Plot:
ggplot(m, aes(v1,...
1
vote
1
answer
2k
views
How to make alpha (transparency) appear as continuous gradient in the ggplot legend?
Is it possible to make the transparency (alpha) appear as a continuous gradient in the ggplot legend? Currently, the plot looks like this:
Here, the different values for alpha are represented by dots ...
0
votes
1
answer
1k
views
How to plot a barplot with different hatch and edge color with legends using matplotlib?
I would like to plot a barplot where bars have a different hatch and edge color using Matplotlib with its proper legends. I tried to plot but I couldn't generate proper legends with this code:
import ...
1
vote
0
answers
340
views
Leaflet legend with subtitles for grouped values
Is there a way to add subtitles to leaflet legends? The following example produces a functioning legend. However, is there a way to combine the subgroups to the same legend?
I could imagine this could ...
1
vote
1
answer
890
views
Adding multiple legends to multiple subplots
I am trying to display multiple legends within multiple subplots. Currently, I am able to create figures with subplots and display multiple legends within one plot but can't combine the two. They seem ...
0
votes
1
answer
90
views
Multiple Data Frame Plot Custom Legend and X Axis Breaks?
The data is 1965-2019 Renewable Energy Vs Alternative Energy Sources. I have two issues I am trying to tackle here. I would like to 1) Add a custom legend signifying the two colors and naming them ...
0
votes
1
answer
1k
views
How to specify ggplot legend order when you have multiple variables that are not all part of one column?
I'm plotting the same data by different time scales (Week, Month, Quarter, etc.) using ggplot, and as a result, I'm pulling the data from different columns. However, when I see my legend, I want it to ...
2
votes
2
answers
1k
views
How to change the font family of matplotlib legend AND legend title?
I would like to use the font family "Consolas" in my matplotlib legend in order to benefit the monospaced font. I also want a legend title.
But it seems that when I change the font family of ...