similar to: npc to native coordinates for xyplot

Displaying 20 results from an estimated 3000 matches similar to: "npc to native coordinates for xyplot"

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)
2008 Dec 05
1
Trouble with gridBase and inset plots
Dear All, I ma having a trouble in generating a figure containing 3 insets with the gridBase package. I always get an error message of the kind: Error in gridPLT() : Figure region too small and/or viewport too large No matter which parameters I choose. The plots works nicely with two insets only, but when I try adding the third one, my troubles begin. I am probably doing something wrong in the
2006 Apr 06
2
key position in trellis plotting area
Hi, I want to do the following: 1) create a trellis plot with 1 x 1 layout 2) add a key in the upper right hand corner of the plotting region (i.e., the panel), but after the initial call to trellis 3) resize the resulting device graphics device without changing the relative position of the key For instance, the code below draws the key relative to the device window--not the plotting area.
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
2007 Oct 19
1
Using grid graphics (hexbin) in pairs() plot problem
Hi, I am trying to create a plot with pairs() using a gplot.hexbin() for each pair. For pairs I can provide a custom upperPanel function: pairs(iris[1:4], panel=mypanel) and mypanel() calls plot.hexbin(): library(hexbin) # Bioconductor mypanel <- function(x, ...){ hb <- hexbin(x) plot(hb) } The problem is that gplot.hexbin() is based on the
2005 Feb 13
1
Transparent Pie Charts
Hi again! I put this question in another topics post before but I fear it might drown there. Is it possible to have transparent / alpha blended colors for pie charts? I am using the pies in a map of pies and those pies are sometimes overlapping so it would be great to see if another pie lies beneath. Thanks, Werner
2009 Jun 24
1
parallel rotated strips with color gradient
Hi, I want to produce two parallel rotated strips with color gradient. So far, the sample strip is something produced by this: pushViewport(viewport(x = unit(0.638, "npc"), y =unit(0.386, "npc"), width=.62, height=0.006, angle=137.2)) grid.rect(y=100:1/100, just="top", gp=gpar(col=NA, fill=colorRampPalette(c("lightgray",
2009 Mar 21
1
Forestplot () box size question
Hi All, I have been able to modify the x-axis to start at zero by adding xlow and xhigh parameters; that was pretty simple. I have been unable to find the location of the code that would turn off the information weighting of the box size (I have smaller randomized trials getting less weight than a much larger non-randomized trial). The function is forestplot() from rmeta. Thanks for any
2007 Sep 02
2
Different behavior of mtext
Dear R Users, I am quite surprised to see that mtext gives different results when it is used with 'pairs' and with "plot'. In the two following codes, it seems that the 'at' argument in mtext doesn't consider the same unit system. I would appreciate your comments on this issue. Sebastien ##### Pairs mydata<-data.frame(x=1:10,y=1:10) par(cex.main=1,
2007 Oct 24
1
Rotated viewports in Grid
Hi all, I'm trying to generate a plot containing a scatterplot, with marginal densityplots for x and y. However, when I try to generate a vertical densityplot, I get the message "warning: can't clip to rotated viewport", and nothing shows up. I'm probably misunderstanding how viewports are meant to be used, so if someone could give me a hint, I'd be most grateful. my
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 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 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
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)),
2008 Sep 20
0
gridBase and layout
Dear list, I have produced a fairly intricate plot arrangement for use in a publication using layout() and gridBase, and out of curiosity I'd like to learn whether a more elegant and robust solution could be obtained with grid to avoid the layout() function. > library(gridBase) > x <- seq(-pi, pi, length=10) > y <- cos(x) > > par(mar = c(0, 0, 0, 0), pty =
2007 Aug 28
2
Limiting size of pairs plots
Dear R-users, I would like to add a legend at the bottom of pairs plots (it's my first use of this function). With the plot function, I usually add some additional space at the bottom when I define the size of the graphical device (using mar); grid functions then allows me to draw my legend as I want. Unfortunatley, this technique does not seem to work with the pairs function as the
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),
2008 Jun 01
1
transforming output of grid.locator() to coordinates of a leaf viewport
Short form: How do I transform the output of grid.locator() (or grid.locator(unit='npc')) to the native (or npc) coordinates of a viewport other than the top-level viewport? Thanks in advance. -Ben Long form: I would like the user to be able to click anywhere on the R graphics window. I would then like to figure out which leaf viewport the user clicked in and compute the native
2006 Aug 01
1
R crashes using pdf() windows() or postscript()
Dear HelpeRs, I have a script where I save several thousands of graphics. These are then used in Latex through Sweave. Unfortunately R crashes while making these plots and Windows pops up some message that I run low on virtual memory. I tried to save the plots using pdf(), windows() and postscript() and also tried to run it with R CMD BATCH myscript.R. But after a while R slows down and crashes