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
2
votes
1 answer

How to set up a raster legend for four plots in a panel?

I done four raster plots which were 2 layered and I done pretty simple using par(mfrow=c(2,2)), but when setting a common legend makes the plot a mess, It always overlap with other plots. I tried change some parameter values but still the issue…
2
votes
0 answers

How to combine two manual scales in ggplot?

I have a plot with 2 lines. Each line has its own color and type, however I failed trying to create the legend for this plot. I created 2 scale_..._manual, one for the line types, and other one for the colors, but then apperars 2 separated legends.…
Daniel Valencia C.
  • 2,159
  • 2
  • 19
  • 38
2
votes
0 answers

How to increase the font size of legend values in image.plot function in R programming?

library(fields) image.plot(lon, lat, tas, legend.width = 1.5, legend.shrink = 1, legend.mar = 1, cex.axis=2,cex.lab=2,legend.cex=1.8,legend.args=list(text="K", cex=2, side=3, line=0.5),las=1) using above codes I get image plot but the font size…
2
votes
1 answer

How to combine filled squares and plot symbols in a legend in R?

I made a boxplot and added the mean as a point. In the legend I'd like to put the filled squares corresponding to the boxes. Nest to the boxes I want to add a symbol corresponding to the mean. However, my attempts were unsuccessfully. Any help? A <-…
Daniel Valencia C.
  • 2,159
  • 2
  • 19
  • 38
2
votes
1 answer

R plotly pie chart - how to display all of a long legend?

I have a plotly pie chart showing the number of people that have travelled to different countries. The list of countries is quite long and the plotly legend does not show them all in the window. There is a scroll-bar that one can use to see later…
Amy M
  • 967
  • 1
  • 9
  • 19
2
votes
1 answer

ggplot2 - R - How to fix size of bubble in legend

I would like to make the shape that shows the bubble color larger in the legend only. I have tried several suggestions from this site, but I have been unlucky so far. A basic example is below. In this example, I would like for the "gear" size to be…
Matt
  • 174
  • 1
  • 2
  • 14
2
votes
2 answers

r ggplot change legend order to match final order of data

I have a dataframe which has a set of manufacturers and collected data for those manufacturers. The list of manufacturers and/or the attribute data can change, depending on the run. I display this as a line chart in ggplot, but what I want is to…
2
votes
2 answers

Putting one legend for many axes

I'm using three axes-Objects to scale my data on the x-axis. My problem is that i do not know how to get a nice legend for the three plots. I have to do this cause my real data is sampled with different sample rates. I edited my m-file for the…
2
votes
1 answer

How to change alpha of legend glyph in Bokeh

Is there a way to change the alpha of the glyph in a Bokeh legend? Take this example. I have the alpha of the lines in my plot set to 0.1, but the line glyph in the legend mirrors this alpha value also. You can change the alpha of everything else…
Michael Hall
  • 2,834
  • 1
  • 22
  • 40
2
votes
1 answer

ggplot2: Formatting Legend Categories

I would like to be able to do something like this: https://stackoverflow.com/a/30036603, except with "legend.text" instead of "axis.text.x". Is this possible? It would be something like this, except it's not currently working (all labs are…
ktmbiome
  • 183
  • 1
  • 11
2
votes
1 answer

How can I plot legend symbols and labels on a different row in R?

I'm trying to plot a legend in base R with the symbols horizontally and the corresponding labels underneath the symbols on the next row. The legend will be plotted in the margins (not included in example data). Is there a way to use graphical…
romepa
  • 23
  • 6
2
votes
2 answers

How to adjust legend properties to display 2 characteristics?

I'm plotting two variables in the same plot, and each variable is grouped by year. My legend shows the color differentiation by year, but I can't figure out how to add linetype to the legend. Ideally there would be 4 lines in the legend: pink=2015,…
jesstme
  • 604
  • 2
  • 10
  • 25
2
votes
1 answer

How to disable bar disappearing in ZingChart when clicking an item in the legend

The default functionality in ZingChart for legends while clicking the item is to hide all the respective bar series that is related to that item value in legend. I am performing a drilldown operation, which is fetching data for graph from server…
2
votes
2 answers

generateLegend() Chart.JS V2

I´m trying to customize my legend I´m using the .generateLegend() to get the legend in a html way this is what the function gave me console.log(myBarChart.generateLegend());
2
votes
1 answer

Ternary Diagram How to make the legend labels in decimal instead of scientific notation

I am using the ggtern package in R for plotting the ternary diagrams. I have trouble customizing the legend of the 'fill'. Here is my code: library(ggtern) setwd("~/R/data") library(XLConnect) df <-…
Bharat
  • 2,409
  • 6
  • 32
  • 57