similar to: grid layout scaling viewport width based solely on height

Displaying 20 results from an estimated 300 matches similar to: "grid layout scaling viewport width based solely on height"

2009 Mar 21
1
Forestplot () box size question
Hi All, I have been able to modify the x-axis to start at zero by adding xlow and xhigh parameters; that was pretty simple. I have been unable to find the location of the code that would turn off the information weighting of the box size (I have smaller randomized trials getting less weight than a much larger non-randomized trial). The function is forestplot() from rmeta. Thanks for any
2012 Sep 27
1
Problem with grid.rect
I have a stupid problem that is currently driving me crazy... Let us suppose that I want to draw a big red square in the middle of my current device (say X11) I tried the following code : pushViewport(viewport(xscale=c(0,1), yscale=c(0,1)), just=c("center", "center")) vp1 <- viewport(x=unit(0.5, "native"), y=unit(0.5, "native"), width=unit(0.4,
2007 May 30
3
sizing and saving graphics in R
Dear R wizards, I am seeking advice on graphics in R. Specifically, how to manipulate the size and save a plot I have produced using the LDheatmap library. I confess I am relatively new to graphics in R, but I would greatly appreciate any suggestions you may have. LDheatmap produces a coloured triangular matrix of pairwise associations between 600 genetic markers in my dataset.
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
2004 Jun 28
1
text length in grid
Hello! I first would like to compliment the authors of grid on what has been a wonderfully useful package for me. Now, my question: Is there any way I can specify the size of some grid.text using grid units? I must label the regions of a plot. The regions can be either very small or very large, so I would like to label each by fitting its text to the size of the region in question. Ideally, I
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)),
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")
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
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
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
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 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 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()
2009 Apr 07
2
change default output size when using Sweave
I am trying to create a graphic output in Sweave but I do not want it to be standard size. I want the whole graphic to be 80mm of height only, just like the viewport below. <<fig=TRUE, echo=TRUE>>= pushViewport(viewport(height = unit(80, "mm"))) grid.rect() grid.text("I want this viewport to be the whole output size") popViewport() @ How can I make
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 ?
2006 Apr 06
2
key position in trellis plotting area
Hi, I want to do the following: 1) create a trellis plot with 1 x 1 layout 2) add a key in the upper right hand corner of the plotting region (i.e., the panel), but after the initial call to trellis 3) resize the resulting device graphics device without changing the relative position of the key For instance, the code below draws the key relative to the device window--not the plotting area.
2008 Sep 25
1
grid.newpage()
Hi, I'm trying to customize a window with 2 graphs. I'm able to do the first one with something like this general example par(mfrow=c(1,2),cex.axis=0.85,cex.lab=0.80,mai=c(1.3,1,0.5,0),las=3) bplot<-barplot(bar.values,names.arg=cf.names,width=0.5,ylab="% Area held") abline(h=0.3,lty=3,col="red") abline(h=0.1,lty=3,col="blue")
2012 Feb 16
2
Defining a viewport scale in {Grid}
Am just feeling my way into the grid library, and cannot figure out how to define the plot limits. 3/5 of the example polygons below plot in the default 0-1 range viewport. But when I try to redefine the viewport the polygons plot in the same places. I also get the same result without employing push/pop. (As you can see from the scale I'm trying to introduce, I want to plot map polygons.)
2007 Jun 28
1
Changing graphics height when using grid and lattice
Hi, I have recently been playing with the grid package in an attempt to create some pages containing multiple lattice plots on the same page. However, when I specify a grid layout with different widths, such as: pushViewport(viewport(layout = grid.layout(1, 2, unit(c(2, 1), "null")))) the individual graphs do not end up as the same height - which is a feature I would prefer to have.