similar to: line endings in lattice plots: square vs. round

Displaying 20 results from an estimated 6000 matches similar to: "line endings in lattice plots: square vs. round"

2009 Dec 11
2
incorrect linetype with pdf device (PR#14128)
Full_Name: baptiste augui? Version: 2.10.1 RC (2009-12-06 r50690) OS: Mac OSX 10.5 Submission from: (NULL) (90.25.215.172) The following code, run with a vanilla R session, produces different visual output for the two devices, library(grid) pdf("test-pdf.pdf") grid.newpage() grid.lines(gp=gpar(lty="13", lineend = "butt")) dev.off() png("test-png.png")
2004 Aug 19
1
Clipping of display in Lattice graphics
I'm baffled as to how the Lattice package achieves clipping. Would someone mind explaining this to me? Firstly, my attempt using "just" the grid package: x<-seq(0,3,by=0.3)/2.8 y<-seq(0,1,by=0.1) grid.newpage() grid.rect(gp=gpar(fill="pink")) vp<-viewport(width=0.8, height=0.8) pushViewport(vp) grid.rect(gp=gpar(fill="white")) grid.xaxis()
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
2010 Aug 08
3
Does anybody know how to control the appearance of the end of the line in lattice?
Hi All, I am plotting vertical lines using xyplot in lattice and type="h". It works well, but the problem is that the tops of the lines are convex and the bottoms are concave. Is there a way to flatten the tops and bottoms? Here's my code: Source<-matrix(1:30,10,3) colnames(Source)<-c("x","y1","y2") Source<-data.frame(Source) xyplot(y2+y1~x,
2012 Sep 24
1
Question lattice SplomT
Dear Deepayan Sarkar, I have (again) a question concerning "panel" and my function "SplomT", see attachments. Some time ago you helped me to write this function, thanks again. I have used it to great advantage in my statistics instructions. Now the problem I encounter is that the .pdf figure generated in Sweave consists of one extra empty page at the start. This prevents
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
2009 Jun 04
0
type = 'b' with Grid
Dear all, I feel like I've been reinventing the wheel with this code (implementing type = 'b' for Grid graphics), http://econum.umh.ac.be/rwiki/doku.php?id=tips:graphics-grid:linesandpointsgrob Has anyone here attempted this with success before? I found suggestions of overlapping large white points to mask the lines but it's not ideal. I welcome any comments on the code.
2012 Jun 20
2
exact relative positioning of lattice plots
Hello, I have two lattice plots for which panel.height is fixed. I am trying to position them in a column so that there is exactly half an inch of vertical space between them. This would be a simple task if I were not fixing panel.height. But given that I am, I can't find a way to put exactly half an inch of space between the plots. Is there a way? I've checked the Sarkar and
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") },
2004 Oct 04
7
R 2.0.0 is released
I've rolled up R-2.0.0.tar.gz a short while ago. This is a new version with a number of new features. See below for the details. As was the case with R 1.0.0, this new version represents a coming of age more than a radical change to R. We do plan to celebrate the new major version with press releases and such. The release will be available from
2004 Oct 04
7
R 2.0.0 is released
I've rolled up R-2.0.0.tar.gz a short while ago. This is a new version with a number of new features. See below for the details. As was the case with R 1.0.0, this new version represents a coming of age more than a radical change to R. We do plan to celebrate the new major version with press releases and such. The release will be available from
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
2011 Nov 18
1
How to fill irregular polygons with patterns?
Hi, I'm looking the best way to fill irregular polygons with patterns, Something like the function grid.pattern do, but my case is with irregular polygons. Whit this script I can get it, but I'm looking for an "elegant" solution.. library(grid) grid.polygon(x=c(0.2, 0.8, 0.6, 0.6, 0.8, 0.2), y=c(0.2, 0.2, 0.3, 0.5, 0.7,0.7), gp=gpar(fill="grey",
2009 Dec 03
2
Passing arguments to gpar
Dear R-users, I would like to know how to pass arguments to gpar() without hard-coding them. I tried to store my arguments in a list and passed this list to gpar(), but it did find the way to do it properly. Any help would be appreciated. a<- list(fontisze=8,col=3) gpar(fontsize=8,col=3) gpar(a) gpar(unlist(a))
2002 Mar 10
1
lattice library: xyplot and polygons
Dear R-Helpers, Is there a way to draw shaded (filled) polygons in panel graphs produced by xyplot ? I made different trials (see below) with polygon() and grid.polygon() but polygons are not drawn (probably for the same reason that prevents the use of lines, points, etc. in xyplot panels). Thanks in advance, Renaud > Water id label longitude latitude 515 21 Zone inondable
2007 Sep 03
3
plotting predicted curves with log scale in lattice
Hi, I was taken off guard by the following behavior in a lattice plot. I frequently want to add a predicted curve defined at more points than in the formula expression of xyplot. There have been numerous examples of how to do this on r-help, but I still often struggle to make this work. I just realized that specifying one of the axes on a log scale does not guarantee that the added data for a
2005 Dec 08
1
grid graphics gpar(fill) argument and jpeg device
Hi everybody, I just notice a strange behaviour of gpar's fill argument when using non-postscript devices: The default of the argument is transparent (according to get.gpar("fill")). So as expected, the following code draws a nice red rectangle in the middle of my X11 or postscript device. pushViewport(viewport(width=0.5, height=0.5)) grid.rect(gp=gpar(fill="red"))
2005 Jan 19
1
Should NEVER happen; please bug.report() [mkCLOSXP] (PR#7535)
I'm probably not using the function right, but anyway, the program said: "please bug.report." > w_R.f1=function(PR,Pc) return (Pc*PR^3) > > w_R.f2=function(PR,Pc) return (Pc*PR) > > w_R.fc=c(w_R.f1,w_R.f2) > w_R.fc[2] [[1]] function(PR,Pc) return (Pc*PR) > > RSD(type=3, + gparP=gpar(col="red"), + gparD=gpar(fill=FALSE,col=FALSE), +
2009 Mar 21
1
Forestplot () box size question
Hi All, I have been able to modify the x-axis to start at zero by adding xlow and xhigh parameters; that was pretty simple. I have been unable to find the location of the code that would turn off the information weighting of the box size (I have smaller randomized trials getting less weight than a much larger non-randomized trial). The function is forestplot() from rmeta. Thanks for any
2008 Aug 17
1
Making use of names of viewports (grid)
The following code, though not brilliant, works on an A4 page. It might look odd on other devices of a very different size. =============X8------- cut here ---------------------------- require(grid) wide <- 15 vps <- grid.layout(nrow = 3, ncol = 4, widths = unit(rep(1, 4), rep("null", 4)), heights = unit(c(99, 1, 99),