Displaying 6 results from an estimated 6 matches for "gridfig".
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
A it draws the horizontal lines as if its relative to B's coordinates
rather than
restablishing A's coordinates. As a result the horizontal lines are
drawn near the
bottom of the graph...
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
A it draws the horizontal lines as if its relative to B's coordinates
rather than
restablishing A's coordinates. As a result the horizontal lines are
drawn near the
bottom of the graph...
2009 Mar 31
1
viewport bug in 2.8.0?: Error: Cannot pop the top-level viewport (grid and graphics output mixed?)
...the following and then resize the window:
X = seq (1,10)
Y = X^2
opar <- par(no.readonly=TRUE, mar = c(2.5, 3.1, 1, 2))
grid.newpage()
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='g...
2013 Aug 22
1
corrgram (package corrgram): how to plot multiple correlograms in the same page?
Hello,
I am trying to plot a few correlograms on the same figure, with the function corrgram() from the package corrgram. However, the function does not seem to use the base graphic system, as setting out the multiple figure layout with, e.g., par(mfrow=c(2, 2,)) does not work.
Does anybody know a workaround for this?
Many thanks in advance for any advice
best
giuseppe
--
Giuseppe Pagnoni,
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)),
2010 Mar 24
2
Multi-panel Pie Charts.
...border,
lty = superpose.polygon$lty, ...)
{
stopifnot(require("gridBase"))
superpose.polygon <- trellis.par.get("superpose.polygon")
opar <- par(no.readonly = TRUE)
on.exit(par(opar))
if (panel.number() > 1) par(new = TRUE)
par(fig = gridFIG(), omi = c(0, 0, 0, 0), mai = c(0, 0, 0, 0))
pie(as.numeric(x), labels = labels, edges = edges, radius = radius,
clockwise = clockwise, init.angle = init.angle, angle = angle,
density = density, col = col, border = border, lty = lty)
}
piechart <- function(x, data = NULL, p...