similar to: grid stringHeight

Displaying 20 results from an estimated 600 matches similar to: "grid stringHeight"

2011 Oct 25
1
R fails when converting units using Hershey-Fonts
I run into some problems when trying to convert units using Hershey-Fonts: R chrashes. > library(grid) > label <- "some text" > pushViewport(viewport(gp=gpar(fontfamily="HersheySerif"))) > convertHeight(stringHeight(label), unitTo="mm") *** caught segfault *** address 0xadc838f8, cause 'memory not mapped' Traceback: 1:
2009 Sep 19
1
matrix operations on grobs and grid units
Dear list, As a minimal test of a more complex grid layout, I'm trying to find a clean and efficient way to arrange text grobs in a rectangular layout. The labels may be expressions, or text with a fontsize different of the default, which means that the cell sizes should probably be calculated using grobWidth() and grobHeight() as opposed to simpler stringWidth() and stringHeight().
2011 Mar 04
2
Creating a .png with just an expression() in it
Hey, I'm trying to create an image file with the results of a regression analysis. In TeX, the line would be something like: $ size = 0.34 + 4.3 var_1 $ Can I create a plot window with just this line in it? I tried playing around with plot.new() or dev.new(), but didn't really find something that worked. Thanks in advance, Alex -- alexx at alexx-fett:~$ vi .emacs
2008 Oct 17
1
Using key.opts in Ecdf/labcurve (Hmisc package)
I'm presumably missing something very obvious, but how does one use the key.opts argument in labcurve (via Ecdf)? In this example, I want the key to be big and have a blue background, but it isn't and doesn't. ch <- rnorm(1000, 200, 40) sex <- factor(sample(c('female','male'), 1000, TRUE)) Ecdf(~ch, group=sex, label.curves=list(keys=c("f",
2009 Jun 26
1
gradient fill of a grid.polygon
Dear list, Following a recent enquiry, I've been playing with the idea of creating a colour gradient for a polygon, using the Grid package. The idea is to draw a number of stripes of different colours, using the grid.clip function. Below is my current attempt at this, library(grid) rotate.polygon <- function(g, angle=0){ # utility function, works fine matR <- matrix(c(cos(angle),
2005 Jun 02
0
Thanks! (was panel.axis() & grid/lattice settings)
Deepayan, Paul: Thanks very much for the very useful leads. I just spent some time this afternoon implementing your suggestions and my early test results are very encouraging. Paul, I understand the potential device re-sizing issue with the convert family of functions in grid, and will be in touch in case it becomes problematic for my applications. I very much look forward to your upcoming
2004 Apr 12
1
R 1.9.0 is release
I've rolled up R-1.9.0.tgz a short while ago. This is a new version with a number of new features, most notably a substantial reorganization of the standard packages, a major update of the grid package, and the fact that underscore can now be used as a regular character in variable names. See below for further changes. Because of the disturbances at the machine that hosted the CVS archives,
2004 Apr 12
1
R 1.9.0 is release
I've rolled up R-1.9.0.tgz a short while ago. This is a new version with a number of new features, most notably a substantial reorganization of the standard packages, a major update of the grid package, and the fact that underscore can now be used as a regular character in variable names. See below for further changes. Because of the disturbances at the machine that hosted the CVS archives,
2009 Sep 24
1
unexpected behavior of `[<-` method for class unit.arithmetic
Dear list, Consider the following, library(grid) w = unit.c(unit(1, "in"), unit(2, "in")) w2 = w + unit(1, "mm") w[2] <- 0 w2[2] <- 0 convertUnit(w, "mm") #[1] 25.4mm 0mm convertUnit(w2, "mm") #Error in grid.Call("L_convert", x, as.integer(whatfrom), as.integer(whatto), : # INTEGER() can only be applied to a
2011 Feb 15
1
gList and gTree methods of grid::grobX
Dear all, In an attempt to draw fill patterns in grid graphics, I have encountered a behavior of grobX that I cannot understand from the documentation. Consider this, library(grid) ## gTree g1 <- gTree(children=gList( rectGrob(0.5,0.5, width=unit(0.8,"npc"), height=unit(2,"cm")), circleGrob(r=0.3)), vp=viewport(0.5,0.5)) ##
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"),
2005 Oct 03
2
grob questions
If I run the following example from: http://www.stat.auckland.ac.nz/~paul/grid/doc/grobs.pdf > grid.newpage() > pushViewport(viewport(w = 0.5, h = 0.5)) > myplot <- gTree(name = "myplot", children = gList(rectGrob(name = "box", + gp = gpar(col = "grey")), xaxisGrob(name = "xaxis"))) > grid.draw(myplot) >
2005 May 18
3
known_hosts vulnerability?
Hey all, I came across a security news article, referenced by http://www.linux.org/news, at http://www.techworld.com/security/news/index.cfm?NewsID=3668 talking about an SSH weakness involving the known_hosts file. I apologize if this issue has already been addressed, but the mailing list archives didn't turn up anything when i tried searching for something relevant. So; not to knee-jerk or
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
2004 Nov 08
3
location of key in panels of trellis plot
Hi, I want to insert a key into each panel of a trellis plot, which I can do with a custom panel function that calles draw.key. The problem arises because I want the top right hand corner of the key to start in the top right hand corner of the panel. If you run my code below, you can see that the key appears in the center of each panel. This is because the default viewport in draw.key is the
2007 Mar 25
1
controlling panel.width and panel.height in viewports
Dear all, I'm trying to get a series of lattice levelplots to appear in viewports in a particular way but struggling to exert fine control over their appearence. There are two conditions: (a) I only want the levelplot to appear (I don't want axes, colour key, etc) in the viewport and (b) I want the levelplot to expand to the maximum allowable space in the viewport while observing
2005 Oct 12
1
Problem with a barplot...
Hello, I'm having a bit of a problem with a plot, and I'm hoping that someone might be able to help. I'm running the R Cocoa Gui v1.12 on OS X 10.4.2, and I'm doing a stacked bar plot. The plot itself is quite simple: barplot(as.matrix(s.strats.in),main="Strategy when strong", col=strat.col) where s.strats.in is a matrix with a number of rows that define the height
2009 May 21
1
size of point symbols
Dear list, This might be a topic for r-devel but i may be missing something obvious. I don't understand the rationale in the absolute sizes of the point symbols, and I couldn't find it documented. The example below uses Grid to check the size of the symbols against a square of 10mm x 10mm. > checkOneSymbol <- function(pch=0){ > gTree(children=gList( >
2009 May 21
1
size of point symbols
Dear list, This might be a topic for r-devel but i may be missing something obvious. I don't understand the rationale in the absolute sizes of the point symbols, and I couldn't find it documented. The example below uses Grid to check the size of the symbols against a square of 10mm x 10mm. > checkOneSymbol <- function(pch=0){ > gTree(children=gList( >
2009 Mar 04
5
Detect polyline relationship to map bounds?
I''m working on a mapstraction implementation modeled after the radius search feature. (http://mapstraction.com/demo-radius.php) I''d like to recognize when the user extends the radius beyond the visible edges of the map and adjust the zoom level. I''m not seeing how to test this when redrawing the circle. I thought maybe I wanted to use polylineCenterAndZoom()