similar to: What am I doing wrong with xyplot?

Displaying 20 results from an estimated 20000 matches similar to: "What am I doing wrong with xyplot?"

2002 Apr 30
0
Re What am I doing wrong with xyplot?
G'day A quick followup is that it doesn't always happen. I managed to reproduce it on a fresh start-up by adding the two lines indicated by arrows try this: x<-1:10 y<-sin(x) #yes I know it's an under sampled function -> plot(x,y) ###These two lines are required to reproduce the -> lines(x,y) ### behaviour xyplot(y~x) lines(x,y) #at this point the
2011 Feb 21
1
wrong lines in auto.key xyplot
Hi all, I'm having a problem with the auto.key function in xyplot. I changed the symbols an lines styles using these commands trellis.par.set(superpose.symbol=list(pch=c(0,1,2,3,4,5,6,8,15,16))) trellis.par.set(superpose.symbol=list(col=c(rep("black",11)))) trellis.par.set(superpose.symbol=list(cex=c(rep(0.6,11))))
2008 Jul 21
0
xyplot: distance between axis and axis-label gets wrong
Hi! I just started reading the wonderful Lattice book and I finally found a quite elegant solution for nicer log-ticks. However, there are some problems with the spacing between the axis label and the axis tick marks. It seems that lattice estimates the space wich gets used by the labels before it calls the yscale.components function. However, this function can change what is supposed to be
2002 Jun 06
0
Thanks and Summary (was par(new=T) with xyplot)
Thanks very much to Paul Murrell and Frank Harrell for addressing my original query (repeated at end of this note). Paul's helpful suggestion with print.trellis and its more= argument, followed by trellis settings, works precisely as I needed. > # snipped from Paul's reply: > p1 <- xyplot(y ~ x, ylim=c(-5, 5)) > p2 <- xyplot(y2 ~ x, pch=16, ylim=c(-5, 5), ylab="
2002 Jun 05
2
par(new=T) with xyplot
I know I should not mix base plotting functions with grid/lattice functions, but I have used a "quick-and-dirty" trick of par(new=T) in the past for annotating a trellis-drawn graph in various versions of S-PLUS. The sequence goes something like this: > windows(width = 5, height = 5, pointsize = 10) # open up the device > xyplot(y ~ x) > par(new=T) > xyplot(y2 ~ x) >
2008 Dec 07
1
custom panel help in lattice
Hi, I am having an issue with a custom panel for lattice. The problem comes when I try passing a groups argument. Here is the custom panel, a wrapper for smooth spline. I copied panel.loess and replaced the loess arguments with smooth.spline(). [Note: I would like to use the cross-validation fitting properties of smooth.spline.] library(lattice)
2002 Apr 03
3
Segmentation fault with xyplot
Hi - Are there any known bugs or other issues that may cause R to crash when trying to use xyplot()? For example, > x<-1:100 > y<-rnorm(100) > library(lattice) Loading required package: grid > xyplot(y~x) causes this: Process R segmentation fault at Wed Apr 3 16:56:42 2002 I am running linux debian unstable on i386. R says it is R 1.5.0 in the header text when starting but
2010 Jun 18
1
ow to apply a panel function to each of several data series plotted on the same graph in lattice
Hi is it possible to fit a trend line (or some other panel function) through each of multiple data series plotted on the same graph? Specifically, while one can do something like xyplot(a+b+c~x) which plots three series, a,b & c, but can one automatically fit lines through each of them? I suppose one could generate three more variables afit, bfit, and cfit with a model & predict and
2004 Jul 29
1
Lattice graphics: adding lines to a plot
I am trying to use the Lattice package to produce the same result as I can with the base graphics. With base graphics I can type: x <- 1:100 y <- x+rnorm(length(x)) g <- lm( y ~ x ) model.y <- g$coef[1]+g$coef[2]*x plot(x,y) # a plot of the data lines( x, model.y ) # a plot of the model, superimposed on the first plot With Lattice graphics I've got this far:
2002 Apr 17
1
No output from (lattice) xyplot called within loops
Hello >From the following script I received a grafic output when I called: - xyplot.test( 'green3' ) - call.xyplot.test( 'blue3' ) I did NOT receive a grafic output when I called: - loop.xyplot.test( 'red3' ) What's the Problem? NB: I am using R 1.4.1 on Linux. --------- START OF SCRIPT ---------------- n <- 1000 x <- seq( 1, n ) y <- rnorm( n )
2010 Jan 10
3
How to control spaces between axis, tick and label in xyplot or xYplot?
Dear R users, I encounter a problem regarding space control in xyplot. Basically, I want to control spaces between label, tick and axis. I remember there is a function called mgp in general plot. Is there a similar function for xyplot or xYplot? Below is my basic code: myplotkid<-xyplot(expected_offspringnumber~afr|decade,groups=SES,data1,
2004 Jul 16
1
highlighting subset of point with xyplot (or Hmisc(xYplot))
Hello all, I am trying to use xyplot to give a six panel plot and to highlight only points (in any panel) that meet a certain criterion. With the plot command I would do something like: plot.default(filein$Site,filein$circ.conc) points(filein$Site,filein$circ.conc,type="p", pch=ifelse(filein$p.value<5e-02,19,21)) I had thought I could just stick in the pch line from above into
2004 Mar 26
1
xyplot inside a for loop problem
Hello everyone Could someone please explain me why are xyplot() calls inside a for loop unsuccessful? Calling plot() is OK but xyplot() just opens the graphics window and that is all. No error, no warning :-( The same xyplot() outside for loop works fine. --------------------------------------------------------- library(lattice) # OK: plot(1,2,type='p',main='standalone plot') #
2007 Apr 21
0
possible bug in xYplot and smean.cl.normal
I'm using R (2.4.1) and Hmisc (3.3-1), and I'd like to plot confidence intervals using xYplot and smean.cl.normal (or smean.cl.boot) from Hmisc. You can do that using the summarize() to produce a new data.frame and then plot with xYplot, or by specifying method=smean.cl.normal in the xYplot. Both produce very similar graphs in all trivial examples I've tried, but not in the attached
2006 Jun 08
1
panel.abline and xyplot
Dear All, I am wondering on how to use the abline.xyplot with xyplot such that I will have different vertical lines for each panel. More sepcifically, suppose that the xyplot generates 4 panels defined by the combination of two binary variables: X_1 and X_2. i.e. xyplot(Y ~ Z | X_1*X_2, data = df) I want something like: abline(v = 5) if X_1=0 and X_2 = 0 abline(v =
2005 Mar 17
0
xyplot w/ panel.lmline "solution"
Dear Sebastian Luque (and All R Users) With the following code I managed to plot different characters and regression lines for panels 2 ("Day of year 101") and >4 ("Days of year" 151, 157 and 172): xyplot(log(no.larvae)~age.cls|factor(day),data=mortal, layout=c(7,1),aspect=5/3, xlab="Age class (d)",ylab="Ln(Abundance)",
2005 Jun 22
1
How to use expression in label with xYplot
Dear R-List, I want to use the label function (from Hmisc library) to allow for the names of my isotopes. library(Hmisc) library(lattice) library(grid) num <- c("78","137","129m") nom <- c("Ge","Cs","Te") df <- data.frame(GE78=seq(nom),CS137=seq(nom),TE129m=seq(nom)) if I use this function to create the labels : lab <-
2006 Oct 03
1
postcript file / xyplot function [Broadcast]
This is FAQ 7.22. Lattice functions produce graphic objects, which are not displayed by default. If you print your graph, you should be fine. Also, take a look at the documentation for panel.xyplot. Using type = c("p", "r") should make things simpler. Regards, Matt Wiener -----Original Message----- From: r-help-bounces at stat.math.ethz.ch [mailto:r-help-bounces at
2006 Dec 15
1
xyplot: logarithmic y-axis
This should be simple but I am struggling. I like to easily switch in xyplot between a linear or logarithmic y-axis by setting a logical flag logY to False or True. This switch changes the scales argument of xyplot. I found out that the original two-dimentional data (Conc vs Time in my case) are converted to log10(Conc) if log=TRUE in scales, but it appears that functions like panel.curve need to
2007 Aug 30
1
xyplot() groups scope issue
Hi all, Tinkering with a wrapper for xyplot that will help me plot a bunch of plots in a data analysis I'm doing and I ran into an odd error that I'm guessing is a scope issue. Here's a very simple version of the code: ############### #load lattice library(lattice) #create the wrapper function do.xyplot = function( plot.formula, data.frame, plot.groups){ print(plot.groups)