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,164
questions
0
votes
1
answer
57
views
Add legend after using gg.gap
I have a data set with a big negative value, so I used gg.gap package to make a discontinuous y-axis. The code worked well but after adding the function gg.gap the legend was deleted.
I tried adding a ...
2
votes
1
answer
43
views
How can I make the legend appear on this chart?
I've drawn this quartile for the runoff rate, and I'd like the legend to appear as: - Median and - Q25-Q75. Can you please help me?
Runoff <- data.frame(Year = rep(1991:2002, each = 12),
...
0
votes
0
answers
8
views
Adapting the leaflet.js Choropleth example with non static legend
I am trying to use the beautiful base example Choropleth, but would like to have a second base map, with a second legend that would be linked to the base map used (therefore not anymore static), with ...
-1
votes
1
answer
41
views
Plot X and Y chart with third column as legend for each point in Excel or Google Sheets [duplicate]
I am having difficulty understanding why it is so difficult to do something so simple in R or Python in Excel or Google Sheets.
I want to plot Status1 versus Status2 in a simple X and Y plot. However, ...
0
votes
2
answers
34
views
2 legends on graph matplotlib [duplicate]
I want to plot a number of curves for different models. I have curves for different structures. The structures need to have the same color and the different models a different linestyle. I then want 2 ...
0
votes
0
answers
30
views
Plotting problems in python script vs jupyter notebook
I am encountering issues with my plotting code when running it as a Python script in PyCharm. The plots overlap, and the legends are not displayed, which does not happen when I run the same code in a ...
0
votes
1
answer
40
views
Why the legend merged with the d3.js line chart when zooming?
I am trying to add a legend to the d3.js example named
Line chart with zoom in d3.js
1°) I added the script:
// Add legend rectangle
line.append('rect')
.attr('x', width - 80)
....
0
votes
1
answer
37
views
I want to get two legends for two different groups in a two Y-Axis plot [closed]
so I have a two Y-Axis plot. Each Y-Axis is given a group of Data.
I want to have two different legends for each group on left and right side of plot on the locations shown in the second picture.
This ...
0
votes
0
answers
20
views
Change Orientation and Order of Items in Legend ggplot2 r [duplicate]
Is there a way to change the orientation of the items in the legend of ggplot2 chart?
I have a series of boxplots where I would like the individual items to oriented vertically opposed to horizontally....
0
votes
1
answer
18
views
Tableau: Can I have a button that the user can press to choose the color palette of a visual (map)
I am fairly new to Tableau.
I have a map. I wonder if I can have a button or something that a user can interact to change the colour palette of the legend.
This is useful for example, for color-blind ...
0
votes
1
answer
28
views
Variable legend outlined in appropriate color, but filled with black dot
I have used ggplot in R to generate a dot plot with three "samples" (Adipocytes, BAT and WAT) which are colored by ""group". The plot is correct, but the "group" ...
0
votes
0
answers
13
views
When converting a ggplot() using ggplotly(), the legend is distorted. How can I prevent this
Here's the plot as generated by ggplot()
And here it is as mashed by ggplotly()
How can I fix the second plot to look like the first with respect to the legend? Please ignore the differences in the ...
0
votes
0
answers
46
views
Sorting rows of a matrix by column values in Power BI
I've created a matrix in Power BI similar to the one below. The entries are a calculated field. I can sort the rows by the "Total" column and the "Name" column by clicking on the ...
0
votes
3
answers
37
views
Legend is not shown using ggplot2 despite using color within aes()
I have a problem making the plot legend to show. I've checked other posts and most of them mention that color should be defined within the aes() of the ggplot.
So I have the following dataset:
date ...
1
vote
1
answer
16
views
Order of items in an R graph legend are different depending on different datasets of the same data
Newish to R and Stack Overflow but I wrote some R code to make grouped boxplots for chlorophyll data by season and site while including a water quality criteria reference line. It may not be the most ...