similar to: Does pdf() not work on Trellis graphics?

Displaying 20 results from an estimated 10000 matches similar to: "Does pdf() not work on Trellis graphics?"

2003 Sep 18
1
lattice, trellis.device, dev.off() within a condition (seems t o be a bug)
Hi, I have a strange issue under W2K; consider these two code extracts: 1) if(condition a){ trellis.device(png,filename = filename_a,... xyplot(... dev.off() } 2) if(condition a){ trellis.device(png,filename = filename_a,... xyplot(... } dev.off() In 1), The png file is generated, but empty; in 2), where I've taken the dev.off clause out of the condition block, my plot is
2007 Jun 12
1
2 Trellis graphics question
1) I have a data that includes some "bad" data. I want to make a trellis plot where each panel contains a) A scatter plot of the "good" data b) A scatter plot of the "bad" data in a different color c) A best fit line of all the data, and d) A best fit line of the "good" data. I tried using xyplot and setting the "group" argument, but I'm
2003 May 13
1
several regression lines in panel of xyplot (trellis graphics)
Dear r-help, I need to draw xyplot() graphs with several regression lines: one line for the whole range of x (the variable on the horizontal axis) and two additional lines for subranges of x. Is it possible to make first regression line (panel.lmline(x,y,...);) to be drawn on the whole graph and regression lines of the subsets to be drawn only over their subsets? I have defined
2005 Jan 30
3
trellis graphics in loops
I have this awkward problem with trellis (lattice). I am trying to generate some plots through loops but the .eps file is empty. When I generate them in a list and print them outside the loop all is fine. this is an example below:( nothing shows up in foo.eps, but all show up in foo1.eps) R vesion 2.0.1, lattice version 0.10-16, on a debian 2.6.8-1 kernel. X <- data.frame(x=rnorm(10000),
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 Jun 13
1
Annotating trellis graphics
I'm using xyplot to generate a trellis plot with each panel containing a scatterplot and a best fit line. Is it possible to write the slope of the best fit line in each panel? -- Alan S Barnett <asb at mail.nih.gov> NIMH/CBDB
2007 Jul 13
3
Direction of panel plots in trellis graphics
Hi, Using library(lattice), is there any way to tell xyplot to plot panels top to bottom, then left to right (i.e. panels are appended vertically, then horizontally). as.table changes the plot direction from left-to-right then top-to-bottom, to right-to-left then bottom- to-top, but that's not quite what I want to do. Thanks Yan
2007 Jan 03
2
Lattice / Trellis analog of axis(graphics) ?
My question is so basic that I am (almost too) embarrassed to admit that I could not find an answer after an hour's worth of homework. What is the Trellis / Lattice analog for the axis(graphics) function that enables the creation of axes in locations other than the default (i.e., bottom for X axis and right for Y axis) ? For example when plotting mileage against weight (in American
2007 Apr 13
1
trouble getting b&w plots using trellis graphics
I'm having trouble getting a black and white plot using the trellis device. I have color graphics, but I'd like to use b&w for a paper. For example, trellis.device(color=F) d <- read.table(textConnection(" A,B 0,1 1,2"), header=T, sep=",") xyplot(A ~ B, data=d, type="o", lty=c(1:2), col=2, pch=19:20) dev.off() gives me a red line even though I
2007 May 26
3
learning lattice graphics
Hi, I've just produced my first lattice plot - the graphic is very impressive, but I only partly understand how it works. I crimped from examples in MASS and the help pages to get most of what I want done. Howver, I find both MASS and the help pages are a little too terse for my needs as a beginner. Can anyone suggest web or print resources for lattice graphics that provide a more thorough
2007 Mar 28
1
is this trellis device or standard graphics device?
OK, here is the issue: I have a graphcis device (say X11) which I can set as active by dev.set(n). Is there ANY way to identify/infer whether this X11 device was obtained from a lattice function (like xyplot, levelplot...) or a standard function (like plot, scatterplot,...). A related question is whether plot.new (or frame) was called to obtain this graphics device... Thanks. PK
2006 Dec 09
0
Survfit plots in trellis graphics
Dear all, is there a way to produce survfit plots in a trellis environment? I am trying this: print(Ecdf(~time | size*type, groups=alg,data=B,subscripts=TRUE, panel=function(x,groups,subscripts) { t <- survfit(Surv(time[subscripts],event[subscripts])~groups[subscripts],data=B,conf.type="none")
2008 Nov 11
1
Retrieving x argument name from a trellis object in R 2.8.0
Dear all, let consider the following function: Fun1 <- function() { library(lattice) plot1 <- 1:10~1:10 pl1 <- xyplot(plot1) return(pl1$call$x) } In R 2.5.0 (or older version) we have > Fun1() plot1 but starting from R 2.5.1 until the latest R 2.8.0 we obtain instead > Fun1() NULL because pl1$call seems to be equal to xyplot() without arguments. Something like
2010 Nov 26
3
lattice: strange behavior (?) when using trellis.device(color=FALSE)
Dear expeRts, I am not sure if I found a bug... I would like to create a function that itself creates a lattice plot without colors. Following http://www.mail-archive.com/r-help at r-project.org/msg64699.html I use trellis.device() to set the colors to FALSE. Whenever I call the minimal example below *with* trellis.device(), Quartz opens a window (I am working on a MAC), which it shouldn't,
2007 Aug 05
1
setup trellis.device to color=F inside the xyplot function
Hi, it is possible to setup trellis.device(color=F) inside teh function xyplot? I try to use > xyplot(ocup~tempo| nitro+estacao,col="white",ylim=c(0,0.7),par.settings=list(color=F)) But dont work, the only way that work for me is call the function > trellis.device(color=F) before the xyplot, but in this way it open a new device for each run. I like that is use the same
2009 Nov 13
1
Trellis settings get lost when printing to pdf
Hi all, I've got some problems when changing the trellis settings for the lattice plots. The plots look exactly as I want them to when calling show.settings() as well as when plotting them in the graphical window. But when printing to a pdf file, none of the settings are used!? Does anyone know what might have happened? Because the when changing the trellis settings, these should remain in
2008 Nov 19
1
Buggy trellis.focus() with xyplot ?
Hi: (Tried to find a bug report about this issue, but was unable to find it, let me know if this is a known issue) I have been working on an interface to highlight xyplot panels on mouse overs in JavaGD but I have stumbled with what seems to be a bug in trellis.focus. I am using R 2.8 with lattice 0.17-15 *** To replicate the bug: 1.- display an xyplot. For example, from the xyplot help page:
2006 Mar 01
1
postscript bounding box in trellis/lattice plot is wrong ?
Hi, a problem involving postscript bounding boxes: I'm composing three scatterplots into a single figure, postsript for publication. The individual scatterplots should be square, so the overall figure should have a roughly 1:3 sort of aspect ratio. By default however, the overall figure comes out nearly square, and the scatterplots are stretched vertically. I fixed this by adding
2004 Jul 22
1
sorting Trellis panels
Can anyone explain how to properly use index.cond? I cannot include it in the xyplot command and get what I expect. For example, plot<-xyplot(y ~ x | z, data) # let's say z is a factor with six levels gives a nice plot but I am unhappy with the order of panels. I can get the order I want by plot$index.plot[[1]]<-c(1,6,4,3,2,5) I cannot seem to get it with either
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 ----------------------------------------------------------------- ?????????? ??????????? ? ?????? ?? ??????????