similar to: legend on trellis plot

Displaying 20 results from an estimated 7000 matches similar to: "legend on trellis plot"

2006 Jul 19
2
trellis.focus with postscript device
Hello. First: R 2.3.1 on Windows XP. I am trying to add information (sample size) to the Trellis strips which I am successful using the trellis.focus function with the default Windows device. However, I typically use the postscript device as I use LaTeX and \includegraphic for incorporating graphs into stat reviews. Here's some example code (apologies for the lack of creativity and
2009 Nov 23
3
Trellis Plot
anyone know how to add text in the Trellis plot panel ?? i want to add things eg: dot dot dot. in the headrer of the panel. eg: http://old.nabble.com/file/p26486579/hist1.png hist1.png -- View this message in context: http://old.nabble.com/Trellis-Plot-tp26486579p26486579.html Sent from the R help mailing list archive at Nabble.com.
2008 Dec 31
2
Lattice trellis.focus() with pdf
Hi, I have a the code for a plot that works perfectly running in R and printing to a Quartz object but which doesn't work when I make the trellis device a pdf. The code is as follows: ---- trellis.device(device="pdf", new=TRUE) trellis.par.set(my.theme()) dotplot(Y ~ X | C, groups=G, data=D, layout=c(2,1), ... ) trellis.focus("panel", 1, 1) for (y in 1:5) {
2006 Apr 13
1
panel.abline() and trellis.focus() on multipage plots
Hi, I'm recently working on a multipage bwplot() using the lattice package. In this context I was trying to use the panel.abline() function individually on certain panels but not all. After some research I found the trellis.focus() and trellis.unfocus() functions which enabled me to do something like: trellis.focus("panel", 1, 3) do.call("panel.abline", list
2012 Dec 11
1
Focus on a sub-panel of a splom with trellis.focs() -- return coordinate of sub-panel, or names of variables therein
Hi, I'd like to be able to generate a splom plot in R and then use my mouse to click on one of the sub-panels (panel.pairs, specifically) and have R return either the coordinates of that sub-panel, or even better, the names of the corresponding variables plotted in that sub-panel. Here's an example to work with: > library(lattice) > splom(~iris[1:4], groups = Species, data = iris,
2009 May 18
2
Superscripts and subscripts in trellis graphics
I'd like to annotate an xyplot with an R^2 value, but can not find the syntax to define the superscript format for the text. I'd appreciate suggestions, xyplot(SharkSloughEggs.df$Sharkeggs.rel + SharkSloughEggs.df$SharkHatched.rel + SharkSloughEggs.df$SharkFlooded.rel + HSI.shark$MEAN ~ Year, pch=c(1,9,5,4), lty=c(1,6,3,4), lwd = c(2), col = c("black",
2007 Mar 22
2
unexpected behavior of trellis calls inside a user-defined function
I am making a battery of levelplots and wireframes for several fitted models. I wrote a function that takes the fitted model object as the sole argument and produces these plots. Various strange behavior ensued, but I have identified one very concrete issue (illustrated below): when my figure-drawing function includes the addition of points/lines to trellis plots, some of the
2004 Nov 29
1
Call to trellis.focus(); thenpanel.superpose()
The following works fine with the x11 device, though it may well be that an initial plot is overwritten. With a pdf or postscript device, I get two plots, the first of which still has the red border from having the focus, while the second is the plot that I want. library(lattice); library(grid) plt <- xyplot(uptake ~ conc, groups=Plant, data=CO2) print(plt)
2012 Jul 13
2
minor axis ticks in trellis graphics?
Dear R users, I need to add minor axis ticks to my graph. In traditional R this is easily achievable by simply adding a second axis with the minor ticks. But how to do that in trellis? I am already out of ideas. Any suggestions will be appreciated. Best regards, Martin ----------------------------------------------------------------- ?????????? ??????????? ? ?????? ?? ??????????
2009 Nov 26
1
Adding text in the panels for Trellis plot ...
i was trying to do a for loop for plotting the histograms , but it doesnt work properly > library(lattice) > columns <- 8:153 > plots <- vector("list", length(columns)) > j <- 0 > for (i in columns) + { + plots[[ j <- j+1 ]] <- histogram( ~ data[,i] | data[,2],ylab = "Frequency", + xlab = "Score", xlim = c(1,5), ylim =
2006 Jul 29
3
placing rectangle behind plot
I am trying to create a lattice plot and would like to later, i.e. after the plot is drawn, add a grey rectangle behind a portion of it. The following works except that the rectrangle is on top of and obscures a portion of the chart. I also tried adding col = "transparent" to the gpar list but that did not help -- I am on windows and perhaps the windows device does not support
2012 Apr 07
6
Drawing a line in xyplot
i am trying to replicate the following graph using xyplot : attach(x) plot ( jitter(type), mortality, pch=16, xlim = c(0.25, 3.75)) lines ( c(1-0.375,1.375) , c ( median(mortality[type==1]), median(mortality[type==1])), lwd=5,col=2) lines ( c(2-0.375,2.375) , c ( median(mortality[type==2]), median(mortality[type==2])), lwd=5,col=2) lines ( c(3-0.375,3.375) , c ( median(mortality[type==3]),
2011 Mar 30
1
How to put line linking two plots
Hello! Suppose I have three charts like below. The top chart is a general overview and the bottom charts are related so some point of this chart. To make clear this relationship I want to draw a line between (4,0.9) in the top chart and (10,1) in the bottom-left one. Currently I add it manually using Inkscape on the resulting pdf file. Is it possible to add it inside R? Should I switch to other
2011 Oct 08
2
Connecting points over missing observations in Lattice
Hello, I'm trying to plot connected time series of two variables in a lattice plot: xyplot(y1 + y2 ~ t, data=size, type="b") y2 has missing data for some of the observations and some points are therefore not connected. It would make theoretical sense to connect the points - is there a way of doing that? (Without filling the obserations using package 'zoo'). Thanks,
2013 Jan 26
2
different legends in lattice panels
Hi listers, I want to make lattice plots xyplots with the indication of legends inside each panel with only the points and the lines actually ploted inside each given panel according to the group(ing) factor. The code below shows what I have achieved so far and I hope will make clear what I want to have. It seems to me that my solution is a very "dirty hack" and there certainly is
2009 Feb 03
2
Lattice histogram with vertical lines
I would like to add some vertical lines to a lattice plot of histograms. What I am after is a lattice version of abline(v = 1234). The lattice histogram plot is just: histogram( ~ LTSE | approach, data = arrivals) Can anyone point me in the right direction for this? David Scott _________________________________________________________________ David Scott Department of Statistics The
2006 Aug 29
2
lattice and several groups
Dear R-list, I would like to use the lattice library to show several groups on the same graph. Here's my example : ## the data f1 <- factor(c("mod1","mod2","mod3"),levels=c("mod1","mod2","mod3")) f1 <- rep(f1,3) f2 <-
2006 Sep 29
1
Plotting text with lattice
Hello, I've decided to take the leap and try my hand at the lattice package, though I am getting stuck at what one might consider a trivial problem, plotting text at a point in a graph. Apologies in advance if (that) I'm missing something extremely basic. Consider in base graphics: > plot(1:10) > text(2, 4, "Text") In the above you will see text centered at the point (2,
2007 Apr 27
1
add arrows to barchart with groups
Hello Rhelpers, I am trying to represent the following data (hereafter named donnees) in a barchart with a grouping variable : site traitement date s res 1 NT 17/10/2005 normal 76.2 1 T 17/10/2005 normal 103.2 1 NT 23/11/2005 tardif 81.6 1 T 23/11/2005 tardif 98 2 NT 15/10/2005 normal 72.71 2 T 15/10/2005 normal 94.47 2 NT 15/11/2005 tardif 79.65 2 T 15/11/2005 tardif 94.7
2008 Feb 05
2
dynamically add items to key of lattice xyplot
Hi all, is it possible to dynamically add key items to an already existing key, belonging to a lattice xyplot? This is what I do: I make an xyplot with an initial key. Later on, I want to extend this key with more items, as more lines are added to the plot (lines are added using trellis.focus("panel")). I guess I need some function to access the key panel in order to extend it,