Skip to main content

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.

1,295 questions with no upvoted or accepted answers
3 votes
0 answers
4k views

Opaque legend in an R plot with transparent background?

I'm trying to put a legend in an R plot, on top of some grid lines. I want the legend to be opaque, so that the grid lines do not show through the legend. However, I also want the whole image to have ...
rmccloskey's user avatar
3 votes
0 answers
282 views

vertical oriented linetype legend

I am using the following guide style: guide.style <- guide_legend(keywidth=.1, keyheight=.5, direction = "horizontal", title.position = "top", ...
Joshua Pritikin's user avatar
3 votes
1 answer
850 views

Graduated size symbols in legends

I have plotted a bubble chart with the circles' sizes corresponding to a list of values using matplotlib. However, I'm having trouble creating a legend for the plot that has variable size symbols that ...
user2163088's user avatar
3 votes
0 answers
792 views

Legend text Under and part of graph (winforms) C#

Does anyone know how to display the legend text as part of the chart on a winform chart control? In other words display each legend text under the bar graph as a label, with the text orientated ...
user2057050's user avatar
3 votes
1 answer
1k views

Making a static legend, independent of the actual plot

I'm plotting two surfaces in Matlab, the ground level which is constant and the water level which is changing in time. I use an if statement to change the colormap of the water with increasing depth,...
Tian Kjaer Jensen's user avatar
2 votes
0 answers
340 views

How do I set up ggplot dimensions to automatically match the Quarto Tufte layout (plot area in body column, legend area in margin column)?

I use Quarto for my laboratory notebooks (my handwriting isn't very readable). I find the Tufte layout very suitable for this purpose. I am trying to automatically fit ggplots into it with a specific ...
Radek Jaźwiec's user avatar
2 votes
1 answer
72 views

How to display legend for hexagon fill colour?

I am working on a hex bin plot in ggplot2. A legend is appearing for the filling of the hexagons (count) but not for what the hexagons are actually heat scaled on (the prediction). How do I go away ...
user avatar
2 votes
0 answers
492 views

Echarts Legend overlap Chart

The legend of chart overlaps Chart Heres the example of legend legend={ width: '95%', type: 'scroll', orient: 'vertical' } [![Chart][1]][1] [1]: https://i.sstatic.net/...
Ethan 's user avatar
  • 31
2 votes
0 answers
477 views

How to remove the colorbar from filled.contour in R

I have been trying to remove the colorbar from filled.contour plots in the R-programming language, as it seems to me that in some cases it may be redundant. Here is an example. cols = heat.colors(100, ...
JohnK's user avatar
  • 1,039
2 votes
2 answers
308 views

ggplot maps colours in wrong order

Creating a graph with several variables in ggplot, I map the colours using scale_colour_manual but the graph and legend applies the wrong colour to the wrong variable and the whole thing is mixed up. ...
hydroceanog's user avatar
2 votes
1 answer
290 views

How to adjust legend position, color and its bounding box?

Is there a way that R will automatically find the best position for the legend? How to display a rectangle with color before the legend and adjust the border of the legend? Below is my code and the ...
Gioi Hoc Sinh's user avatar
2 votes
3 answers
2k views

How to create a legend and change the point shape in ggplot2?

I need to reproduce the following figure on R Studio for a macroeconomics project. I've been able to figure most of it out, but the stuff that's giving me the biggest issue is the legend and changing ...
Joel Atallah's user avatar
2 votes
0 answers
517 views

How to display the legend only once when using tmap::tm_facets() in view mode?

I made a map using the tmap package. This map is displayed in view mode and has facets. I would like the legend to appear only once, outside of the graph/facets, at the bottom and stacked horizontally....
Romain's user avatar
  • 193
2 votes
0 answers
168 views

Tried p + scale_fill_discrete(name = "New Legend Title") but legend title still not changing

I combined two plots of predicted mixed effect model and trying to change the legend title "sR" so that it is friendly to read but I couldn't get it to work when using p + ...
Catalyst's user avatar
  • 426
2 votes
2 answers
900 views

Match legend text labels with their correct fill colors in barplot

I am plotting a table with the values below: No Sector Amount USD (million) 1 Air Pollution 134 2 Water Resources 3,158 3 Land Use and Land Use Change 91 4 Biodiversity 74 5 Agriculture 2,386 6 ...
Samuel Gachuhi's user avatar

15 30 50 per page
1
3 4
5
6 7
87