search for: seekviewport

Displaying 18 results from an estimated 18 matches for "seekviewport".

2007 Dec 26
1
seekViewport error
Why does the seekViewport at the bottom give an error? > xyplot(Sepal.Length ~ Sepal.Width, iris, group = Species, col = 11:13, + auto.key = TRUE) > grid.ls(view = TRUE) ROOT GRID.rect.89 plot1.toplevel.vp plot1.xlab.vp plot1.xlab 1 plot1.ylab.vp plot1.ylab 1 plot1.strip.1.1....
2005 May 31
2
Problem going back to a viewport with gridBase
...t;green", pch = 20) upViewport(1) # draw purple graph in second column (viewport B) pushViewport(viewport(layout.pos.col = 2, name = "B")) par(fig = gridFIG()); par(new = TRUE) plot(1:100, col = "purple", pch = 18) upViewport() # go back to A and add horizontal grid lines seekViewport("A") par(fig = gridFIG()) abline(h=1:10, col = "red") #### THESE DO NOT GET DRAWN AS EXPECTED popViewport() # go back to B and add vertical grid lines seekViewport("B") par(fig = gridFIG()) abline(v=1:10, col = "red") popViewport() par(opar)
2005 May 31
2
Problem going back to a viewport with gridBase
...t;green", pch = 20) upViewport(1) # draw purple graph in second column (viewport B) pushViewport(viewport(layout.pos.col = 2, name = "B")) par(fig = gridFIG()); par(new = TRUE) plot(1:100, col = "purple", pch = 18) upViewport() # go back to A and add horizontal grid lines seekViewport("A") par(fig = gridFIG()) abline(h=1:10, col = "red") #### THESE DO NOT GET DRAWN AS EXPECTED popViewport() # go back to B and add vertical grid lines seekViewport("B") par(fig = gridFIG()) abline(v=1:10, col = "red") popViewport() par(opar)
2008 Sep 19
1
Lines between panels in lattice
...vpTree() i find that "plot1.panel.1.2.vp" and "plot1.panel.1.1.vp" are the top and bottom ones respectively. I am using the following code(inspired by Paul Murrell's R Graphics) to draw a line. (All the co-ordinates lie well within the ranges of the respective panels) seekViewport("plot1.panel.1.2.vp") grid.move.to(unit(0.72,"native"),unit(3.8,"native")) seekViewport("plot1.panel.1.1.vp") grid.line.to(unit(1.2,"native"),unit(3.5,"native")) However, I can see the line in the bottom panel, but nothing in the top. I...
2008 Sep 19
0
Fwd: Lines between panels in lattice
...c(rep(1,5),rep(2,5))) > xyplot(x[,2]~x[,1]|x[,3],layout=c(1,2)) > x > > #x[,3]==2 is in the top panel and x[,3]==1 is in the bottom panel > #so x[6:,] onwards is on the top panel and x[1:5,] is in the bottom > #to find out the names of the viewports, use current.vpTree() > > seekViewport("plot1.panel.1.2.off.vp") > grid.move.to(unit(x[10,1],"native"),unit(x[10,2],"native")) > seekViewport("plot1.panel.1.1.off.vp") > grid > .line > .to > (unit > (x[1,1],"native"),unit(x[1,2],"native"),gp=gpar(col='#...
2012 Jun 20
2
exact relative positioning of lattice plots
...), scales = list(axs = 'i', draw = FALSE), xlab = NULL, ylab = NULL, par.settings = theme.padding) # Push viewports and print plots grid.newpage() pushViewport( vpTree( viewport(layout = masterLayout, name="master"), vpList(vp1, vp2, vp3))) seekViewport("master") print(myPlot, draw.in = "vp1", panel.height = list(x=2, units="in")) print(myPlot, draw.in = "vp3", panel.height = list(x=3, units="in")) seekViewport("spacer") grid.rect() === Thank you for any help that you can offer. John B...
2009 Mar 31
1
viewport bug in 2.8.0?: Error: Cannot pop the top-level viewport (grid and graphics output mixed?)
...e() pushViewport (viewport(x=0,y=0,width=1,height=1,just=c(0,0), name='base')) pushViewport (viewport(x=0,y=0.5,width=1,height=0.5,just=c(0,0))) par (fig=gridFIG()) # plot in top half of page plot (X,Y,col='black',xlab="",main='',cex.axis=.7) # get toplevel view seekViewport('base') # create lower viewport pushViewport(viewport(x=0,y=0,width=1, height=0.5, just=c(0,0))) par(new=TRUE,fig=gridFIG()) plot (X,Y,col='grey') Upon resize will display the above error. R will then become unstable and I have to terminate. This is in the windows version...
2012 Oct 21
1
Navigating a grid.
Greetings I am trying to make a multiple panel plot from a tool (genoPlotR) that is layered on grid. My code and session info are below. When I execute the code, I get a single plot in the center of the graphics page. I have tried various pop/push/down/seekViewport commands at the end of the plotpush method. There must be something I'm missing in the documentation, I believe what I have should work. I haven't been able to find a similar scenario in the help archives. Could I get someone to critique my code and help me figure out how to make m...
2008 Aug 17
1
Making use of names of viewports (grid)
...gp = gpar(col = "white", fill = "white")) =============X8------- cut here ---------------------------- I've tried naming the viewports at the time they're pushed. I had hoped I could get back to them to do what I've done in 'Cube5' using something like seekViewport(), but I see that won't work if the viewport has been popped. Reading through 'R Graphics' (the blue-toned book), I see there's such a thing as vpList which I could make while I'm in that for loop, but I don't see how I could do something like vpL <- c(vpL, cube.k) sort...
2013 Jul 04
2
Modificar una función de un paquete
Estimados miembros de la lista. Estoy trabajando con la función mosaic del paquete vcd. Cómo puedo hacer para ver el contenido fe la función y modificar algunos de sus argumentos? Muchas gracias, Manuel -- *Manuel Spínola, Ph.D.* Instituto Internacional en Conservación y Manejo de Vida Silvestre Universidad Nacional Apartado 1350-3000 Heredia COSTA RICA mspinola@una.ac.cr
2013 Jul 04
1
Modificar una función de un paquete
...## function(i) paste(dnn, i, collapse=",", sep = "=") > ## ) > ## zeros <- observed <= .Machine$double.eps > > ## ## draw zero cell lines > ## for (i in remove_trailing_comma(**zerostack)) { > ## seekViewport(i) > ## grid.lines(x = 0.5) > ## grid.lines(y = 0.5) > ## if (!zero_shade && zero_size > 0) { > ## grid.points(0.5, 0.5, pch = 19, size = unit(zero_size, "char"), > ## gp = zero_gp, > ## name =...
2012 Oct 22
0
Help with a R script using grid
...am trying to make a multiple panel plot with 26 rows and 2 columns with plots from a tool (genoPlotR) that is layered on grid. My code and session info are below. When I execute the code, I get a single plot in the center of the graphics page. I have tried various viewport and pop/push/down/seekViewport commands. There must be something I'm missing in the documentation, I believe what I have should work. I have been able to find a few similar scenarios in the help archives but enlightenment eludes me. Could I get you to critique my latest version of the code below and help me figure o...
2013 Jul 04
0
Modificar una función de un paquete
...t;- apply(expand.grid(dn), 1, ## function(i) paste(dnn, i, collapse=",", sep = "=") ## ) ## zeros <- observed <= .Machine$double.eps ## ## draw zero cell lines ## for (i in remove_trailing_comma(zerostack)) { ## seekViewport(i) ## grid.lines(x = 0.5) ## grid.lines(y = 0.5) ## if (!zero_shade && zero_size > 0) { ## grid.points(0.5, 0.5, pch = 19, size = unit(zero_size, "char"), ## gp = zero_gp, ## name = paste(prefix, "disc:&quot...
2013 Jul 06
0
Modificar una función de un paquete
...n(i) paste(dnn, i, collapse=",", sep = > "=") > > ## ) > > ## zeros <- observed <= .Machine$double.eps > > > > ## ## draw zero cell lines > > ## for (i in remove_trailing_comma(**zerostack)) { > > ## seekViewport(i) > > ## grid.lines(x = 0.5) > > ## grid.lines(y = 0.5) > > ## if (!zero_shade && zero_size > 0) { > > ## grid.points(0.5, 0.5, pch = 19, size = unit(zero_size, "char"), > > ## gp = zero_gp, > > ##...
2006 Dec 14
4
two connected graphs
Hi I have two datasets, A and B, consisting of two columns of numbers representing x and y coordinates. They have 10 and 6 rows respectively. I want to plot two scattergraphs, one above the other. The lower graph to contain A (10 points) and the upper graph to contain B (six points). The x-axes of the two graphs must line up. I then want to draw straight lines that connect points of B to a
2011 Oct 31
1
Help combining cell labelling and multiple mosaic plots
Dear colleagues I'm using data that looks like .test and .test1 below to draw two mosaic plots with cell labelling (the row percentages from the tables). When I take out the pop=FALSE commands in the mosaic commands and comment out the two lines labelling the cells, then the plots are laid out exactly as I'd like: side-by-side. But I do require the cell labelling and the pop=FALSE
2004 Apr 12
1
R 1.9.0 is release
...ons for arguments. If these arguments are missing in the call, the defaults in the selected method will override a default in the generic. See ?setMethod. o Changes to package 'grid': - Renamed push/pop.viewport() to push/popViewport(). - Added upViewport(), downViewport(), and seekViewport() to allow creation and navigation of viewport tree (rather than just viewport stack). - Added id and id.lengths arguments to grid.polygon() to allow multiple polygons within single grid.polygon() call. - Added vpList(), vpStack(), vpTree(), and current.vpTree() to allow creation of...
2004 Apr 12
1
R 1.9.0 is release
...ons for arguments. If these arguments are missing in the call, the defaults in the selected method will override a default in the generic. See ?setMethod. o Changes to package 'grid': - Renamed push/pop.viewport() to push/popViewport(). - Added upViewport(), downViewport(), and seekViewport() to allow creation and navigation of viewport tree (rather than just viewport stack). - Added id and id.lengths arguments to grid.polygon() to allow multiple polygons within single grid.polygon() call. - Added vpList(), vpStack(), vpTree(), and current.vpTree() to allow creation of...