similar to: navigating ggplot viewports

Displaying 20 results from an estimated 130 matches similar to: "navigating ggplot viewports"

2007 Jul 12
1
ggplot2 / histogram / y-axis
Is there a way in ggplot to make a histogram with the left-hand y-axis label as frequency, and a right-hand y-axis label as percentage? Thanks! Pete
2008 Sep 29
2
ggplot 2 - editing in the "panel_1_1" viewport
Hi All, I am trying to find out how to access the components of a ggplot plot, and I found this reply from Paul Murrel http://www.nabble.com/navigating-ggplot-viewports-tt14826352.html#a15056223. I tried it, and it works. However, I am trying to develop some functions that will do the drawing "automatically", and usually I will not know the full name of the grob that has the layout vp,
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"),
2007 May 12
2
Implicit vs explicit printing and the call stack
Hi everyone, I've run into a bit of strange problem with implicit vs explicit printing and the call stack. I've included an example at the bottom of this email. The basic problem is that I have an S3 object with a print method. When the object is implicitly printed (ie. typed directly into the console) the function arguments in the call stack are exploded out to their actual values,
2008 May 02
1
Error in downViewport.vpPath(vpPathDirect(name)
Hi, I am having trouble plotting a series of dendrograms using lattice and grid code as found in Paul Murrells book R Graphics. This is the error message I recieve: Error in downViewport.vpPath(vpPathDirect(name), strict, recording = recording) : Viewport 'plot1.panel.1.1.off.vp' was not found I have attached the code and also my data file. Should anyone have any suggestions then
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=
2011 Jul 01
1
beginner question - effective way to chart sleep habits
Hi - beginning R user question here - each day, over the course of several months, I've tracked the time I go to bed, the time I wake up, and my hours spent sleeping. What would be a good way to display this information? I think it would be ideal to show something resembling a bar and whisker graph for each day that would show the interval of hours spent asleep (or perhaps just a bar
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
2007 Dec 26
1
seekViewport error
Why does the seekViewport at the bottom give an error? > xyplot(Sepal.Length ~ Sepal.Width, iris, group = Species, col = 11:13, + auto.key = TRUE) > grid.ls(view = TRUE) ROOT GRID.rect.89 plot1.toplevel.vp plot1.xlab.vp plot1.xlab 1 plot1.ylab.vp plot1.ylab 1 plot1.strip.1.1.off.vp GRID.segments.90 1 plot1.strip.left.1.1.off.vp
2018 May 21
0
draw borders of bars inside of the rectangles in a barplot
I recommend instead of no border, that you use a border with the same color as the fill. I do this in the likert functions in the HH package. Rich On Mon, May 21, 2018 at 10:59 AM, Martin Batholdy via R-help <r-help at r-project.org> wrote: > Dear R-users, > > I want to draw a barplot with beside=TRUE. > One halve of the bars are drawn with a border, while the other halve are
2010 Dec 07
2
tableGrob and properties of a cell
Hello there, could you please help to modify gpar() properties of a cell inside tableGrob() output. In the following example I want to have different color for one out of 4 cells require(gridExtra) z<-matrix(1:4,2,2) grid.draw(tableGrob(z)) The only way I found for now how to do it is to do something like this downViewport(current.vpTree()$children[[1]]$children[[6]]$name)
2018 May 21
3
draw borders of bars inside of the rectangles in a barplot
Dear R-users, I want to draw a barplot with beside=TRUE. One halve of the bars are drawn with a border, while the other halve are drawn without a border (i.e. filled bars vs. non-filled bars next to each other). Because borders are drawn around the bars, doing this leads to one halve of the bars being wider than the other halve, expanding across the 0-point of the y-axis. This problem emerges
2006 Jul 19
1
plain shading (not residuals) in mosaic plot
Hello. I've been using R for a couple of months and enjoying it a lot. This is my first post to R-help. I'm using the vcd package to make mosaic plots with labels on the tiles indicating the number of items in each cell. For example, I've made this plot: > allmorph<-structure(c(10, 26, 17, 100, 70, 97, 253, 430, 185, 177, > 25, 1), .Dim = as.integer(c(6, 2)), .Dimnames
2006 Jun 14
2
positioning of separate y-axis labels in xyplot
I like the functionality provided by outer=TRUE, but when it comes time to place separate xlabs or ylabs, I always end up 'eyeballing' it on a case-by-case basis. For example, ##begin example require(lattice) cars.lo <- loess(dist ~ speed, cars) print(xyplot(cars.lo$residuals+cars.lo$fitted~cars.lo$x, strip=FALSE, outer=TRUE, layout=c(1,2),
2018 May 31
2
How to alpha entire plot?
I have two chromatograms I want plotted on the same axes. I would like the plots to be transparent, so the first chart is not obscured. I have tried adjustcolor(..., alpha.f=0.3), the problem is that my chromatogram is so dense with datapoints that they overlap and the entire graph just ends up a solid color. The second histogram still obscures the first. Consider this example: col1 <-
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()
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 21
1
rc note, etc
Are the messages below to be expected from make check-all ? using the rc today, Aug 21, on Red Hat Enterprise Linux AS release 4 (Nahant Update 4) Kernel 2.6.9-42.0.8.ELsmp on an x86_64 Paul ________ .... checking package 'utils' .... * checking R code for possible problems ... NOTE install.packages: no visible global function definition for ?.install.winbinary? install.packages: no
2010 Oct 29
1
Underline only colnames in grid.table
Dear all, I would like to underline only the colnames in a table as e.g. grid.draw(tableGrob(head(iris, 10), name="test")) I can imagine you should use grid.edit or so, bu I can't figure out how... Does anyone have a suggestion? Thanks Robbert windows xp R 2.10.1 -- View this message in context: