search for: dataviewport

Displaying 8 results from an estimated 8 matches for "dataviewport".

2008 Jul 09
1
childNames for xaxis grob (grid package)
...Names below gives character(0) instead of the (canonical) names of the children grobs of the xaxis gTree ? [1] "major" "ticks" "labels" Many thanks in advance, Tobias ### minimal example code ### library(grid) pushViewport(plotViewport(c(5,4,4,2))) pushViewport(dataViewport(1:5, 1:5)) grid.points(1:5, 1:5) grid.xaxis(name = "xa") grid.get("xa") childNames(grid.get("xa")) ### sessionInfo() ### > sessionInfo() R version 2.7.1 (2008-06-23) i486-pc-linux-gnu locale: en_US.UTF-8 attached base packages: [1] grid stats graphics...
2008 Jan 14
2
Need help with xspline error message in R 2.6.1 on Windows XP
...MPTS (25200) This is the code that generates this error. plot.results <- function(dfn) { dt <- read.table(dfn) shp <- rep(1, as.numeric(length(dt$year))) shp[1] <- shp[as.numeric(length(dt$year))] <- 0 grid.rect() pushViewport(plotViewport(c(5.1, 4.1, 4.1, 2.1))) pushViewport(dataViewport(dt$year, dt$mean)) grid.rect() grid.xaxis() grid.yaxis() grid.points(dt$year, dt$mean, pch=16) grid.xspline(dt$year, dt$mean, shape=shp, open=TRUE, gp=gpar(col="red")) popViewport(2) } plot.results("section01_model_results.dat") And here is the data that is being used:...
2009 Oct 27
0
boxplot using grid
...uot;), unit(0.75, "npc")), rep(unit(bxp$stats[3], "native"), 2), gp = gpar(lwd = 2), name = "median" ) if(On != 0){ grid.points(x = rep(unit(0.5, "npc")), y = O) } } # Code run x <- rnorm(100) pushViewport(plotViewport()) pushViewport(dataViewport(yData = x, xscale = c(0, 1))) grid.yaxis() bxplt(x) Additionally, some people might be wondering why I am reimplementing the bocplo using grid. The reason is that I need to annotate the plot with something a little more elegant than arrows... I wrote the following function, which seems to work, bu...
2002 Nov 27
2
grid package and lines
Hello list, When using the grid package in R 1.60 under windows grid.lines and grid.line.to seem not to use the coordinate system as defined by the current viewport whereas grin.points does. Am I doing something wrong? Sten -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send
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.)
2002 Jun 07
2
offset labeling boxplots
Hello everybody, often I plot boxplots with different number of boxes (up to 200 boxes). I'd like to give every box a readable label on the x-axis. Therefore, I decrease the fontsize of the names and plot them vertical. But if you zoom into the plot (pdf) you will find an offset between the tickmark and the label - the label is shifted to the right. If you vary the box.count in the
2005 Apr 18
1
R-2.1.0 is released
...9; gpar; a line width multiplier. - grid.text() now handles any language object as mathematical annotation (instead of just expressions). - plotViewport() has default value for 'margins' argument (that match the default value for par(mar)). - The 'extension' argument to dataViewport() can now be vector, in which case the first value is used to extend the xscale and the second value is used to extend the y scale. (suggested by Ross Ihaka). - All 'just' arguments (for viewports, layouts, rectangles, text) can now be numeric values (typically between 0 [left...
2005 Apr 18
1
R-2.1.0 is released
...9; gpar; a line width multiplier. - grid.text() now handles any language object as mathematical annotation (instead of just expressions). - plotViewport() has default value for 'margins' argument (that match the default value for par(mar)). - The 'extension' argument to dataViewport() can now be vector, in which case the first value is used to extend the xscale and the second value is used to extend the y scale. (suggested by Ross Ihaka). - All 'just' arguments (for viewports, layouts, rectangles, text) can now be numeric values (typically between 0 [left...