search for: downviewport

Displaying 20 results from an estimated 26 matches for "downviewport".

2008 May 02
1
Error in downViewport.vpPath(vpPathDirect(name)
Hi, I am having trouble plotting a series of dendrograms using lattice and grid code as found in Paul Murrells book R Graphics. This is the error message I recieve: Error in downViewport.vpPath(vpPathDirect(name), strict, recording = recording) : Viewport 'plot1.panel.1.1.off.vp' was not found I have attached the code and also my data file. Should anyone have any suggestions then your help would be gratefully appreciated. Thank you Andrew http://www.nabble.com/file/p1...
2006 May 21
1
print.trellis(..., draw.in=...)
...with.vpPath or with.viewport there. I assume that that is what draw.in= in print.trellis is for. When I try it I get an error. I did notice that ?print.trellis says draw.in= has not been well tested yet. Is this a bug? After running the the code at the end I get this error message: Error in downViewport.vpPath(vpPathDirect(name), strict, recording = recording) : Viewport 'viewport[GRID.VP.1]' was not found The only difference between the code below and the code in the link above (which works) is that in the for loop at the end the 'with' in the code in the link has been re...
2008 Jan 15
1
navigating ggplot viewports
list(...) I can not get at the grid viewports in a ggplot2 plot. I know there is supposed to be a viewport called "panel_1_1" but downViewport() can't find it. Has the viewport been popped? I had a quick look at the functions involved (eg ggplot_plot) but there is no obvious problem there. > library(ggplot2) > qplot(1:10, 1:10) > current.viewport() viewport[ROOT] > downViewport("panel_1_1") Error in downViewport...
2011 Jul 01
1
beginner question - effective way to chart sleep habits
Hi - beginning R user question here - each day, over the course of several months, I've tracked the time I go to bed, the time I wake up, and my hours spent sleeping. What would be a good way to display this information? I think it would be ideal to show something resembling a bar and whisker graph for each day that would show the interval of hours spent asleep (or perhaps just a bar
2005 Oct 11
1
aligning column of xyplots and removing space between them
...(viewport(layout.pos.row=i, layout.pos.col=j)) upViewport() } } upViewport() } with.vpPath <- with.viewport <- function(data, expr, ...) { # if data is a vpPath it cannot be ROOT since NULL will not dispatch here depth <- if (data$name == "ROOT") 0 else downViewport(data$name) result <- eval.parent(substitute(expr)) upViewport(depth) invisible(result) } grid.newpage() # n and nr are number of cells and rows n <- nr <- 3 nc <- 1 # must be 1 heights <- unit(c(2, rep(1, nr-1)), "null") downViewport(pushLayout(nr, nc,...
2007 Dec 26
1
seekViewport error
...rob.80 GRID.points.79 1 GRID.VP.23 GRID.cellGrob.82 GRID.points.81 1 GRID.VP.24 GRID.cellGrob.84 GRID.points.83 1 1 plot1. 1 1 > seekViewport("GRID.VP.24") Error in downViewport.vpPath(vpPathDirect(name), strict, recording = recording) : Viewport 'GRID.VP.24' was not found > R.version.string # Vista [1] "R version 2.6.1 Patched (2007-12-06 r43610)" > packageDescription("grid")$Version [1] "2.6.1" > packageDescription("...
2005 Oct 03
1
Grid: constructing a gTree with grobs that use named viewports from a vpTree
...grobs using the following code: grid.newpage() pushViewport(vp) upViewport(1) grid.draw(grobs) But I want a grob that represents those grobs drawn in the appropriate viewports. I had hoped I could do something like: grid.newpage() grid.draw(gTree(vp=vp, children = grobs)) But I get: Error in downViewport.vpPath(vp, strict = TRUE, recording = FALSE) : Viewport 'tl' was not found presumably because no equivalent of the upViewport(1) command is used. What should I be doing here? Thanks, Hadley
2018 May 21
0
draw borders of bars inside of the rectangles in a barplot
I recommend instead of no border, that you use a border with the same color as the fill. I do this in the likert functions in the HH package. Rich On Mon, May 21, 2018 at 10:59 AM, Martin Batholdy via R-help <r-help at r-project.org> wrote: > Dear R-users, > > I want to draw a barplot with beside=TRUE. > One halve of the bars are drawn with a border, while the other halve are
2010 Dec 07
2
tableGrob and properties of a cell
...u please help to modify gpar() properties of a cell inside tableGrob() output. In the following example I want to have different color for one out of 4 cells require(gridExtra) z<-matrix(1:4,2,2) grid.draw(tableGrob(z)) The only way I found for now how to do it is to do something like this downViewport(current.vpTree()$children[[1]]$children[[6]]$name) grid.text('2',gp=gpar(col='red',fontface='bold')) But for some reasons when I try to print the table into jpeg the last grid.text() prints desired label text somewhere but not in the place I want it to be. Is there another...
2018 May 21
3
draw borders of bars inside of the rectangles in a barplot
Dear R-users, I want to draw a barplot with beside=TRUE. One halve of the bars are drawn with a border, while the other halve are drawn without a border (i.e. filled bars vs. non-filled bars next to each other). Because borders are drawn around the bars, doing this leads to one halve of the bars being wider than the other halve, expanding across the 0-point of the y-axis. This problem emerges
2006 Jul 19
1
plain shading (not residuals) in mosaic plot
..., unsurprisingly, it didn't work: > mosaicplot(morphs3,color=c(grey(0.8),grey(0.4)),pop=FALSE) Warning message: extra argument(s) 'pop' will be disregarded in: mosaicplot.default(morphs3, color = c(grey(0.8), grey(0.4)), > labeling_cells(text=morphs3,margin=0)(morphs3) Error in downViewport.vpPath(vpPathDirect(name), strict, recording = recording) : Viewport 'cell:Stem-initial obstruent=p,Behavior according to dictionary=unsubstituted' was not found Does anyone know how to get both the shading I want and the labels I want, whether with mosaic(), with mosaicplot(),...
2006 Jun 14
2
positioning of separate y-axis labels in xyplot
I like the functionality provided by outer=TRUE, but when it comes time to place separate xlabs or ylabs, I always end up 'eyeballing' it on a case-by-case basis. For example, ##begin example require(lattice) cars.lo <- loess(dist ~ speed, cars) print(xyplot(cars.lo$residuals+cars.lo$fitted~cars.lo$x, strip=FALSE, outer=TRUE, layout=c(1,2),
2018 May 31
2
How to alpha entire plot?
I have two chromatograms I want plotted on the same axes. I would like the plots to be transparent, so the first chart is not obscured. I have tried adjustcolor(..., alpha.f=0.3), the problem is that my chromatogram is so dense with datapoints that they overlap and the entire graph just ends up a solid color. The second histogram still obscures the first. Consider this example: col1 <-
2006 Sep 05
4
Two submitted packages
## This example runs in R 2.3.1 and does not run in R 2.4.1. I am ## raising it here for two questions: one on how to debug functions ## inside a namespace, the other on how to control clipping. tmp <- data.frame(x=1:5, y=1:5, a=factor(c(1,1,1,1,1), levels=1:4)) xyplot(y ~ x, data=tmp, ylim=c(1.5,4.5), panel=function(x,y, ...) { cpv <- current.viewport()
2005 May 31
2
Problem going back to a viewport with gridBase
I am setting up base plots -- one in viewport A and and one in B. This part works fine. But if I go back to A after having done B and add horizontal lines it seems to not use the correct coordinates. How do I tell it to resume using A's coordinates? I am already using par(fig = gridFIG()) but it seems that that's not enough to reestablish them. What happens is that when I go back to
2005 May 31
2
Problem going back to a viewport with gridBase
I am setting up base plots -- one in viewport A and and one in B. This part works fine. But if I go back to A after having done B and add horizontal lines it seems to not use the correct coordinates. How do I tell it to resume using A's coordinates? I am already using par(fig = gridFIG()) but it seems that that's not enough to reestablish them. What happens is that when I go back to
2008 Aug 21
1
rc note, etc
Are the messages below to be expected from make check-all ? using the rc today, Aug 21, on Red Hat Enterprise Linux AS release 4 (Nahant Update 4) Kernel 2.6.9-42.0.8.ELsmp on an x86_64 Paul ________ .... checking package 'utils' .... * checking R code for possible problems ... NOTE install.packages: no visible global function definition for ?.install.winbinary? install.packages: no
2007 Jul 12
1
ggplot2 / histogram / y-axis
Is there a way in ggplot to make a histogram with the left-hand y-axis label as frequency, and a right-hand y-axis label as percentage? Thanks! Pete
2010 Oct 29
1
Underline only colnames in grid.table
Dear all, I would like to underline only the colnames in a table as e.g. grid.draw(tableGrob(head(iris, 10), name="test")) I can imagine you should use grid.edit or so, bu I can't figure out how... Does anyone have a suggestion? Thanks Robbert windows xp R 2.10.1 -- View this message in context:
2009 Sep 24
1
Creating grid graphics with grid.layout
Hi, I recently created a function which uses grid with a viewport constructed with grid.layout() to position four plots on a plot device. My question is what's the best way to programatically traverse each element of the viewport? The grid is 5x5 and the four plots occupy positions (2,2), (4,2), (2,4), and (4,4). Here's the viewport code: pushViewport( viewport(