similar to: Using grid graphics (hexbin) in pairs() plot problem

Displaying 20 results from an estimated 800 matches similar to: "Using grid graphics (hexbin) in pairs() plot problem"

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 =
2008 Sep 01
1
npc to native coordinates for xyplot
Hello, I am having trouble adding symbols to grid graphics. I am able to create a lattice scatterplot using xyplot, which has a range from -15:15 in both the X and Y directions. However, when I try to add circles and text to this graph using grid.circle() and grid.text(), they are offset using the default npc coordinates. Nothing happens when I pass the parameter default.units="native"
2005 Mar 31
1
hexbin and grid - input data values as coordinates
Dear all, I am trying to use hexbin and read the very interesting article on grid ( http://www.ci.tuwien.ac.at/Conferences/useR-2004/Keynotes/Murrell.pdf ) and am hoping for some advice from more experienced users of hexbin. I am trying to visualise a data and fit a straight line trough it. For example, here is how I would do it in the usual way # simulate data x <- rnorm(1000) y <-
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
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
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)
2011 Dec 12
0
limit ranges in hexbin
Hello everybody, I hope you can give me some help with limiting the ranges in x, y, and z for a hexbin plot. All I have found on the net is an unanswered message to this list from last year, so I hope my problem is not too stupid. I would like to plot some data using hexagonal binning. Currently, I am doing the following: library(hexbin) data<-scan("input.dat", what =
2004 Nov 09
1
gplot.hexbin - how to set figure margin.
Hi, Would like to use to the hexbin package to plot a 2D hist - because it looks really _cool_. My problem is related to drawing a pdf hexbin graphic in series of other graphics. All other figures have a par(mar=c(3.2,3.2,1,1)). So the gplot.hexbin figure in this series looks a little alienated? Was trying a to specify the _mar_ using par, viewport, hexViewport etc. a little. My question. How
2010 Jul 23
0
overriding axis limits in hexbin plot?
[cc'd to package maintainer] This feels like a fairly straightforward question, so I'm surprised not to have found an answer so far (RSiteSearch, package help, vignette ...) It seems fairly hard (without some fairly serious hacking) to hard-code the axis limits in a hexbin plot from the hexbin package. Here's what I've figured out so far: * when you do the hexagonal
2008 May 30
1
Question about adding text to xYplot(Hmisc)
Hello, I have been trying to make a graph that have error bars and text at specific position. I used the following code from the help file of xYplot(Hmisc) as an example except I add a myPanel function, which is just supposed to add letters from the alphabet at the position aligned at y = 3. It constantly gives me error: "Error using packet 1 argument "subscripts" is
2011 Aug 20
1
Groups and bwplot
Dear R-users, A while ago, Deepayan Sarkar suggested some code that uses the group argument in bwplot to create some 'side-by-side' boxplots (https://stat.ethz.ch/pipermail/r-help/2010-February/230065.html). The example he gave was relatively specific and I wanted to generalize his approach into a function. Unfortunately, I seem to have some issues passing the correct arguments to the
2012 Mar 22
3
How to export hexbin tables?
Hi all! I'm trying to save an output of the HEXBIN process... is so much data (105k), and I need to export to an ASCII file. I tried to use: write.table() ----> Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce class 'structure("hexbin", package = "hexbin")' into a data.frame cat() ---> Error in cat(list(...), file, sep, fill,
2009 Jun 28
1
help with hexbin package
Dear All i am trying to figure out the use of hexbin function in the hexbin package --can any one send me a working example of the same The > example(hexbin) ---option is of not much use Thanks Kind regards Ravi [[alternative HTML version deleted]]
2007 Sep 27
1
problem loading hexbin associated package colorspace
I have lots of data that I need to display, and I think hexbin would be good for it. However, I cannot load one of the requried packages associated with the hexbin package: > library(hexbin) Loading required package: colorspace Error in loadNamespace(package, c(which.lib.loc, lib.loc), keep.source = keep.source) : in 'colorspace' methods for export not found: [, coords, plot
2012 Mar 01
2
How to colorize the panel backgrounds of pairs()?
Dear expeRts, I would like to colorize the backgrounds of a pairs plot according to the respective panel number. Here is what I tried (without success): count <- 0 mypanel <- function(x, y, ...){ count <<- count+1 bg. <- if(count %in% c(1,4,9,12)) "#FDFF65" else NA points(x, y, cex=0.5, bg=bg) } U <- matrix(runif(4*500), ncol=4) pairs(U, panel=mypanel) I
2011 Jan 21
1
Help for lattice. par(new=TRUE)
Hi list, I want to plot two plot in the same figure. I set par(new=TRUE). But it does not work. library(lattice) myPanel <- function(x,...) { panel.histogram(x,alpha=0.4,...) ltext(0.4,1.5,paste("Mean=","0.05",digit=2)),cex=0.8) ltext(0.8,1.5,paste("s.d.=","0.06",digit=2)),cex=0.8) } histogram(sh2,
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.
2009 Aug 08
0
Hexbin margins
Hi All - I'm having a layout problem with hexbin. The axis labels overlap with the axis tick labels. I've tried changing grid and trellis layout settings, as well as the more obvious mar settings without luck. Here's how to recreate the probem: require(hexbin) x <- abs(rnorm(500,500,500)) y <- jitter(x) bin <- hexbin(x,y,) srt=plot(bin,xlab="Average X Value",
2011 Jan 04
0
Error in M[, 1] : incorrect number of dimensions when trying to plot hexbin
Hello again, I am trying to plot out activity regions the user did on the screen via plotting a hexbin. I have 20 users whose information i want to plot out and it stops in the user 16 with the message Error in M[, 1] : incorrect number of dimensions. Any advice would be appreciated as i dont see why this error occurs on the data for the 16th user. All the other users get plotted out