similar to: change inter-line spacing in grid graphics - how to?

Displaying 20 results from an estimated 7000 matches similar to: "change inter-line spacing in grid graphics - how to?"

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
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
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),
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)),
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
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
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
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
2009 Jun 24
1
parallel rotated strips with color gradient
Hi, I want to produce two parallel rotated strips with color gradient. So far, the sample strip is something produced by this: pushViewport(viewport(x = unit(0.638, "npc"), y =unit(0.386, "npc"), width=.62, height=0.006, angle=137.2)) grid.rect(y=100:1/100, just="top", gp=gpar(col=NA, fill=colorRampPalette(c("lightgray",
2008 May 22
2
grid error message when resizing graphics window after tcltk loaded
Dear R-devel / Dr. Murrell - This is similar but ultimately unrelated (I think) to something I posted about in February. See my original post here: https://stat.ethz.ch/pipermail/r-devel/2008-February/048278.html I start R with the --vanilla option, and run the following code. ## BEGIN SAMPLE R CODE library(grid) for(i in seq(0, 1, by = .1)) { for(j in seq(0, 1, by = .1)) { angle
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
2007 Oct 19
1
Using grid graphics (hexbin) in pairs() plot problem
Hi, I am trying to create a plot with pairs() using a gplot.hexbin() for each pair. For pairs I can provide a custom upperPanel function: pairs(iris[1:4], panel=mypanel) and mypanel() calls plot.hexbin(): library(hexbin) # Bioconductor mypanel <- function(x, ...){ hb <- hexbin(x) plot(hb) } The problem is that gplot.hexbin() is based on the
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")
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
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.)
2009 Mar 10
1
Centering multi-line strip text in lattice
I'm having trouble centering multi-line strip text in lattice. As the code below demonstrates bounding box of the text is centered within the strip, but the first line isn't centered in relation to the longer second line. The "adj" argument to par.strip.text doesn't seem to do much. Suggestions? a=data.frame( x=rep(1:10,2) ,y=rep(1:10,2) ,z=rep(c('First Line\nLonger
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 ?