Displaying 20 results from an estimated 700 matches similar to: "ggplot legend consolidation"
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
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.
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
2006 May 21
1
print.trellis(..., draw.in=...)
A year ago I had posted this code
https://stat.ethz.ch/pipermail/r-devel/2005-June/033508.html
and the associated discussion was that there would be a print.trellis
argument that could be used to eliminate the need for with.vpPath
or with.viewport there. I assume that that is what draw.in= in
print.trellis is for. When I try it I get an error. I did notice that
?print.trellis says draw.in=
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"),
2009 Feb 11
1
Help with XYPLOT with marginal histograms
I am trying to replicate the following plot using Lattice:
http://addictedtor.free.fr/graphiques/graphcode.php?graph=78
I'm having trouble with the lattice equivalent of the "oma" (outside
margin) setting. I've been all through the Lattice documentation and
others and also searched the lists.
Below is sample code that demonstrates where I'm at (it should paste
2008 Nov 20
0
align two lattice plots using grid
Dear list,
I'm trying to get two lattice plots aligned on a page. They should
share a common x axis, hence the need for perfect alignment, but the
data is taken from unrelated, separate sources (it is therefore
inappropriate to combine them and use facetting to get an automatic
layout: the legend and y axis need to be different). I can get the
panels to be of the same size, but
2005 Oct 11
1
aligning column of xyplots and removing space between them
The code below displays three graphs in three rows and one column but:
1. I want to remove the space between the graphs (I tried playing with position=
arg to print.trellis but it seems quite difficult to get the right
values and all
my attempts had space between them or had overlapping graphs. Is
there a better way to do this?
2. the widths of the plots are not the same even though I specified
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
2005 Oct 03
1
Grid: constructing a gTree with grobs that use named viewports from a vpTree
I'm trying to create a layout with named viewports that I can use for
other functions. I create the viewport tree that I want, and a list
of grobs with the viewports describing where they should go.
library(grid)
vp <- vpTree(
viewport(layout=grid.layout(2,2), name="layout"),
children=vpList(
viewport(layout.pos.col = 1, layout.pos.row=1, name="tl"),
2006 Jun 12
1
strange behaviour with rotated viewports in grid
Dear all,
I am having a problem using grid when rotating a viewport. It seems
to plot everything on a grey background colour which I am not able to
get rid of. Even book examples such as that that plot figure 5.10 in
P. Murrell's R Graphics book show the same behaviour.
The following example illustrates this issue. I would appreciate if
anyone has a way to solve this.
Best regards,
2009 May 21
1
size of point symbols
Dear list,
This might be a topic for r-devel but i may be missing something
obvious.
I don't understand the rationale in the absolute sizes of the point
symbols, and I couldn't find it documented. The example below uses
Grid to check the size of the symbols against a square of 10mm x 10mm.
> checkOneSymbol <- function(pch=0){
> gTree(children=gList(
>
2009 May 21
1
size of point symbols
Dear list,
This might be a topic for r-devel but i may be missing something
obvious.
I don't understand the rationale in the absolute sizes of the point
symbols, and I couldn't find it documented. The example below uses
Grid to check the size of the symbols against a square of 10mm x 10mm.
> checkOneSymbol <- function(pch=0){
> gTree(children=gList(
>
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 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)
2011 Oct 31
0
(no subject)
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 Oct 27
0
boxplot using grid
----------------------- *** Disclaimer *** -----------------------
This e-mail and its contents are subject to the SA Reserve Bank's
Disclaimer and Confidentiality Clause, which can be viewed at:
http://www.reservebank.co.za/disclaimer
Should you be unable to access the link provided, please send a
blank e-mail to Disclaimer@resbank.co.za
----------------------- *** Disclaimer ***
2007 Sep 30
1
clipping viewports
Dear useRs,
Why are the rotated blue and yellow boxes in the example below clipped outside of 6 x 6 inch window in the middle of the page?? Where does the 6 x 6 inch window come from? I would like to make use of the entire page.
> library(grid)
> pdf(file = "FarmMaps.pdf", paper = "a4")
> pushViewport(viewport(
+ width = unit(7.6, "inches"), height =
2007 Sep 13
1
minimize white space around lattice plot
Dear list,
I'm trying to produce a plot via xyplot with minimal sourounding white
space. However, I cannot find the options in xyplot, ps.options or
wherever which prevents lattice from drawing quite some white space
around my plot. However, this is quite a problem for me as I want to
produce an inset plot inside another lattice-plot. I'm using the panel
function to open a viewport and