similar to: grid.newpage()

Displaying 20 results from an estimated 6000 matches similar to: "grid.newpage()"

2009 May 14
1
Problem with viewports, print.trellis and more/newpage
Dear R-users, I have got the following problem. I need to create 4x2 arrays of xyplot's on several pages. The plots are created within a loop and plotted using the print function. It seems that I cannot find the proper grid syntax with my viewports, and the more/newpage arguments. The following script is a simplification but hopefully will suffice to illustrate my problem. Any suggestion
2011 Sep 05
1
ggplot2-grid/viewport and PNG
Dear All, The following code save my graphs as pdf: pdf("j:/mix.pdf", width = 18, height = 16) grid.newpage() pushViewport(viewport(layout = grid.layout(3,1))) vplayout <- function(x, y) viewport(layout.pos.row = x, layout.pos.col = y) print(Aplot, vp = vplayout(1, 1)) print(Bplot, vp = vplayout(2, 1)) print(Cplot, vp = vplayout(3, 1)) dev.off() How can I save it in
2010 Jul 19
1
divide grid.newpage into two?
Hi, ? Is there some easy way to split the grid.newpage() into two columns? For example, how could I put the two forest plots below (meta1 and meta2) next to each other? library(meta) data(Olkin95) meta1 <- metabin(event.e, n.e, event.c, n.c,data=Olkin95, subset=c(41,47,51,59),sm="RR", meth="I",studlab=author) meta2=meta1 meta2$studlab=rep("",length(meta1$studlab)
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 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
2006 Feb 21
2
rotated labels in barplot with beside=T and multiple groups
I have a data set that I display using barplot. I don't know what you call it, but when I look at it, it looks like this: > lsu (0,0.1] (0.1,0.2] (0.2,0.3] (0.3,0.4] (0.4,0.5] (0.5,0.6] A 0.052631579 0.000000000 0.000000000 0.000000000 0.000000000 0.000000000 B 0.000000000 0.000000000 0.001007049 0.003021148 0.000000000 0.000000000 E 0.200000000 0.000000000
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)),
2007 Oct 24
1
Rotated viewports in Grid
Hi all, I'm trying to generate a plot containing a scatterplot, with marginal densityplots for x and y. However, when I try to generate a vertical densityplot, I get the message "warning: can't clip to rotated viewport", and nothing shows up. I'm probably misunderstanding how viewports are meant to be used, so if someone could give me a hint, I'd be most grateful. my
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
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 Mar 04
1
grid.layout?
platform x86_64-unknown-linux-gnu arch x86_64 os linux-gnu system x86_64, linux-gnu status major 2 minor 6.2 year 2008 month 02 day
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 ?
2012 Nov 22
1
How to read jpeg image with russian font in R?
Hi, I m working on R and read one image with russian font using readjpeg() function and write it on pdf (using grid). But russian text is not visible on pdf. How can i fix my pblm? Regards <http://r.789695.n4.nabble.com/file/n4650417/pointer.jpg> library(JPEG) library(grid) pdf("out.pdf" , width = 6.6 ,height = 4.2,family= "URWHelvetica", encoding="KOI8-R")
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]]
2012 Apr 09
3
how to add 3d-points to bplot {rms} figure?
Hello! I have created a bplot-figure using this code: *file <- "2dcali_red.ttt" ux<-as.matrix(read.table(file, dec = ",")) mode(ux)<-'numeric' vel<-ux[,1] ang<-ux[,2] x<-ux[,3] y<-ux[,4] dat<- data.frame(ang=ang, x=x,y=y) require(rms) ddist2 <- datadist(dat) options(datadist="ddist2") fitn <- lrm(ang ~ rcs(x,4) +
2009 Jun 17
1
getting cd_plot in vcd package to work with layout
Hi, I'm trying to get 2x2 (or other layouts) of cd_plot from the vcd package. I have tried the usual commands like layout, par(mfrow...) etc and but cd_plot seems to ignore them and send the plotting window back to 1x1. I have also tried turning off the pop and newpage options in cd_plot but I still can't get multiple cd_plots into a plotting window. Any suggestions would be greatly
2004 Nov 21
1
Location of grobs etc on lattice output
Is there any way, after use of print.trellis(), to obtain the co-ordinates of the plot region, e.g., in what are then the native co-ordinates? e.g. library(DAAG) library(lattice); library(grid) data(cuckoos) pushViewport(viewport(layout=grid.layout(2, 1))) pushViewport(viewport(layout.pos.row=1)) cuckoos.strip <- stripplot(species ~ length, data=cuckoos) print(cuckoos.strip,
2017 Jul 23
0
par(mfrow) for heatmap plots
The answer is "don't do that" because that function abuses par. Use lattice or ggplot2 with grid graphics to plot multiple heatmaps. https://stackoverflow.com/questions/15114347/to-display-two-heatmaps-in-same-pdf-side-by-side-in-r -- Sent from my phone. Please excuse my brevity. On July 23, 2017 5:11:32 AM PDT, Brian Smith <bsmith030465 at gmail.com> wrote: >Hi, >
2017 Jul 23
3
par(mfrow) for heatmap plots
Hi, I was trying to use par(mfrow) to put 4 heatmaps on a single page. However, I get one plot per page and not one page with 4 plots. What should I modify? Test code is given below: test = matrix(rnorm(60), 20, 3) pdf(file='test.pdf',width=10,height=8) par(mfrow=c(2,2)) heatmap(test) heatmap(test) heatmap(test) heatmap(test) dev.off() thanks! [[alternative HTML version deleted]]