similar to: Unwanted boxes in legend

Displaying 20 results from an estimated 10000 matches similar to: "Unwanted boxes in legend"

2010 Apr 15
1
Alignment of x-axis labels
Dear all, I'm having trouble getting the correct spacing between x-axis labels on a barplot. This is the command I'm using to generate the plot: temp <- barplot(precip, beside=TRUE, xaxt="n", las=1, xpd=FALSE, col="grey28", ylim=c(0, max(precip))) Here is the structure of temp: > str(temp) ?num [1:96, 1] 0.7 1.9 3.1 4.3 5.5 6.7 7.9 9.1 10.3 11.5 ... And here
2003 Dec 12
1
legend() graphics output bug (PR#5725)
Full_Name: Daniel Gasser Version: 1.8.1 OS: Win XP Submission from: (NULL) (130.60.20.92) The legend()-Function shows a different behaviour than it did in Version 1.6.1. It plots a black box left of the legend lines on each legend row. In 1.6.1 there was just the line in appropriate color for each row in the legend (i was using exactly the same legend statement and same plot function). My legend
2013 May 12
1
How to center a horizontal legend with specified 'text.width'
Hello dear list, I just cannot figure out how to do this and didn't find a solution for my specific problem. I want to place a centered horizontal legend between 4 plots. That's no problem. The problem is: As soon as I specify the "text.width" parameter to separate the two legend entries, the legend is not centered anymore. I thought the 'xjust' parameter would do what
2010 Feb 21
2
Newbie woes with par:mar
I have a simple barchart with horizontal bars and horizontal tick labels, produced with barplot(x, horiz = T, names.arg = c, las = 1) The labels are longish strings, truncated on the plot. I wish to leave more space for the left margin, and experiment with mar parameter, barplot(x, horiz = T, names.arg = c, las = 1, mar = c(5, 15, 4, 2)) trying various values for the second vector element, but
2012 Aug 15
1
legend position help
Hi there, I draw a multiple figure in one plot, like the following: par(mfcol=c(1,5),mar=c(4,4,0,0)+0.2, oma=c(0,0,3,0)) plot(1:10, type = "b") plot(1:10, type = "b") plot(1:10, type = "b") plot(1:10, type = "b") plot(1:10, type = "b") Now, I hope to plot the legend like the following: legend("top", legend=c("Example"), pch
2000 May 31
1
legend with multiple columns
I have made a minor hack to "legend" (in R 1.0.0, but I didn't notice any changes to legend in the 1.0.1 NEWS) to allow the legend to be formatted in multiple columns, or horizontally (number of columns <- number of legend items). (I find this helpful when I have lots of legend items and not a lot of vertical space to squeeze the legend into.) (Another hack I've considered
2017 Nov 20
0
change colour in barplot
On 20/11/2017 6:38 AM, Maria Lathouri via R-help wrote: > Dear all > I know that it is a very simple question but it seems that I cannot change the colour in the bars. > I have the following dataframe: > A ? ? ? ? ? ? ? ?? B ? ? ? ? ? ? ? ? C ? ? ? ? ? D ? ? ? ?? E ? ? ? ? ? ? ? ? ?? F ? ? ? ? ? ? ? ? ?? G ? ? ? ? ? ? ? ?0.0.24 ? ? ? ?? 152460 ? ? ? ? 474 ? ? ? 5.5 ? ? ?? 612000 ? ?
2017 Nov 20
3
Σχετ: change colour in barplot
Dear all,? I am really sorry for this. I have attached the script and a .csv file with an example.? Hope this will help. Many thanks,Maria ???? 11:53 ?.?. ???????, 20 ????????? 2017, ?/? Duncan Murdoch <murdoch.duncan at gmail.com> ??????: On 20/11/2017 6:38 AM, Maria Lathouri via R-help wrote: >? Dear all > I know that it is a very simple question but it seems that I cannot
2017 Nov 20
0
Σχετ: change colour in barplot
On 20/11/2017 7:09 AM, Maria Lathouri wrote: > Dear all, > > I am really sorry for this. I have attached the script and a .csv file > with an example. The problem is that you have dat as a matrix with only one row. barplot() applies the colours to the rows of dat; since you have only one row, everything ends up blue. You can fix this by creating dat as a vector using
2017 Nov 20
2
change colour in barplot
Dear all I know that it is a very simple question but it seems that I cannot change the colour in the bars. I have the following dataframe:? A ? ? ? ? ? ? ? ?? B ? ? ? ? ? ? ? ? C ? ? ? ? ? D ? ? ? ?? E ? ? ? ? ? ? ? ? ?? F ? ? ? ? ? ? ? ? ?? G ? ? ? ? ? ? ? ?0.0.24 ? ? ? ?? 152460 ? ? ? ? 474 ? ? ? 5.5 ? ? ?? 612000 ? ? ? ? ? 59061000 ? ? ? 1540313 and here is the script:
2012 Aug 01
2
How to increase lenght of axis according input data?
Hi, I am working on barplot. I need to plot x-axis but scale on x axis is very upto 15 while my data is upto 19. pdf("image.pdf", width=10 , height =13) par(mar=c(5,22.5,2,2)) barplot(t(data[,2:3]), beside=TRUE, col=c(rgb(.537, .769, .933),rgb(.059, .412, .659)), width = 1, horiz=TRUE,cex.names=.9, border ="white",las=1, cex.axis= 1, cex.lab=1.2)
2007 Sep 25
3
Legend
I have following syntax for putting a legend : legend("bottom", fill=c("red","blue"), legend=expression(p==0.30, p==0.50), bty="n") However what I want is that : the value "0.30" should be a value of a variable instead of a constant, so that I can put the name of this variable and in legend it's value will be displayed. Can anyone tell me how
2004 Aug 20
0
legend lwd - feature request (PR#7023)
Lfo@psykiatri.aaa.dk wrote: > (R1.9.1 Windows) > > In legend( ) lwd have no effect on points - contrary to the behaviour > in e.g. plot( ) and points( ). It would be nice to have an option pt.lwd > affecting the line width of legend points (like pt.cex changes the > magnification). > > > An example (note the difference in line width between points in the > plot
2012 Jan 21
2
Legend that is big?
I can put a legend on a plot with something like: legend('bottom', leg.txt, horiz = TRUE, fill = colors) But what if the arrays leg.txt and colors are too big? I would still like to provide a legend but to save space I would like to just show small boxes with the color filled in so it will still fit on the plot. If I could adjust the size of the boxes (at least in one dimension)
2010 Jan 12
1
Multiple symbols per single line in a legend
Hello everybody, Is it possible to coax legend() into displaying more than one simbol per line in legend? I have a graph like the one attached to this mail; I would like to reorganize the legend in such a way that the duplicate text would be omitted, i.e., the first line would read <square> <triangledown> "increasing frequency" and the second one would read <circle>
2008 Feb 18
1
Plotting a legend outside the figure - units
Dear R gurus, I am trying to plot a legend in the margins of a figure. The basic idea is to have two (or more) plots on the same figure, but then to have a common legend at the bottom of the plot. The approach that I have taken is to setup the figures, then do a "dummy" plot of the legend to determine the height of the legend box (ie from the value returned by the legend() command). I
2011 Nov 24
1
Legend
Hi everyone. I have a linear regression where I retrieve the R2 like this: r2 = sprintf('%4.2f %s',(summary(reg1)$r.squared)) In my figure I have a legend where I would like to add that R2 value to the legend text. Something like: My text R^2 = r2 legend('topright', inset = .05, title='light ratios', pch = c(21), c(paste('Green/Red', R^2, '=', r2)),
2010 Feb 05
1
About graphics
Hi, I'm building a graph (barplot) in which the X axis label disappears. I tried to use the option mgp of par() and I could not get the desired result. Note that want the axis labels horizontally. caes = c(37,20,19,16,75,103) names(caes) = c("Pinscher", "Pastor \n Alem?o", "Poodle", "Rottweiller", "SRD", "Outros") caess =
2010 Oct 18
0
Question about legend parameters
Hello! The code below works - if you run it you'll see a stacked area chart generated based on the data example. I only have one understanding question about the legend location (the very last snippet of code): legend(par()$usr[2], mean(par()$usr[3:4]), rev(order.of.vars), xpd=T, bty="n", pch=15, col=all.colors[rev(order.of.colors)]) I see that par()$usr[2] = 14763.72
2011 Jun 24
1
try to generate graph for each element of my list
Dear all, I have the following problem. I have a List of time series dataframe.I'm trying to produce specific graph for each element of my list. The code is: This is my list: Lista_import<-lapply(Lista_import, function(x){ x2<-subset(x, select=c("ANNO","DICHIARANTE","PARTNER", "quota")) x2<-cast(x2, ANNO+DICHIARANTE~PARTNER) x2<-