search for: lsegments

Displaying 15 results from an estimated 15 matches for "lsegments".

Did you mean: segments
2008 Feb 08
2
xyplot and lsegments
..., date = c(1,2,3,3.5)) plot(n$date, n$value) do.call( segments, with( merge(n,n,by.x="parent", by.y="id"), data.frame(x0=date.x, y0=value.x, x1=date.y, y1=value.y) ) ) xyplot only seems to take an x and a y, and panels only seem to get x and y. I can see an lsegments, but I can't see how to use it in this example. -Alex
2003 May 12
1
plot.ranef.lme (PR#2986)
...staple.ends <- list(x1 = c(rep(X - w, 2), rep(X + w, 2)), y1 = rep(c(Y[5], max(Y[1] - e.u, Y[2])), 2), x2 = c(rep(X - w, 2), rep(X + w, 2)), y2 = rep(c(min(Y[5] + e.l, Y[4]), Y[1]), 2)) . . . . do.call("lsegments", c(staple.ends, box.umbrella)) but lsegments expects arguments named x0,y0,x1,y1 not x1,y1,x2,y2 -- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~...
2003 Jan 06
1
Re - segments within a lattice graph
Hi, The solution to my problem is to use 'lsegments' instead of 'segments' within lattice commands. (Although I wont forget again, a comment in the segments help file referring to 'lsegments' might help others not to make the same mistake in the future.) My thanks to Renaud Lancelot. Regards, John. John Gavin <john.gavi...
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]]
2010 Apr 06
1
lattice package: line end style
First, apologies for no example data but I don't think it's needed in this case, Q: Can (and if so how ) the line end style be changed for 'cloud' plots? I've tried par(lend=2), trellis.par.set(add.line = list(lend=2)) and much googling but to no avail Thanks in advance Dan P.S. the reason for this is that the round end looks bad at lwd=3 or more Daniel Alcock Malaria
2009 Feb 11
1
How to tell if lattice is current device?
Dear R-helpers, I have a function that adds some segments to the current plot, but if I the current plot is made with any of the lattice functions (in my case, levelplot), I should use lsegments rather than segments. How can I tell if the current device was made with plot() or e.g. levelplot() or another lattice function? dev.cur() does not help me, it just tells me "windows 2". (Windows XP). thanks Remko ------------------------------------------------- Remko Duursma Post-D...
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
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
2007 Sep 07
1
contourplot lines, text, and mtext
...e: 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.regions=gray(seq(1,0,len=255)),colorkey=T,cuts=50,contour=F) llines(x=c(-5,5),y=c(-5,5)) > NULL lsegments(x0=-5,y0=-5,x1=5,y1=5) I'm just trying to do the equivalent of abline(0,1) on the plot. ltext(), on the other hand, seems to like to place text in the upper left corner of the plot. I suspect that I misunderstand the coordinate system that lattice uses for contour plots. Can anyone enlighte...
2003 Aug 21
2
levelplot behaviour for panel with constants
In the example: x = rep(c(0,0,1,1),4) y = rep(c(0,1,0,1),4) z = c(1,0,1,0,0,0,1,1,0,1,0,0,1,1,1,1) f = as.factor(c(rep("a",4),rep("b",4),rep("c",4),rep("d",4))) levelplot(z~x+y|f,data.frame(x=x,y=y,z=z,f=f)) I noted that the last ("d") plot remains empty. I guess the reason for this is that the values are constant (1), but I consider it more
2002 Apr 08
2
user coordinates and rug plots in lattice graphics
Dear R list members, I'd like to produce rug plots at the bottom of panels in a trellis display (using the lattice package), but par("usr") doesn't return user coordinates for panels, and consequently rug fails, as the following example (suggested to me by Georges Monette) illustrates: > x <- rnorm(50) > y <- rnorm(50) > f <-
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
2007 Aug 14
2
Using sunflowerplot to add points in a xyplot panel
Hi, I use panel.points to add points to a xyplot graphic. But I like to use the sunflowerplot to plot my points because this is very superimposed. It is possible to use this? I try but it dont work directly. It may be need to put this function inside a panel.??? Thanks Ronaldo -- Where there's a will, there's a relative. -- > Prof. Ronaldo Reis J?nior | .''`.
2001 Sep 21
2
new versions of grid and lattice
...ty of the base R functions like lines and points inside panel functions. To help make the changes more transparently, lattice now includes several wrappers around grid functions that provide an API similar to the corresponding base R functions. The list currently includes lpoints, llines, ltext and lsegments. Using Lattice and base R graphics concurrently ============================================== Grid graphics normally do not mix with usual R graphics. However, end-users typically might want to use lattice functions concurrently with traditional R graphics. To allow this without intermittent ca...
2001 Sep 21
2
new versions of grid and lattice
...ty of the base R functions like lines and points inside panel functions. To help make the changes more transparently, lattice now includes several wrappers around grid functions that provide an API similar to the corresponding base R functions. The list currently includes lpoints, llines, ltext and lsegments. Using Lattice and base R graphics concurrently ============================================== Grid graphics normally do not mix with usual R graphics. However, end-users typically might want to use lattice functions concurrently with traditional R graphics. To allow this without intermittent ca...