similar to: Using dates on axis with Grid plots

Displaying 20 results from an estimated 10000 matches similar to: "Using dates on axis with Grid plots"

2009 Jul 21
2
animated grid graphics
I need to make a fairly complex animated graphic and decided to use grid for it. A very simple example of what I need: ##============================================================================== library(grid) grid.newpage() pushViewport(plotViewport()) pushViewport(viewport(xscale = extendrange(c(0, 100)), yscale = extendrange(c(0, 100)))) grid.xaxis() grid.yaxis()
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.)
2010 Oct 20
1
need for speed on grid.rect
When I use grid.rect to print a multi-coloured grid, it is incredibly slow compared to a single colour grid, or even a two colour grid. I've set out some simplified examples below. This is something I run literally thousands of times a day, so I would greatly appreciate any hints on how I might improve the speed??? library(grid) pushViewport(viewport( width = unit(100,
2012 Sep 27
1
Problem with grid.rect
I have a stupid problem that is currently driving me crazy... Let us suppose that I want to draw a big red square in the middle of my current device (say X11) I tried the following code : pushViewport(viewport(xscale=c(0,1), yscale=c(0,1)), just=c("center", "center")) vp1 <- viewport(x=unit(0.5, "native"), y=unit(0.5, "native"), width=unit(0.4,
2010 Nov 20
1
Grid newbie: aligning & scaling viewports
Oh Knowledgeable Ones: I'm working on a project using grid graphics (for the first time). A toy example is given below, run it simply with >foobar() I am wondering why the pink dot and concentric circles are not centered on the 3-color axis system. Further, I feel like the concentric circles don't have the intended radius - if my math is right, the outmost circle should touch the
2012 Nov 22
1
How to read jpeg image with russian font in R?
Hi, I m working on R and read one image with russian font using readjpeg() function and write it on pdf (using grid). But russian text is not visible on pdf. How can i fix my pblm? Regards <http://r.789695.n4.nabble.com/file/n4650417/pointer.jpg> library(JPEG) library(grid) pdf("out.pdf" , width = 6.6 ,height = 4.2,family= "URWHelvetica", encoding="KOI8-R")
2004 Aug 27
1
Plotting irregular grid as image or persp
Hi, I have an array of 2d node locations and an array triangles, and would like to plot something like a image or persp. An example of doing it with rgl is: library(ncdf) library(rgl) # wget http://www.maplepark.com/~drf5n/extras/teapot.nc teapot<-open.ncdf("teapot.nc") z<-get.var.ncdf(teapot,"tris") l<-get.var.ncdf(teapot,"locations")
2008 Jul 28
1
grid.ls() after grid.remove() fails
Dr Murrell and others, It seems grid.ls() fails after any use of grid.remove(). It gives an infinite recursion error even in the simplest cases, and no matter what arguments are passed to grid.ls. > library(grid) > grid.newpage() > grid.lines(name="foo") > grid.ls() foo > grid.remove("foo") > grid.ls() Error: evaluation nested too deeply: infinite recursion
2009 Jun 23
2
curvedarrow (some graphics problem)
Hi there, I just wonder how to draw this kind of picture... http://www.nabble.com/file/p24158796/b.jpg http://www.nabble.com/file/p24158796/a.jpg and this is what i have done %%%%% library(shape) library(diagram) curve(sin(x),bty="n",-8,8,yaxt="n",ylab="",xaxt="n",type="n",xlab="") axis(1,labels=F,at=seq(-8,8,1))
2007 Feb 21
3
Different gridlines per panel in xyplot
In the example R script below, horizontal gray gridlines are drawn at y coordinates where the points are drawn with the code: panel.abline(h=y, v=xScale, col.line="gray") How do I change this so that the horizontal gray gridlines are drawn at y coordinates where the y labels are drawn? The challenge is that each panel has different y-ranges (in my real example the y-ranges and
2011 Apr 28
2
gridBase Base Plot Positioning
Hello, I'm trying to follow the documentation of how to use gridBase, and I've reached the minimal code example below as my best effort. Can someone explain how to keep the column of boxplots on the same page as the rectangles (even though I've tried new = TRUE) ? Also, would it be hard / possible to match up the middle of each boxplot to the middle of each rectangle ?
2003 Jul 21
1
Lattice: how to draw some text outside the panel?
Dear r-help I draw plots with xyplot() function. Each plot contains also a line of regression. I want to write the trend value and its significance (obtained with lm()) below each panel. I use ltext() for this. But the text is cut, when it comes outside a panel. Moreover (obviously), it doesn't appear at all when its coordinates are outside a panel. Could you,
2008 Jul 09
1
childNames for xaxis grob (grid package)
Dear list, Can someone explain why the childNames 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)
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
2003 Apr 27
2
bug and proposed fix in print.trellis 1.7.0 (PR#2859)
This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. Send mail to mime@docserver.cac.washington.edu for more info. ---1678264062-154654637-1051422990=:2626055 Content-Type: TEXT/PLAIN; charset=US-ASCII ---1678264062-154654637-1051422990=:2626055 Content-Type: TEXT/PLAIN; charset=US-ASCII;
2012 Nov 14
3
ctree
Hello, I plotted a nice tree with "ctree" . It shows 3 nodes with the prediction of my 2 groups. (see picture) Unfortunately I need a larger scale to read the exact prediction of my groups to get the specificity and sensitivity. I tried to change the scale with "axis" but it didn't work, my guess because it's not a normal graph with x and y axis. Has someone an idea
2005 Oct 15
2
grid.edit problem
I am having a problem in editing a grob. It works ok if I try to shift the grob using npc coordinates but if I do the same thing using native coordinates the grob disappears. What is wrong? library(grid) grid.newpage() # create viewport pushViewport(viewport(xscale = c(100,200), name = "X")) # draw vertical line grid.lines(150, 0:1, default.units = "native", name =
2012 May 22
2
package grid: mirror grob objects along an axis
Hi everyone I'd like to flip grobs (grid graphical objects) along an axis, e.g. flip grobs horizontally or vertically. I couldn't find any hints, neither in the documentation nor by searching the web. Does anybody know how to achieve this? Cheers /thomas
2002 Apr 08
2
user coordinates and rug plots in lattice graphics
Dear R list members, I'd like to produce rug plots at the bottom of panels in a trellis display (using the lattice package), but par("usr") doesn't return user coordinates for panels, and consequently rug fails, as the following example (suggested to me by Georges Monette) illustrates: > x <- rnorm(50) > y <- rnorm(50) > f <-
2013 Jun 10
1
Using Lattice, LatticeExtra - Hide right and top axes in multipanel plots
Dear Rxperts, How do I hide the top and right axes in multiple panel plots? A couple of examples are provided below.. Would highly appreciate appreciate your assistance.. #Example 1 library(latticeExtra) xyplot((1:200)/20 ~ (1:200)/20, type = c("p", "g"), scales = list(x = list(log = 2,alternating=0), y = list(log = 10,alternating=0)), xscale.components =