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 Increase the width of C3 pie chart Legend only. Not for the whole graph

I have a pie chart made with C3.js, I want to increase the width of the legends so that they can accommodate in one line. I do not want to increase the width size of Pie chart. Increasing the width of svg through size attiribute also increases the…
Raichu
  • 237
  • 1
  • 7
  • 20
2
votes
1 answer

Matlab legend does not match plot

I used the following code to generate my plot (and I want it later to include in my LateX document): clear all; close all; clc; a1 = 1; a2 = 1; c1 = 2.0; c2 = 1.8; time = 0:0.1:300; wave1 = a1 * sin(c1*time); wave2 = a2 * sin(c2*time); wave3 =…
André
  • 257
  • 2
  • 8
2
votes
1 answer

Legend Options - R Raster Legend

How do I remove the black box surrounding the raster legend? More generally, where can I find the documentation for the options for R raster legends? require(raster) data(volcano) r <- raster(volcano) plot(r,…
ZAC
  • 97
  • 1
  • 6
2
votes
2 answers

ggplot2 legend width and legend strings size

I have 2 plots of the exact same thing, excepts the colors filling the bars are different on each plot. Since the legend on the different plots have different widths because of the size of the names on it, the ratio between graph and legend becomes…
VFreguglia
  • 2,129
  • 4
  • 14
  • 35
2
votes
0 answers

xyplot legend configuration

It's my first time in here, so I hope not to do it wrong. I have a database of different measures of wood moisture content in different species as well as various index. These measures have been taken every two hours for six months. I'm trying to…
Antonio RS
  • 21
  • 4
2
votes
1 answer

Removing elements from the legend in ggplot when plotting facets with multiple aes settings

I'm using the code below to generate a simple chart: # Data and libs data(mtcars) reuire(ggplot2); require(ggthemes) # Chart def ggplot(mtcars, aes(wt, mpg, colour = as.factor(vs))) + geom_point(aes(colour = factor(cyl))) + facet_wrap(~…
Konrad
  • 17,740
  • 16
  • 106
  • 167
2
votes
1 answer

Have the legend correspond to the y values in Pandas/PyPlot

I have a dataframe named "original_filtered_df". I am trying to plot, for each possible pair of values from two columns ("COLOR", "SIZE"), two other columns ("WEIGHT", "HEIGHT") over time ("DATE"). The below code plots correctly. It creates multiple…
user1145925
  • 971
  • 3
  • 13
  • 24
2
votes
1 answer

Way to remove whitespace from a legend in ggplot2

I have a stacked bar chart which I am happy with but I am struggling to move the legend at the bottom closer to the graph (to much whitespace there). Here is my reproducable code: library(ggplot2) library(scales) library(reshape2) Rdates <-…
Trevor Nederlof
  • 2,546
  • 5
  • 22
  • 40
2
votes
1 answer

adding two legends to an image.plot

I am a new R user and I need some help to setup a secondary legend for a map. Description: I plotted a map using the image.plot function in the fields Library with x and y axes indicating the coordinates and a color scale with a legend andicating…
user3428152
  • 37
  • 1
  • 5
2
votes
1 answer

How to show sample error bars in the legend in R?

I'm plotting data with colored error bars in R. I'd like to show "sample error bars" (with the colour used in the plot) in the legend, but how? library("Hmisc") d1=data.frame(x=c(1,2,3,4,5), meanY=c(1,2,3,4,5),…
R_User
  • 10,682
  • 25
  • 79
  • 120
2
votes
1 answer

ggplot legend key color and items

Using the following data frame: sdf<-data.frame(hours=gl(n=3,k=1,length=9,labels=c(0,2,4)), count=c(4500,1500,2600,4000,800,200,1500,50,20), machine=gl(n=3,k=3,length=9,labels=c("A","B","C"))) The following graph…
blehman
  • 1,870
  • 7
  • 28
  • 39
2
votes
1 answer

Fancy fieldset legend

I am trying to html'ify a design in which a video has a border around it, and on the border a title. The perfect way to accomplish this is with a fieldset and legand tag, however, I need to get fancy with the styling, anyone have an idea of how to…
Layton Everson
  • 1,148
  • 9
  • 18
2
votes
1 answer

color key legend in r

I am trying hard to figure out to add color gridient label to my plot ( link to previous question). Sorry for keep asking but this is maximum I could push me forward. #data 1: lab1 <- 1:10 group <- rep(1:3, each = length (lab1)) label <- rep(lab1,…
shNIL
  • 963
  • 10
  • 24
1
vote
1 answer

Multicolumn legend in Matlab

I would like to be able to create a legend to have a number of columns given (for default the legend function has an unique column in Matlab). In the code written below, for example, I need three columns in the legend so this would have two rows…
julianfperez
  • 1,726
  • 5
  • 38
  • 69
1
vote
2 answers

FontSize for the image's legend in Matlab

I have the following code: X = 0:pi/100:0.25*pi; Y1 = sin(X); Y2 = cos(X); Y3 = tan(X); fh = figure('toolbar','none','menubar','none','Units','characters'); Pan1 = uipanel(fh,'Units','normalized','Position',[0 0 0.5 1],'title',... 'Panel1'); Pan2…
julianfperez
  • 1,726
  • 5
  • 38
  • 69