Questions tagged [legend-properties]

legend-properties refers to various chart libraries and the ability to programmatically customise legends in charts generated by those libraries.

legend-properties refers to various chart libraries and the ability to programmatically customise legends in charts generated by those libraries. Examples for proper use of the tag is :

413 questions
3
votes
2 answers

New line for legend in google chart (PieChart)

I am using Google chart (piechart) and want to start each legend on a new line - NOT like on the picture below: here is my code: var data = new google.visualization.arrayToDataTable(chartData, false); var…
3
votes
2 answers

rotating the legend key in ggplot2

My data set is as follows dput(data2) structure(list(School = structure(c(1L, 1L, 1L, 2L, 2L, 2L, 3L, 3L, 3L), .Label = c("School1", "School2", "School3"), class = "factor"), Year = c(2015L, 2014L, 2013L, 2015L, 2014L, 2013L, 2015L, …
Vikram
  • 51
  • 2
  • 7
3
votes
2 answers

How to decrease the size of the legend in a figure?

The following code plots a figure. The code should work on Matlab >= R2014b. I want to remove the space within the legend. How to do this? x = 0:0.5:10; figure; hold on; plot(x,sin(x), 'Marker', 'o'); plot(x,cos(x), 'Marker', 's'); [leg, objs] =…
aban
  • 205
  • 2
  • 12
3
votes
2 answers

asp.net charts: Legend overlapping with X-axis

I am creating a Chart (DataVisualization.Charting.Chart) programmatically, which is a Stacked Bar chart. I am also adding Legend entries programmatically to it. I want to show the Legend at the bottom of the chart. But, while doing so, the Legend…
user557172
  • 31
  • 1
  • 3
3
votes
5 answers

Matlab: change order of entries in Figure legend

I have a Figure file where I would like to change the order of the entries (e.g., put the first entry as third one). I saved this Figure.fig long time ago so I am not sure if I can recover the original code. Here I show you my plot: I want the…
Patapunfate
  • 297
  • 1
  • 4
  • 12
3
votes
1 answer

Display natural break intervals in Leaflet legend R

I have tried searching for an answer to this question and came across this : Manually adding legend values in leaflet But this isn't quite what I would like as the leaflet map displays the breaks I want however when I try adding them to the legend…
MrMonkeyBum
  • 55
  • 1
  • 6
3
votes
1 answer

Matplotlib: is there an rcParams way to adjust legend border width?

This site shows many (all?) rc parameters that can be adjusted in Matplotlib plots, either through the matplotlibrc file or using matplotlib.rcParams[] in a Python script. I can see no way to adjust the width of the border box of a legend using the…
NeutronStar
  • 2,057
  • 7
  • 31
  • 49
3
votes
1 answer

Proportional plot legend display in ggplot2

How can i merge two legends showing proportional scale in ggplot 2. I have a dataframe df. I got the following plot 1 with code below. Now how can i merge the two legends to show something proportional size and class together. I want to make legend…
Cirrus
  • 638
  • 3
  • 13
  • 26
3
votes
2 answers

Overlay base R graphics on top of ggplot2

I have a plot in ggplot and I wish to overlay a map legend that I have created with base R code. I do not know how to overlay base R graphics on top of a ggplot and would be grateful for assistance. Currently I have a ggplot legend that looks…
ZAC
  • 97
  • 1
  • 6
3
votes
0 answers

\mathrm mode for legend labels and legend props in matplotlib

So I am having a little alignment issue with my legend in matplotlib. Hopefully it is easily solvable with the right know-how. I have scoured the matplotlib website but I'm struggling to find the exact solution. Essentially I have the following…
GCien
  • 2,221
  • 6
  • 30
  • 56
3
votes
2 answers

Adding legend entry makes all other legend entries diagonal and rectangles

I have attempted anything I could find but to no avail. I have replicated my issue using the built in dataset mtcars. I am making a scatter plot with bubble chart characteristics with ggplot2 in R. A few things in my code that don't work with this…
Kate_Rock
  • 33
  • 3
3
votes
1 answer

ggplot2: Move legend to corner but keep it in margin?

I want to move my ggplot2 legend to the corner, but not inside the plot itself. So it should be in the margin still, but not in the center. The only options I've found are for either selecting "top," "right," etc., or using a custom coordinate…
jsuprr
  • 97
  • 1
  • 6
3
votes
4 answers

AmChart legend in one line

I'm trying to get AmChart chart legends into one line, but without luck. Legends are separated (one for line). Actual settings for from documentation http://docs.amcharts.com/3/javascriptcharts/AmLegend is following. "legend": { …
redrom
  • 11,502
  • 31
  • 157
  • 264
3
votes
0 answers

Legend as text alongside points for each category and with same collor

I would like to make scatter plot in R, of variables Y and X over categories Z (separated by colors) but with a special legend. Not a legend box, but for the category names to appear as texts along the points for that category, and the text be the…
LucasMation
  • 2,408
  • 2
  • 22
  • 45
3
votes
1 answer

R expression of the form 0 < \alpha < 1

I want to have a legend in an R plot involving expressions. I did legend( x = "topright", legend = c(expression(alpha == 0), expression(0 < alpha)) ) This works just fine. But if I replace the 0 < alpha by 0 < alpha < 1 I get an error. Can…
mg84
  • 287
  • 2
  • 9