similar to: grid: How to merge cells in grid.layout?

Displaying 20 results from an estimated 10000 matches similar to: "grid: How to merge cells in grid.layout?"

2012 Sep 23
1
Background color in a grid plot seems to interfere with plot()
Hi, Why does the upper left panel (in the plot below) not have a gray background? Cheers, Marius require(grid) require(gridBase) pdf(file="Rplot.pdf", width=8, height=8, onefile=FALSE) ## set up the grid layout gl <- grid.layout(5, 5, widths=unit(c(1.8, 8, 0.8, 8, 0.8), "cm"), heights=unit(c(0.8, 8, 0.8, 8, 1.5), "cm")) if(FALSE) grid.show.layout(gl)
2009 Sep 24
1
Creating grid graphics with grid.layout
Hi, I recently created a function which uses grid with a viewport constructed with grid.layout() to position four plots on a plot device. My question is what's the best way to programatically traverse each element of the viewport? The grid is 5x5 and the four plots occupy positions (2,2), (4,2), (2,4), and (4,4). Here's the viewport code: pushViewport( viewport(
2008 Jan 01
2
Alignment and Labeling of a color key in a xyplot?
Happy New Year to all R users! I have two short questions concerning a xyplot with a color key: 1) How do I properly place (align) the color key beside the xyplot? As you can see from the code listed below, the placement of the color key is not correct. I would like the upper and lower end point of the color key to be perfectly aligned with the upper and lower line of the xyplot. Adjusting
2006 Mar 04
5
Remove "gray grid" from levelplot
Hi, If I use the levelplot function of the lattice library, I always see small "squares" in the plot. They indicate the region for which the same color is used. If you have a levelplot of a function which is evaluated at 25x25 equally-spaced points you obtain 26 squares in x and 26 squares in y direction. That does not bother too much (but still bothers somehow...), but if you
2006 May 29
3
mtext in trellis-loop & colorkey
Hello, I would like to create a sequence of plots (using a for loop). I read in the FAQ that print() has to be used in order to obtain any output. This works perfectly fine as long as I only consider one function call in the loop, but I would like to add mtext() to the each plot in the loop. Unfortunately, this did not work. Any suggestions? As you can see from the provided example,
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
2015 Feb 03
2
Seed in 'parallel' vignette
Hi, This is most likely only a minor technicality, but I saw the following: On page 6 of the 'parallel' vignette (http://stat.ethz.ch/R-manual/R-devel/library/parallel/doc/parallel.pdf), the random-number generator "L'Ecuyer-CMRG" is said to have seed "(x_n, x_{n-1}, x_{n-2}, y_n, y_{n-1}, y_{n-2})". However, in L'Ecuyer et al. (2002), the seed is given with
2010 Dec 30
5
Why is format(10000, big.mark = "\\,") not 10\,000?
Hi, why does format(10000, big.mark = "\\,") not give me "10\,000"? How can I get this kind of "big.mark"? Cheers, Marius
2011 Apr 06
7
Quiz: Who finds the nicest form of X_1^\prime?
Dear expeRts, I would like to create a plotmath-label of the form X_1^\prime. Here is how to *not* do it [not nicely aligned symbols]: plot(0,0,main=expression(italic(X*minute[1]))) plot(0,0,main=expression(italic(X[1]*minute))) plot(0,0,main=expression(italic(X)[1]*minute)) Any suggestions? Cheers, Marius
2012 Dec 08
5
How to efficiently compare each row in a matrix with each row in another matrix?
Dear expeRts, I have two matrices A and B. They have the same number of columns but possibly different number of rows. I would like to compare each row of A with each row of B and check whether all entries in a row of A are less than or equal to all entries in a row of B. Here is a minimal working example: A <- rbind(matrix(1:4, ncol=2, byrow=TRUE), c(6, 2)) # (3, 2) matrix B <-
2009 Dec 20
1
How to put text outside an xyplot?
Dear R-users, I have a plot created with the code below. I tried to put some text to the right of the color key. I worked with grid.text and also viewport(), but couldn't achieve this. I know this should be simple, but I just couldn't figure out how to do it. How does this work? Cheers, Marius library(lattice) library(grid) myvec=1:10 data=data.frame(x=myvec,y=myvec)
2010 Nov 26
3
lattice: strange behavior (?) when using trellis.device(color=FALSE)
Dear expeRts, I am not sure if I found a bug... I would like to create a function that itself creates a lattice plot without colors. Following http://www.mail-archive.com/r-help at r-project.org/msg64699.html I use trellis.device() to set the colors to FALSE. Whenever I call the minimal example below *with* trellis.device(), Quartz opens a window (I am working on a MAC), which it shouldn't,
2016 May 05
4
R process killed when allocating too large matrix (Mac OS X)
Hi Simon, thanks for your quick reply. 1) ... so you can reproduce this? 2) Do you know a way how this can be 'foreseen'? We allocate larger matrices in the copula package depending on the user's input dimension. It would be good to tell her/him "Your dimension is quite large. Be aware of killers in your neighborhood"... before the killer attacks. Thanks & cheers,
2011 Sep 09
1
rgl: axis/viewport/box problems in persp3d()
Dear expeRts, I am a new user of rgl, below is my first trial to plot a simple function in 3d. I managed to put the axes in the right locations, but: (1) The xlab, ylab, and zlab arguments are ignored; how can I put in axes labels? (2) Since I removed the axes in persp3d() the viewport is too small; is it possible to keep the size of the viewport? (3) The box is not correctly drawn, there
2012 Mar 01
2
How to colorize the panel backgrounds of pairs()?
Dear expeRts, I would like to colorize the backgrounds of a pairs plot according to the respective panel number. Here is what I tried (without success): count <- 0 mypanel <- function(x, y, ...){ count <<- count+1 bg. <- if(count %in% c(1,4,9,12)) "#FDFF65" else NA points(x, y, cex=0.5, bg=bg) } U <- matrix(runif(4*500), ncol=4) pairs(U, panel=mypanel) I
2010 Dec 26
1
lattice splom: how to adjust space between tick marks and tick labels?
Dear expeRts, how can I decrease the space between the tick marks and the corresponding labels in an splom? See here: library(lattice) U <- matrix(runif(4000), ncol = 8) splom(U, axis.text.cex = 0.2) # => space between the [small] tick labels and tick marks is/seems to be too large I checked ?panel.pairs but could not find an option for that. Cheers, Marius
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
2011 Nov 15
1
grid.arrange, grid.layout - legend, global y axis title
Hello, I created several plot with ggplot2 dev mode. Now I want to combine the plots in a grid e.g. 2x2 with a fixed size of the output. What I am doing at the moment is: grid.newpage() pushViewport(viewport(layout = grid.layout(nrow=2, ncol=2, widths = unit(c(7.5,6.5), "cm"), heights = unit(rep(5, 2), "cm")))) print(plot1, vp = viewport(layout.pos.row = 1,
2014 Aug 22
3
parallel::detectCores(TRUE) gives: Error in system(cmd, TRUE) : error in running command
Hi, Both under the current R-devel (r66456) and a version from about 3 months ago, I experience the following behavior: > parallel::detectCores(TRUE) Error in system(cmd, TRUE) : error in running command > traceback() 3: system(cmd, TRUE) 2: gsub("^ +", "", system(cmd, TRUE)[1]) 1: parallel::detectCores(TRUE) > This is on Ubuntu 14.04. Does anybody else see this? [I
2016 May 05
1
R process killed when allocating too large matrix (Mac OS X)
Hi, Interesting "feature" in 10.11.4. I wonder if the process is killed before or after malloc() returns. If before, it seems very blunt: "You're asking too much and I don't like it so I kill you now". If after it doesn't look much better: "You're asking a lot and I don't like it but I give it to you anyway. I'll kill you quickly later". Why