similar to: legend placement

Displaying 20 results from an estimated 20000 matches similar to: "legend placement"

2008 Oct 06
2
Stacked area chart and legends
I have found lots of good advice on this forum about stacked area charts but I?ve run into problems with the 2 recommended options: stackploy in plotrix or qplot in ggplot2. I have a many page report that will be in a 2x2 page format ?par(mfrow=c(2,2))?? and need one of the page components to be a stacked chart. I?d prefer to use stackpoly, if possible, but I?m stuck on how to do the legend in
2008 Jul 08
6
Automatic placement of Legends
Dear R-Users, I am looking for a way to get legends placed automagically in an empty spot on a graph. Additional complication comes through my useage of multiple graphs on the same plot through mfrow. Is there a way to achieve this in R ? I have legends for each of the sub-plots. Many thanks in advance, Tolga Generally, this communication is for informational purposes only and it is not
2008 Apr 10
6
How to create a legend without plot, and to use scientific notation for axes label ?
Hi, I have a 3 by 2 plots per page, and would like to place a legend on the last region. How to do that ? Also, is there any way to specify scientific notation for axes label ? [[alternative HTML version deleted]]
2008 Feb 01
1
problem getting multiple densityplots on one page
Hi, I used the following statements to generate unsuccessfully a 5 by 5 multiple densityplots on a single page. If I use plot, the whole thing works. > data <- matrix(rnorm(25), 5, 5) > op <- par(mfrow = c(5, 5)) > for (x in 1:5) {densityplot(data[,x])} > par(op) Thanks Stanley [[alternative HTML version deleted]]
2008 Sep 04
2
Adding a legend to R graph device with several plots (no to individual plots!)
Dear Users, I already posted this question: it either went unnoticed, or it is to basic (if this is so, please sent me a hint). I would like to know if there is a way to add a common legend to an arrangement of plots. In the example below, I get four plots in my device. each one has a density for 1995 and one for 2006. I have found that using legend or smartlegend I can add a legend to each plot,
2010 Jan 29
1
How to draw a border for multiple graphs in one page
Hi, I am struggling to create a 2 by 2 multiple graphs in one page. I used par(mfrow=c(2,2)) to divide the screen into 4. In each screen I draw a pie chart (They are all same). For example, my data is like this Concentration value A1 69 A2 8 G1 51 G2 1
2007 Dec 31
3
stack charts right on top of each other
Hi, I tried to stack two charts on top of each other using the following R functions: par(mfrow=c(2,1)) plot(rnorm(1:3),xaxt="n",xlab="") plot(rnorm(1:3)) This created two charts, one on top of the other, but there is too much space between them. Does anyone know how to elimiate the space in between the charts? Thanks, -- Tom [[alternative HTML version deleted]]
2005 Aug 16
1
Overall Legend
Hello. I am using R version 2.1.1 on Windows 2000. I am using a par(mfrow=c(2,2)) statement to produce 4 plots on one screen. I want a single horizontal legend to appear at the top of the four plots. My code is something like this: par(mfrow=c(2,2)) plot(x,y1) lines(x,y2) lines(x,y3) plot(x,z1) lines(x,z2) lines(x,z3) plot(x,t1) lines(x,t2) lines(x,t3) plot(x,w1) lines(x,w2) lines(x,w3)
2008 Feb 13
3
indices of rows containing one or more elements >0
Hi, Given test <- matrix(c(0,2,0,1,3,5), 3,2) > test[test>0] [1] 2 1 3 5 These are values >0 > which(test>0) [1] 2 4 5 6 These are array indices of those values >0 > which(apply(test>0, 1, all)) [1] 2 This gives the row whose elements are all >0 I can't seem to get indices of rows containing one or more elements >0 [[alternative HTML version deleted]]
2008 Mar 05
3
legend for several graphics
Hi, I am trying to generate a figure of 9 plots that are contained in one device by using par(mfrow = c(3,3,)) I would like to have 1 common legend for all 9 plots somewhere outside of the plotting area (as opposed to one legend inside each of the 9 plots, which the function legend() seems to generate by default). Any hint how to do this? Best, Georg
2011 Jul 31
2
Legend for 2 plots on same screen
Hello, I have two plots on the same screen. I use the command par(mfrow=c(1,2)) in order to do this. When I try to make a legend for both plots, it only puts the legend in the plot on the right side. If I would like a legend that is outside of both of the plots, how would I do this? Thanks [[alternative HTML version deleted]]
2006 Apr 10
2
Legend in the outer margin
Dear Rs I have a 3x3 multiple plot. I would like to have a overall legend in the outer right margin. From the help archive, I found that it can be done by setting par(xpd=NA). However, I couldn't find the correct values for x and y co-ordinates for the legend. Please find the code snippet below: par(mfrow=c(3,3), mar=c(4,4,0.9,0.5), oma=c(1,2,2,4),cex.main=1.1)
2005 Jul 04
1
Rotate legends or other approaches to nice legend placement?
I'm sure this general sort of question has been asked many times before - I would _like_ automatic and sensible legend placement in barplots so data is not overwritten... but since there doesn't seem to be one, one of the following would be useful: One approach for this would be to place the legend to the right of the graph, and rotate it by 90 degrees. Is there a sensible way to do
2003 Jan 17
2
Re: Universal legend in plot
Dear R-users: I asked a question on how I can have a universal legend in a plot and received the following result. I tried using "layout" but I can't seem to work on the "empty" plot (where I have to have the legend). I tried "oma" but I couldn't improve the quality of the plot, and that I didn't know how to specify all the line types using the
2004 Nov 03
4
Legend placement in barplot?
This has been asked before, but all the answers are hidiously complex. The legend.text=TRUE option of barplot is almost exactly what I need, except I need a legend.placement='tl' (top left) option. This option would be in contrast to the default placement which we could call 'tr' (top right). Anyone know how to edit the barplot code to make this change? Could someone like me
2010 Nov 05
2
Legend para varios gr�ficos
Hola a todos, Mi pregunta es si hay alguna manera (sencilla/rápida o no) de colocar una leyenda común para dos gráficos colocados en paralelo con par(mfrow=c(1,2)). He probado con par(xpd=NA) y con par("usr") pero no encuentro la solución. Está claro que podría poner la misma leyenda para cada gráfica, pero quedaría mejor con una global para ambos. Muchas gracias de antemano por la
2004 Mar 20
2
labels on axis(4) and adaptation of legend to size of the plot
Hi weekend R helpers, *Is it possible to get a ylabel on the right hand side axis ==> axis(4)? Thankx, Jan opar <- par(mfrow = c(2,1)) plot(ts.Origi[,1],ylab='NDII', main=name) # Add the legend text in the right order legend.txt <- c("NDII", "Inverse KBDI") legend(2001.8,0.29, legend.txt,col=c(1,2), lty=1)
2007 Jun 22
1
Barchart legend position
I am using barchart to make charts for some data with a lot more functions and labels and such in the command. barchart(Freq ~ factor(HH), data = dataset1, group= year) So I have my data grouped by year and I get a legend at the top of graph, which is great cause I need the legend for the different years but it is a weird spot. So how can I manipulate the legend, ie. Move it, shrink it, do
2004 Mar 25
1
Error in 'legend' help?
Dear all, maybe I have misunderstood something but to me it seems like a minor error in the help for ?legend for the argument 'bg'. There it says: bg: the background color for the legend box. (Note that this is only used if 'bty = "n"'.) I think, however, that it should be changed to: bg: the background color for the legend box. (Note that this
2012 Jan 19
1
Legend problem in line charts
Hi all, Small problem in generating the line charts. Question: Legend for the first graph is coming wrong., for second graph correctly. Please fix the legend postion at the down of graph. Plesae give me the solution. Thank you Devarayalu Orange1 <- structure(list(REFID = c(7, 7, 7, 7, 7, 7, 7, 7, 8, 8, 8, 8, 8, 8, 8, 8, 9, 9, 9, 9), ARM = c(1, 1, 1, 1, 2, 2, 2, 2, 1, 1, 1, 1, 2, 2, 2,