search for: lline

Displaying 20 results from an estimated 43 matches for "lline".

Did you mean: line
2005 Oct 29
1
Problem with llines in lattice
Dear r-help list members, I'm experiencing problems getting type="b" (or "o" or "c") to work in llines(). Try, e.g., the following scaled-down example: x <- factor(c("a", "b", "a", "b")) y <- c(1,2,1,2) z <- factor(c("A", "A", "B", "B")) symbols <- 1:2 lines <- 1:2 colors <- 1:2 zvals <- levels(z)...
2002 Apr 22
2
lattice x(y)lab and expression
Another question about lattice: Is there a way to use plotmath in the labels and strips? E.g. xyplot(y~x|group,data=test.df, panel=function(x,y,subscripts,df) { llines(x,y,col="black",lwd=2) llines(x,df[subscripts,"lowerCI"],lty=2,col="#aaaaaa") llines(x,df[subscripts,"upperCI"],lty=2,col="#aaaaaa") }, strip=function(...) { # not sure what to put here # but I woul...
2007 Sep 07
1
contourplot lines, text, and mtext
If I have a contourplot (in the lattice package) and I want to add straight lines to it, how do I do this? I see that there are llines() and lsegement() functions for lattice plots, but they don't seem to do anything in this case: library(lattice) library(KernSmooth) x=rnorm(10000) y=x+rnorm(x,0,.5) a=bkde2D(cbind(x,y),.7) z=as.vector(a$fhat) grid=expand.grid(x=a$x1,y=a$x2) grid$z=z contourplot(z~x*y,data=grid,region=T,col....
2007 Sep 03
3
plotting predicted curves with log scale in lattice
...0), 2), FF = factor(rep(letters[1:2], each = 20)) ) library(lattice) xyplot(RR ~ LL | FF, ds1, scales = list(x = list(log = TRUE)), aspect = "xy", subscripts = TRUE, ID = ds2$FF, panel = function(x, y, subscripts, ID, ...) { w <- unique(ds1$FF[subscripts]) llines(log10(ds2$LL[ID == w]), ds2$RR[ID == w], ...) panel.xyplot(x, y, ...) } ) Note that the x-variable of llines must be logged to plot the correct values and so the scales argument seems to apply only to the x, y arguments passed to the panel function. Thank you. best, Ken -- Ken Knobl...
2005 Oct 19
3
adding error bars to lattice plots
Dear R-Users, how to include error bars within lattice? How should the panel = function(x,y,...){ looks like? Does panel.arrows works here as well? I appreciate any help on this. Regards, Mario AT [[alternative HTML version deleted]]
2007 Apr 26
1
xyplot() and controlling panel.polygon()
Dear R-helpers, How do I tell panel.polygon what greoup and panel it applies to whithin xyplot(y ~ x | c, groups = g panel = function(x, y, groups, ...){ panel.polygon(x = xpol[c, g], y = ypol[c, g], default.units = 'native') panel.xYplot(x, y, groups, ...) llines(x = c(1, 6), y = c(-24.283333, 35.941667), lwd = 2, lty = 3, col = 4) } x[c, g] and y[c, g] describe the polygon I want plotted for group g in panel c. _____________________________ Professor Michael Kubovy University of Virginia Department of Psychology USPS: P.O.Box 400400 Charl...
2005 Oct 14
1
lattice with predicted values
...all factor levels, but I can't figure out how to have the same slopes but different intercepts. # Function to draw predictions in xyplot panel.predfinal <- function(mod, x, y) { xfit <- seq(min(x), max(x), length=21) yfit <- predict(mod, newdata=data.frame(COV=xfit)) llines(xfit,yfit,lty=1) } xyplot(Y ~ COV | FACT, panel=function(x,y,groups,subscripts){ panel.xyplot(x,y) panel.predfinal(mod,x,y) } I would be very grateful for pointers (books, chapters, pages, archives) that might have an example of an xyplot in which somethi...
2011 Feb 09
1
add mean and sd to dotplot in each panel using lattice
Hi, I have a data frame like this: ScoreDoseSex 2.81Dose1M 1.81Dose1M 1.22Dose1M 0.81Dose1M 0.49Dose1M 0.22Dose1M 0.00Dose1M -0.19Dose1M -0.17Dose1F -0.32Dose1F -0.46Dose1F -0.58Dose1F -0.70Dose1F -0.81Dose1F -0.91Dose1F -1.00Dose1F -1.77Dose2M -1.85Dose2M -1.93Dose2M -2.00Dose2M -2.07Dose2M -2.14Dose2M -2.20Dose2M -2.26Dose2M -2.32Dose2F -2.38Dose2F -2.17Dose2F -2.49Dose2F -2.54Dose2F
2005 Aug 26
2
dom0 bootup -- Device eth0 has differet mac address than expected
...ifcfg-eth0? Note that a normal bootup into CentOS 4.1 outside of the Grub Xen bootup works fine since it''s sensing the mac address of the NIC in the machine rather than what I suspect is a virtualized mac address that Xen provides upon a Xen bootup. I''ve tried removing the HWADDR= lline in ifcfg-eth0 but that just makes the complaint different and eth0 won''t startup at all inside or outside of Xen. Is there someplace in the vif-bridge script to hardcode this required mac address to line it up with the ifcfg-eth0 HWADDR= mac address or is the place to hardcode a fixed mac...
2002 Aug 12
1
question about cloud() in lattice package
Hi all, I have been previously been using scatterplot3d package to create some graphs but unfortunately it does not allow me to rotate the plot on all three axis. The cloud() function in the lattice package does allow me to do so. When I was using scatterplot3d I was using a script (Shown Below) to calculate the mean, quartiles and range limits for all three axis and I was representing that on the
2010 Aug 18
1
syntax for batching rbind process
Dear helpeRs, I am attempting to read in a series of csv files so I can bind them into one large dataframe. I have written the following script: test <- list.files(".", pattern = "csv") #lline 1 imp <- list() #line 2 for (i in 1:length(test)) { #line 3 imp[i] <- read.csv(test[i]) #line 4 } #line 5 works <- do.call(rbind, imp) #line 6 write.csv(wo...
2004 Nov 30
4
adding regression curve to xyplot
...islm <- lm(x~y) + print(thislm) + newt <- range(P100$t) + print(newt) + news <- as.vector(predict(thislm,newdata=data.frame(t=newt))) + print(news) + llines(news,newt,col="red")}) Call: lm(formula = x ~ y) Coefficients: (Intercept) y 33.3307 0.1393 [1] 4.050469 24.514543 [1] 34.16173 35.31284 34.95317 35.62314 34.64448 34.06225 34.19688 34.03391 [9] 33.90860 35.28849 35.29911 34.61618 35.19837 35.28966 34.91978 3...
2004 Jun 14
1
polygons around clusters of identically valued nodes in levelplot()
I'm looking for a way to plot lines on top of a levelplot(), where the lines are borders between cells of different values. The clines() function provides contours suitable for continuous data. I am dealing with discrete values, spatial clusters of nodes where each cluster has an integer value, and I want to plot the borderlines between these areas. So, in a levelplot having nodes with
2004 Jul 29
1
Lattice graphics: adding lines to a plot
...~ 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: library(lattice) plot1 <- xyplot(y ~ x) plot2 <- xyplot(model.y ~ x, panel = function(x, y) { llines(x=x, y=y) }) print(plot1, more=TRUE, position=c(0,0.5,1,1)) print(plot2, position=c(0,0,1,0.5)) But this just produces two graphs, one above the other. How do I overlay them? What should I be doing in order to get the same result as with the base graphics? Thank you for your thoughts, Matth...
2004 Aug 19
1
Clipping of display in Lattice graphics
...his you will see a datapoint and line extend into the pink area. However, if xyplot is used, it doesn't extend past its borders: xyplot(y~x, xlim=c(0,1), ylim=c(0,1), type=c("p","l")) From what I understand so far: xyplot calls panel.xyplot panel.xyplot calls lpoints and llines neither lpoints nor llines do much except call xy.coords and then call lplot.xy lplot.xy calls grid.points and grid.lines Where in this code does the clipping occur? I'm quite baffled really. Thank you for considering this, Matthew
2007 Apr 01
1
line endings in lattice plots: square vs. round
I would like to use llines() to draw lines with square endings in lattice plots. But the default behavior seems to be to draw lines with round endings. How can I change this? I'm looking for a parameter like par('lend') or get.gpar('lineend'), but trellis.par.get() doesn't seem to have anythi...
2009 Apr 30
1
Hmisc: xYplot and panel.lines
...the Hmisc package, I tried to create an xYplot (single panel only) and was confused to find that I could not add anything else to the plot (abline, lines, etc.). Thankfully, [1] points out panel functions. This works as expected for panel.abline, but as soon as I'm using panel.lines (or llines or lpoints) from the "lattice" package (version 0.17-17 with R 2.8.1), it seems that it is not using the coordinate system that the original plot used, i.e. the graph does not work at all. My code: pfunc <- function(x,y,...) { panel.xYplot(x, y, ...) panel.abline(h=4.0, c...
2004 Feb 25
2
levelplot add line
R folks, I can't seem to find the instructions in the help files for the lattice package that explain how to add lines, such as with lines() or ?, to a levelplot. I'd be grateful if someone could point me in the proper direction. Cheers, Jeff ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Jeff Jorgensen Center for Limnology jcjorgensen at wisc.edu
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
2009 Jun 10
2
plot two variograms on a same graph
Hi, I would know how to plot two variograms on a same graph. I can plot one by one but I would draw both on the same one. Is it possible? Do i need any special package? Thanks! Cordialement Damien Landais