similar to: question about adding plots in a grid (lattice package)

Displaying 20 results from an estimated 9000 matches similar to: "question about adding plots in a grid (lattice package)"

2009 Apr 30
1
overlaying several subsets of data frame in pairs plot
Hello I have a multivariate data frame giving various responses for several treatments. I would like to plot the relationship in the responses in a pairs plot with different symbols for the different treatments. In a regular plot I would have used 'matplot' or just added the new treatments with the 'points' function. But how to do it in a pairs plot? Thank you for your
2009 Oct 30
1
problems with re-loading exported data
Hello, I have a data file originally as .mat file from matlab that I imported in R using the R.matlab package (readMat). This loaded a list containing amongst other things a 4x4 array of rainfall data that is quite heavy (around 40 Mb, it took 10 minutes to load on my computer). I tried to export it as R data file or simply a text file (using the command write) to share this data with
2011 Apr 15
1
simulations with very large number of iterations (1 billion)
Hello R-help list I'm trying to run 1 billion iterations of a code with calls to random distributions to implement a data generating process and subsequent computation of various estimators that are recorded for further comparison of performance. I have two question about how to achieve this: 1. the most important: on my laptop, R gives me an error message saying that it cannot
2001 May 21
4
new packages: grid and lattice
Hi Two new packages have just been uploaded to the _DEVEL_ section on CRAN: 1. package "grid" AUTHOR Paul Murrell OVERVIEW This package provides an altenative graphics system for R. FEATURES Very flexible layout facilities (viewports, units, layouts) Component-based design (graphics can be constructed incrementally and hierarchically) Basic support for interaction (graphics
2001 May 21
4
new packages: grid and lattice
Hi Two new packages have just been uploaded to the _DEVEL_ section on CRAN: 1. package "grid" AUTHOR Paul Murrell OVERVIEW This package provides an altenative graphics system for R. FEATURES Very flexible layout facilities (viewports, units, layouts) Component-based design (graphics can be constructed incrementally and hierarchically) Basic support for interaction (graphics
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 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)),
2005 Jul 28
2
lattice/ grid.layout/ multiple graphs per page
Background: OS: Linux Mandrake 10.1 release: R 2.0.0 editor: GNU Emacs 21.3.2 front-end: ESS 5.2.3 --------------------------------- Colleagues I have a set of lattice plots, and want to plot 4 of them on the page. I am having trouble with the layout. grid.newpage() pushViewport(viewport(layout = grid.layout(2,2))) pushviewport(viewport(layout.pos.col = 1, layout.pos.row = 1)) working trellis
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)
2005 Jun 01
1
panel.axis() & grid/lattice settings
Hello, I wish to customize the tick marks and labels of axes in panels produced by high-level lattice functions, namely xyplot. I know I can use the scales argument to specify values for rot, cex, etc. in the top-level call. However, I am interested in determining values for cex and rot based on the current panel / viewport and device. More specifically, I would like to make adjustments when
2004 Sep 23
1
Gridbase basic question
All, I have a simple plot(x,y) and I would like to then insert rectangles of some length (in native coordinates) and height fixed to 0.5 in native coordinates. I can't quite get the code right to do this. Can anyone give me a quick example of how to do this? I looked the gridBase index and the tutorial (from R-news?) but just haven't gotten it down yet. > plot(1:10,1:10)
2012 Oct 19
1
grid(Base): How to avoid "Figure region too small and/or viewport too large" by specifying 'relative' units?
Dear grid-expeRts, The goal: I would like to construct a plot (matrix) with grid and gridBase, which consists of four "sub-plots". The sub-plots should have a square plotting region as one would force with par(pty="s") in base graphics. The problem: I don't get a square plotting region, not even by specifying pty="s" in par(). Indeed, if you display the grid
2009 Nov 03
1
fixed color scale for a series of contour plots
Hello, I am having trouble figuring out how to create a color scale that will be consistent across multiple contour plots. What I would like is to plot a series of contour or image plots for different subsets of a data set but make sure that the color key stays fixed so that the plots are easily comparable. That is I need a map from the range of values of the entire data set to the color
2004 Sep 07
1
gridBase and heatmap
I would like to use gridBase to place four separate heatmaps (actually, a stripped-down heatmap.2 from ght gregmisc package that contains only the "image" part) into four different viewports. I can get the placement correct, but I keep 'losing' the previous plot. Any suggestions? Here is some quick example code trying to put a heatmap into the left viewport and then
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
2002 Apr 08
2
user coordinates and rug plots in lattice graphics
Dear R list members, I'd like to produce rug plots at the bottom of panels in a trellis display (using the lattice package), but par("usr") doesn't return user coordinates for panels, and consequently rug fails, as the following example (suggested to me by Georges Monette) illustrates: > x <- rnorm(50) > y <- rnorm(50) > f <-
2006 Apr 04
1
Grid graphics issues
Hi all -- So I'm trying to use lattice graphics, but I want to use a sunflower plot, which doesn't seem to be part of lattice. No problem, I put together the following code, which mostly works -- *except* for the first graph it generates. If it opens the graphic device, then it draws the xygrid, clears the device, then draws the sunflowerplot. All subsequent output operations work
2009 Apr 16
3
segment between points on different plots
Hi, I need to draw a line segment between two points on different plots in the same multigraph.I've tried looking at the zoominplot function in plotrix but havent understood much.any help is appreciated ~Aks [[alternative HTML version deleted]]
2008 Dec 01
2
align two lattice plots with grid
Dear list, I need to align two plots on top of each other for comparison (they only have the x-axis in common). When the y-labels have a different extent, I cannot find a way to align the x-axes, as illustrated below, > library(grid) > library(lattice) > x <- seq(0, 10, length=100) > y <- sin(x) > y2 <- 10*sin(x) > f <- rep(c("1", "2"),