Questions tagged [legend]
A graph legend is commonly used when plotting several sets of data within the same diagram. The legend associates each plot with its corresponding data.
legend
5,165
questions
0
votes
1
answer
42
views
How to make responsive 'legend' area for mobile view
I'm building a portfolio website using HTML & CSS. I want to add my projects inside tags. But those legend tags arn't responsive for the screen resolution(for me, it's mobile view) and its' ...
118
votes
6
answers
126k
views
Show only certain items in legend
I currently am plotting a stacked bar graph of a large amount of taxonomic data, and only wish to show significant species in the legend (out of ~500 I wish to show ~25). Is there a simple way to do ...
0
votes
1
answer
49
views
Reorder legend levels in CalendR
Using CalendR to plot fishing days for boats. How do you go about reordering legend levels e.g. boat names first then public holidays last?
Load packages, create events & plot calander:
## load ...
0
votes
0
answers
23
views
How to keep decimal places in branca colormap using folium?
I'm using branca to create a custom color map to use in a folium map. I would like for the scale to display the decimal places from the index still, not round to a whole numbers, but I'm having a hard ...
0
votes
0
answers
38
views
Putting Legend completely outside the plot in right center
I am trying to create a plot where the legend will be in the right center but completely outside the plot. I am following this answer https://stackoverflow.com/a/75453792/3587282 and using Matplotlib ...
0
votes
0
answers
21
views
Increase spacing in ggplot legend items [duplicate]
I have two shapefiles of a Country, one containing the geometry of the municipalities and the other regarding the border of the regions of the country. I have to plot the country with the ...
5
votes
1
answer
365
views
Legend obscures plot using Seaborn Objects API
I have a recurring problem with legends on many of my plots with legends. The legend often obscures part of the data.
Reproducible example:
import seaborn.objects as so
import numpy as np
import ...
2
votes
1
answer
247
views
Is there an alternate for 'palette' while plotting barplot through seaborn object Plot(); How to remove legend when plotting with so.Plot()
I am trying to learn the seaborn object Plot() interface. With the traditional sns.barplot() we could easily define color palette for the bars.
import seaborn as sns
df = sns.load_dataset('penguins')
...
3
votes
2
answers
163
views
How to reposition Figure legends into subfigures
I am new to this, trying to plot 2 subfigures horizontal with sample data using Matplotlib and Seaborn library in Jupyter Notebook, the 2 sub-charts come out alright, but the 2 legends overlap each ...
7
votes
2
answers
2k
views
How can I customize the legend with Seaborn 0.12 objects?
The new Seaborn objects (v 0.12) are great but I struggle to deal with legend customization. Especially when using matplotlib to define subplots. My code:
f, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, ...
1
vote
1
answer
6k
views
WPF Chart Legend Item Style
I am trying to style the Legend Items in my WPF Chart. I have the following LegendStyle, but this doesn't change anything. What am I doing wrong?
Thanks!
<Style x:Key="LegendStyle1" TargetType="{...
20
votes
2
answers
26k
views
One shared legend for a cowplot grid in R
I just built a grid with package cowplot (to label the plots from A-D). The plots are made with package ggplot2:
pfour<-ggplot(four, aes(x=Concentration, y=Percentage, fill=Phenotype)) +
...
0
votes
1
answer
43
views
Edit legend title in ggplot2 (3.5.1) [duplicate]
I have successfully edited the x and y axis titles, but I'm stuck on the legend title and labels.
Here is the code I have run so far:
m.emo.plot <- interact_plot(model = m.emo, pred = cemodiff, ...
94
votes
9
answers
48k
views
Making a Legend/Key in GraphViz
I’d like to include a legend or key in my GraphViz diagram. I’m having trouble figuring out what code to use, though. I also want to put it in a corner, but the only coord I know for sure is the ...
0
votes
0
answers
37
views
Dynamic positioning of checkboxes next to chart legend in Plotly Dash
I am currently creating a dashboard with Plotly Dash in Python and have a layout problem that I just couldn't fix over the last couple days:
I have a bar chart with a metric, that is always shown and ...