similar to: packGrob and dynamic resizing

Displaying 20 results from an estimated 2000 matches similar to: "packGrob and dynamic resizing"

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().
2005 Apr 14
2
Legend in xyplot two columns
Dear R-Help I have some trouble to set the legend in a xyplot into two rows. The code below gives me the legend in the layout I am looking for, I just rather have it in two rows. library(lattice) schluessel <- list( points=list( col="red", pch=19, cex=0.5 ), text=list(lab="John"), lines=list(col="blue"),
2009 Oct 23
1
Distance between axis and label adjusted automatically?
Is there a way to have the distance between label and axis adjusted automatically? This is interesting in particular for the y-axis, when it is not known in beforehand how many digits the numbers will have. It may happen then, that numbers and label overlap. All examples that I found work by estimating the required distance manually in beforehand and then providing large enough margins, or
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"),
2010 Mar 19
2
lattice grob
Dear list, I'm trying to arrange various grid objects on a page using a frameGrob. It works fine with basic grobs (textGrob, gTree, etc.), and also with ggplot2 objects using the ggplotGrob() function. I am however stuck with lattice. As far as I understand, lattice produces a list of class trellis, which is eventually displayed using the plot.trellis method. I am not sure if/how one can
2011 Apr 26
2
grid stringHeight
Dear all, I'm puzzled by the behavior of stringHeight in the grid package. Consider the following test, library(grid) test <- function(lab="dog", ...){ g1 <- textGrob(lab) g2 <- rectGrob(height=grobHeight(g1), width=grobWidth(g1)) gg <- gTree(children=gList(g1,g2), ...) print(c("height:", convertUnit(stringHeight(lab), "mm",
2007 May 26
1
lattice: aligning independent graphs
I find myself wanting to plot three graphs side by side 'as if' they were panels -- that is, with the same y-axis limits, no space between the graphs, and precise vertical alignment of the plot areas. However, I don't want strip titles; I want each graph to have its own x-axis label, on the bottom of the plot. The best way I have so far found to do this is to fake up a data frame that
2011 Mar 04
1
Units and dimensions in grid object
Dear R-users, As far as I understand, when one defines the width of a rectGrob call using a 'npc' unit, the width of the object is proportional to the width of the current viewport. Is there a way to refer to the height (or width) of the viewport when defining the width (or height) of the rectGrob object? Thanks Sebastien [[alternative HTML version deleted]]
2010 Mar 29
1
xyplot second y-xis and legend
Dear list, I try to set a secondary y-axis in a lattice xyplot. This works. However, I am unable to set a proper legend/key together with the 2nd y-axis under general xyplot procedures. See example below. The combination of the par.settings with simpleTheme and other settings seems to go wrong. I couldn't find a solution from previous topics. Any suggestions? thanks in advance! Robbert
2011 Nov 10
1
grid.pack and grid.frame bewilder me
Hello R friends, I get quite confused in using the grid graphic function grid.pack( ) and grid.frame ( ). Here is a simple example: library(grid) grid.frame(name="frame1") grid.pack("frame1",rectGrob(width=unit(0.5,"npc"), height=unit(0.5,"npc"), gp=gpar(col="red"))) what I expect is a rectangle with half the default device's
2008 Oct 01
3
lapply where each list object has multiple parts
Hi. I have a list where each object in the list has multiple parts. I'd like to take the mean of just one part of each object. Is it possible to do this with lapply? If not, can you recommend another function? Thanks. eric > x1 <- c(0,1,2,3) > x2 <- c(7,8) > x3 <- c(2,6,6,8) > x4 <- c(4,8) > > Lst1 <- list(label1 = x1,label2 = x2) > Lst2 <-
2012 Apr 13
0
Reference Class import() behaviour
Dear All, In a project I've been working on we've been using Reference Classes and grid extensively. However, something that I have come across is that when using the import() method on refclass objects, it does not work as expected with grid grobs and viewports. I have prepared test cases that illustrate the point but the general idea is that importing appears to work fine for
2008 May 07
3
use list elements to subtract values from the dataframe
Hi, I have a dataframe wf existing of a header with different labels and beneath the values of those labels : wf: label1 label2 ... 0,45 0,21 0,10 0,45 .... .... I have a list fl <- c("label2","label3",..) Isn't possible to use the list elements in the list in order to subtract values from the dataframe? like : wf$fl[[1]] When I do in R I get :NULL
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)) ##
2017 May 23
2
[imaptest] Explaining errors
Hi, I'm an Apache James committer and we are curious to use imaptest in order to validate our IMAP protocol implementation. I'm using the nightlybuild : imaptest-20170506 I follow the examples given in the /T/ /est IMAP server compliancy/ examples https://imapwiki.org/ImapTest/Examples. And I wanted to analyse the errors reported, here are some: Error: user1 at james.org[11]: seq too
2017 Apr 25
4
Pigeonhole / Bug with "duplicate" ?
Hello, Previously, while running Dovecot 2.2.27/Pigeonhole 0.4.16 the following code snippet was working as one would expect: if duplicate { addflag ["\\seen", "Duplicate"]; fileinto "Duplicate"; stop; } if address :contains "to" "user.email at example.com" { addflag "$label1"; } After upgrading to
2015 Mar 26
1
Courier-dovecot migration issue: Forward and Junk flags
Hey Steffen Thank you for your feedback. I have the following in my Maildir: cat courierimapkeywords/\:list JUNK $Forwarded $label4 $label1 cat dovecot-keywords 0 JUNK 1 $Forwarded 2 $label4 3 $label1 On 2015-03-26 08:12, Steffen Kaiser wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > On Wed, 25 Mar 2015, Dennis H?jgaard wrote: > >> Hello.. Another courier
2007 May 09
2
Thunderbird or Dovecot bug? (multiple keywords)
Here's a strange one. I have a user who's using Thunderbird 2.0.0 and assigning multiple tags (keywords) to emails, which are getting "lost" (I'll explain) when he leaves the folder and comes back. I can reproduce this on *his* account myself, but cannot reproduce it on *my* account (separate new TBird 2.0.0 profiles on Windows XP). Use the two TBird default tags
2012 Dec 12
2
long margin text below lattice plot - how to wrap lines?
Hello, I've got a lattice plot and need to add text into the bottom margin of the plotting area (below the bottom legend). This seems to work in principle using grid.arrange, yet the text to be added is rather long. As a consequence, it gets clipped: require(lattice) require(grid) myplot <- xyplot(1~1) mytext <- textGrob("This is such a very very long text that it goes on forever
2013 Feb 17
1
addition in the initial question
Dear Elisa, Try this: vec1<-c(33,18,13,47,30,10,6,21,39,25,40,29,14,16,44,1,41,4,15,20,46,32,38,5,31,12,48,27,36,24,34,2,35,11,42,9,8,7,26,22,43,17,19,28,23,3,49,37,50,45) vec2<-vec1[1:26] names(vec2)<-LETTERS[1:26] label1<-unlist(lapply(mapply(c,lapply(seq(0,45,5),function(x) x),lapply(seq(5,50,5),function(x) x),SIMPLIFY=FALSE),function(i)