Displaying 20 results from an estimated 10000 matches similar to: "lattice: horizontal alignment of labels in key"
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
2008 Jan 23
1
adjusting y axis labels in lattice plots?
Are there parameters that would allow adjusting y axis labels in lattice
plots? E.g in the following simple example
require(lattice)
xyplot(rnorm(10) ~ 1:10, scales=list(alternating=2))
it would be nice to have the y axis labels adjusted to the right or at the
decimal point instead of left adjustment.
Thomas Zumbrunn
--
Thomas Zumbrunn
Institute of Zoology, University of Basel
Vesalgasse
2011 Jul 08
1
lattice: How to vertically adjust an axis label?
Dear expeRts,
How can I vertically adjust an axis tick label so that it is nicely aligned with
the other labels?
library(lattice)
xyplot(0~0, xlim=c(0,3), scales=list(x=list(at=c(1,1.1), labels=c(expression(hat(theta)[italic(n)]),expression(theta)))))
## aim: move the leftmost expression up so that theta is nicely aligned with the second theta.
Cheers,
Marius
2004 Oct 16
1
problem with axis labels
Dear R users,
Below are some R commands which produce a y-axis label that is not wholly
in the viewing area of the eps file (or the x11 window).
I have tried experimenting with the postscript bounding box, and using
such R commands as over(phantom(0),...) but I make the whole y-label
visible.
Does anyone have any suggestions for how I may fix this. (Please CC
mailing list email to p.stansell
2005 Jun 06
2
How to vectorize
Dear R-List,
I would like to write nicely the names of some isotopes on a plot. The
code bellow works fine.
plot(1:10,1:10)
text(c(2,4,8),c(2,4,8),labels=c(expression(italic(phantom(0)^{78}*Ge)),
expression(italic(phantom(0)^{137}*Cs)),
expression(italic(phantom(0)^{129*m}*Te))),
cex=3
)
But, since I have a lot of
2005 Jun 06
2
How to vectorize
Dear R-List,
I would like to write nicely the names of some isotopes on a plot. The
code bellow works fine.
plot(1:10,1:10)
text(c(2,4,8),c(2,4,8),labels=c(expression(italic(phantom(0)^{78}*Ge)),
expression(italic(phantom(0)^{137}*Cs)),
expression(italic(phantom(0)^{129*m}*Te))),
cex=3
)
But, since I have a lot of
2009 May 20
2
arrangement of crowded labels
Dear R users
I'm looking for algorithms that assist in spreading out crowded labels, e.g.
labels of points in a scatter plot, in order to obtain a nicer visual
appearance and better legibility.
I'm probably just stuck because I didn't find the right key words for a
successful search on the R websites or in the mailing list archives.
Any hints are appreciated.
Thomas Zumbrunn
2008 Dec 11
2
call lattice function in a function passing "groups" argument
I'm trying to use a lattice function within a function and have problems
passing the "groups" argument properly. Let's say I have a data frame
d <- data.frame(x = rnorm(100), y = c("a", "b"))
and want to plot variable x in a densityplot, grouped by the variable y, then
I would do something like
densityplot(~ x, d, groups = y)
If however I wanted to
2011 Jul 27
2
Creating a flat legend 'grob' for lattice xyplot
Hi,
I want my xyplot legend to be flat, not tall, and there seems to be no way
for xyplot's auto.key and key elements to do this: I tried many, many
permutations of what I could find in the archives and reading the
documentation. If there there's a way to make it flat, please tell me what
the magic incantation is.
Here's a simple example of what I like to see. The xyplot will be a
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
2008 Aug 14
1
ggplot2: remove minor-horizontal guide before drawing
Hi,
I want to remove minor-horizontal and minor-vertical lines from a plot
generated with ggplot2. I can do this after the plot has been drawn
using grid.gremove.
However, I would like to do it before drawing my plot. The ggplot2 book
refers to a ggplotGrob function which creates a grob from a plot but
this function doesn't seem to exist in ggplot2 0.6.
Is there another way to do it?
2005 Jun 22
1
How to use expression in label with xYplot
Dear R-List,
I want to use the label function (from Hmisc library) to allow for the
names of my isotopes.
library(Hmisc)
library(lattice)
library(grid)
num <- c("78","137","129m")
nom <- c("Ge","Cs","Te")
df <- data.frame(GE78=seq(nom),CS137=seq(nom),TE129m=seq(nom))
if I use this function to create the labels :
lab <-
2011 Dec 09
1
Align expression and text in mtext()
Dear R-helpers,
I have trouble aligning an expression with a subscript, and text, in margin
text:
par(mar=c(6,6,1,1))
b <- barplot(1:3)
mtext(c("A","B","C"), at=b, side=1, line=1, cex=1.3)
mtext(expression(italic(C)[a]~(more~text)), at=0, line=1, side=1,cex=1.3)
As explained in the help files and elsewhere, I understand that the
expression is aligned by the
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().
2006 Aug 14
1
mtext uses the typographical descender to align text
<>
Hello
One sometimes (quite often really ) marvel at the choice of defaults in
R's graphic engine.
For some obscure reason, mtext uses the typographical descender (bottom
of letters) to align text. That is: "gG" will end up slightly higher
that "GG". Depending on the font, "Q" might end up higher than "O".
(for explanation of baseline
2008 Jan 31
3
X11 device distortion (PR#10666)
Full_Name: Thomas Zumbrunn
Version: 2.6.1
OS: GNU/Linux (openSuse 10.3 2.6.22.13-0.3-default)
Submission from: (NULL) (131.152.125.199)
With my particular X11 settings, the width to height ratio of the x11 device is
distorted, with the width being half that of the height. This results in wrongly
proportioned plots, wrongly positioned text etc.
Other devices are not affected.
I already asked
2011 Jul 29
2
Changing font type within y axis labels
I wish place the following axis label in such a manner that some of the
text is plain and the scientific name is in italics (i.e. a mixture of
two font types)
Using plot:
mtext("Total Landings of Pecten maximus (tonnes)",font,=3, side=2,
line=3)
makes everything italic, but how do I apply the font change to only
"Pecten maximus"?
Rgds
Phil
2008 Oct 03
1
How to mix different font styles in axis label of lattice plot?
Hello,
I have a y-axis label that reads: "S. schenckii yeast cells". The part that reads "S. schenckii" needs to be in italic style, the rest of the text is normal style. How can I specify the different font styles for each part of the y-axis label?
Thank you,
Judith
2005 Feb 18
1
Examples of multiple key grobs
The xyplot help page gives quite a lot of information how to use key
and indicates that legend needs to be used if multiple keys are
needed. However, it gives only a brief description of what the grob
needs to contain to do multiple keys.
I've only used the occasional grid function in panel functions, so I
don't have much of a sense of how grobs are constructed. I've been
unable to
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