similar to: Background color in a grid plot seems to interfere with plot()

Displaying 20 results from an estimated 7000 matches similar to: "Background color in a grid plot seems to interfere with plot()"

2008 Aug 08
2
gridBase and new.page() / grid.newpage()
Hello all, I'm trying to write a function using the gridBase package. I'd like to push several base subplots to a larger plot constructed with grid. However, I'm having trouble getting consistent results when running the function when the plotting window (quartz) is closed, when it is left open and the plot function is repeated to the same window, and when the output is saved to a
2008 Jun 11
1
Problem when combining dotplot() and textplot() using grid
Hi everyone. I want to solve the following problem. I have a data.frame and I create a dotplot using lattice. Then I want to use the grid-package to create a combined graphic which contains the dotplot as well as a textplot() (using package gplots) of the data.frame next to the dotplot. Example code: library(lattice) library(grid) library(gplots) xx <- data.frame(f=factor(rep(1:5, each=5)),
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 Dec 05
1
Trouble with gridBase and inset plots
Dear All, I ma having a trouble in generating a figure containing 3 insets with the gridBase package. I always get an error message of the kind: Error in gridPLT() : Figure region too small and/or viewport too large No matter which parameters I choose. The plots works nicely with two insets only, but when I try adding the third one, my troubles begin. I am probably doing something wrong in the
2012 Oct 19
1
grid(Base): How to avoid "Figure region too small and/or viewport too large" by specifying 'relative' units?
Dear grid-expeRts, The goal: I would like to construct a plot (matrix) with grid and gridBase, which consists of four "sub-plots". The sub-plots should have a square plotting region as one would force with par(pty="s") in base graphics. The problem: I don't get a square plotting region, not even by specifying pty="s" in par(). Indeed, if you display the grid
2011 Apr 28
2
gridBase Base Plot Positioning
Hello, I'm trying to follow the documentation of how to use gridBase, and I've reached the minimal code example below as my best effort. Can someone explain how to keep the column of boxplots on the same page as the rectangles (even though I've tried new = TRUE) ? Also, would it be hard / possible to match up the middle of each boxplot to the middle of each rectangle ?
2008 Oct 27
3
Arrays of Trellis plots
hello, the example below does not work. (i know it's not supposed, but it makes it clear what i'm trying to achieve) par(mfrow=c(2,1)) xyplot(y~x2|x1,data=dataframe1,pch=20) xyplot(y~x2|x1,data=dataframe2,pch=20) i know i could probably merge the two datasets and do something like xyplot(y~x2|x1+dataset,data=merged) any other suggestion? thanks. [[alternative HTML version deleted]]
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),
2006 Apr 04
1
Grid graphics issues
Hi all -- So I'm trying to use lattice graphics, but I want to use a sunflower plot, which doesn't seem to be part of lattice. No problem, I put together the following code, which mostly works -- *except* for the first graph it generates. If it opens the graphic device, then it draws the xygrid, clears the device, then draws the sunflowerplot. All subsequent output operations work
2008 Dec 01
2
align two lattice plots with grid
Dear list, I need to align two plots on top of each other for comparison (they only have the x-axis in common). When the y-labels have a different extent, I cannot find a way to align the x-axes, as illustrated below, > library(grid) > library(lattice) > x <- seq(0, 10, length=100) > y <- sin(x) > y2 <- 10*sin(x) > f <- rep(c("1", "2"),
2006 Jun 12
1
strange behaviour with rotated viewports in grid
Dear all, I am having a problem using grid when rotating a viewport. It seems to plot everything on a grey background colour which I am not able to get rid of. Even book examples such as that that plot figure 5.10 in P. Murrell's R Graphics book show the same behaviour. The following example illustrates this issue. I would appreciate if anyone has a way to solve this. Best regards,
2009 May 21
1
size of point symbols
Dear list, This might be a topic for r-devel but i may be missing something obvious. I don't understand the rationale in the absolute sizes of the point symbols, and I couldn't find it documented. The example below uses Grid to check the size of the symbols against a square of 10mm x 10mm. > checkOneSymbol <- function(pch=0){ > gTree(children=gList( >
2009 May 21
1
size of point symbols
Dear list, This might be a topic for r-devel but i may be missing something obvious. I don't understand the rationale in the absolute sizes of the point symbols, and I couldn't find it documented. The example below uses Grid to check the size of the symbols against a square of 10mm x 10mm. > checkOneSymbol <- function(pch=0){ > gTree(children=gList( >
2009 Jun 23
2
curvedarrow (some graphics problem)
Hi there, I just wonder how to draw this kind of picture... http://www.nabble.com/file/p24158796/b.jpg http://www.nabble.com/file/p24158796/a.jpg and this is what i have done %%%%% library(shape) library(diagram) curve(sin(x),bty="n",-8,8,yaxt="n",ylab="",xaxt="n",type="n",xlab="") axis(1,labels=F,at=seq(-8,8,1))
2008 Aug 06
1
grid layout scaling viewport width based solely on height
Hello all, I'm trying to write a function that produces a main plotting region with several square plots along the right side. Ideally the size of right side plots will scale only with the height of the entire plot, yet never overlap with another secondary plot. The following two snippets get close, however, as I resize the plot horizontally the right side plots (green squares) get smaller
2007 Mar 25
1
controlling panel.width and panel.height in viewports
Dear all, I'm trying to get a series of lattice levelplots to appear in viewports in a particular way but struggling to exert fine control over their appearence. There are two conditions: (a) I only want the levelplot to appear (I don't want axes, colour key, etc) in the viewport and (b) I want the levelplot to expand to the maximum allowable space in the viewport while observing
2008 Nov 01
1
Splitting device for ggplots?
Dear UseRs, For various reasons I need to plot multiple ggplots on one device (preferably pdf). Is there a way to achieve that? par(mfrow), split.screen() and layout() seem not to do the job. Thanks, Vitalie.
2007 Sep 30
1
clipping viewports
Dear useRs, Why are the rotated blue and yellow boxes in the example below clipped outside of 6 x 6 inch window in the middle of the page?? Where does the 6 x 6 inch window come from? I would like to make use of the entire page. > library(grid) > pdf(file = "FarmMaps.pdf", paper = "a4") > pushViewport(viewport( + width = unit(7.6, "inches"), height =
2006 May 21
1
print.trellis(..., draw.in=...)
A year ago I had posted this code https://stat.ethz.ch/pipermail/r-devel/2005-June/033508.html and the associated discussion was that there would be a print.trellis argument that could be used to eliminate the need for 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=