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.

legend
1,297 questions with no upvoted or accepted answers
6 votes
0 answers
1k views

How to get leading whitespace in matplotlib labels (legend or xlabel etc.) using latex?

I would like to insert some leading whitespace into some of my legend labels (problem is the same for other types of labels) with latex turned on. However, any leading whitespace that I enter is being ...
Zaus's user avatar
  • 1,291
6 votes
1 answer
2k views

How to change cursor on plotly graph when mouse hover event occurred?

i'm trying to change cursor from pointer to default when hover event occurred on plotly's graph legend legend: { cursor: "default", x: xLegenda, y: yLegenda, ...
Giuseppe Giubaldo's user avatar
6 votes
0 answers
3k views

Using annotate to place a text box below legend in Matplotlib

I wish to display some text in a Matplotlib plot using annotate(), aligned beneath a legend box. I have examined the solution proposed in How to place a text box directly below legend in matplotlib? ...
Delory's user avatar
  • 71
6 votes
0 answers
11k views

Highcharts legend styling with usehtml

I need to use the pagination of Highcharts (v2.3.5) legend, as my graph use numerous series of data. The thing is I would like to add an image (with a dedicated tooltip) on each legend item, and so ...
user2047243's user avatar
5 votes
0 answers
163 views

How to have a legend for colored edges in Julia plots?

Here is a minimal working code from Julia Discourse: using LightGraphs using GraphPlot using Colors g = graphfamous("karate") membership = [1,1,1,1,1,1,1,1,2,1,1,1,1,1,2,2,1,1,2,1,2,1,2,1,...
JKHA's user avatar
  • 1,876
5 votes
1 answer
215 views

legend ticks outside of the key box in ggplot2

I'm trying to generate a "satisfactory" legend using ggplot2, but what frustrates me is the position of ticks (they are inside the legend key). Here is some code to show what I mean. library(...
Miao  Cai's user avatar
  • 972
5 votes
0 answers
280 views

Bokeh: How to hide legends for lines that belong to the same group/category

The scenario is the following: I have a set of data with 2 attributes: year and (export/import) There are 3 choices for years and 2 choices for (export/import) , counting in total 3*2=6 datasets. 1. ...
John's user avatar
  • 388
5 votes
0 answers
4k views

How to remove legend in the default r plot() function

I have a simple R plot (i.e. plot(object)) and would like to suppress the legend. I am not, and cannot, use ggplot - how do I prevent R adding a legend to the plot?
user265883's user avatar
5 votes
0 answers
768 views

How to fit a big legend under a chart?

I have a lot of elements in my graph, which don't fit into one line under the graph. How can I achieve a line break so that all legend's fit under the graph? Here is an example of my use case, copy ...
SiGa's user avatar
  • 187
5 votes
0 answers
487 views

Why legend box size increases when I zoom plot in r?

When I use legend command in r, the size of the legend box is true, but when I zoom plot, the size of the legend box increases with a large scale. Are there any options to set height and width of ...
mohammad's user avatar
  • 175
5 votes
0 answers
346 views

Legend is displaying additional shape

I'm using the following data frame: df1 <- structure(list(Genotype = structure(c(1L, 1L, 1L, 1L, 1L, 2L,2L,2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L,1L, 2L, 2L, 2L, 2L, 2L,...
John Gagnon's user avatar
5 votes
1 answer
5k views

Place MATLAB legend such that it does not overlap on the plot

I am generating multiple plots of different datasets in succession using MATLAB. I would like the legend positions to be such that they don't overlap on the plotted lines and it would be ideal if this ...
Slothworks's user avatar
  • 1,083
5 votes
1 answer
3k views

Highcharts: are multiple legends possible?

I'm new to Highcharts and it seems excellent this far. However, I need to have my six series grouped into three columns in the legend. This can be achieved by limiting legend width and using ...
StackExchange saddens dancek's user avatar
5 votes
1 answer
1k views

How to make a Legend of MatPlotLib patch patterns or add them to a preexisting Legend

How does one make a legend for patch patterns used on a graph or add information on the patch patterns to a preexisting legend without affecting information already present on the legend?
Elliot's user avatar
  • 5,411
4 votes
0 answers
821 views

How to change legend text formatting in Leaflet in R?

I've created a leaflet map and I'm trying to figure out how I can change the formatting of the legend labels. I currently have a gradient color palette to represent the data, with a set of discrete ...
nkt95's user avatar
  • 65

15 30 50 per page
1
2 3 4 5
87