Displaying 20 results from an estimated 300 matches similar to: "Saving lattice plot as a PDF"
2008 Aug 26
1
more dot plots on 1 page
Hi,
I would like to have six dot plots on one page. I make the plots in a
'for loop' because it is six times the same graph but for different
subjects (species).
I tried it with "par(mfrow=c(3,2), oma=c(3,3,2,0), mar=c(2,2,2,2))"; but
this does not work for dot plots apparently.
Then I tried with print(). But then I had to give the dot plots names.
This also does not work.
2008 Nov 24
3
multiple plots in R
Hi, I just try to draw multiple plots in one page using R, I used par
command. For example I have 7 plots, but instead of arranging them in
the default way
plot1 plot2 plot3
plot4 plot5 plot6
plot7
I want them in this order
plot1 plot2 plot3
plot4 plot5 plot6
plot7
Could somebody tell me how to do this, please? Thanks so many.
Suyan
2007 Dec 10
2
Viewport and grid.draw
Hi Deepayan and everyone,
I need to add a common legend to a group of latice
graphs, I have tried different ways using viewport and
grid.draw without success.
Here is what I have:
plot.new()
library(grid)
library('IDPmisc')
print(plot1, split=c(1,1,2,4), more=TRUE)
print(plot4, split=c(2,1,2,4), more=TRUE)
print(plot2, split=c(1,2,2,4), more=TRUE)
print(plot5, split=c(2,2,2,4),
2009 Apr 14
2
subset dataframe by rows using character vector?
Dear List,
I'm stuck on what seems like a simple indexing problem, I'd be very grateful to anyone willing to help me out.
I queried a dataframe which returns a character vector called "plot". I have another dataframe from which I want to subset or select only those rows that match "plot". I've tried subset, and also the "which" command.
plot
2005 Nov 10
2
ltext - adding text to each panel from a matrix
Hi all (really probably just Deepayan):
In the plot below I want to add text on either side of each violin plot that
indicates the number of observations that are either positive or negative.
I'm trying to do this with ltext() and I've also monkeyed about with
panel.text(). The code below is generally what I want but my calls to
ltext() are wrong and I'm not sure how to fix them.
2006 Jul 19
2
trellis.focus with postscript device
Hello.
First: R 2.3.1 on Windows XP.
I am trying to add information (sample size) to the Trellis strips which
I am successful using the trellis.focus function with the default
Windows device. However, I typically use the postscript device as I use
LaTeX and \includegraphic for incorporating graphs into stat reviews.
Here's some example code (apologies for the lack of creativity and
2009 Nov 23
3
Trellis Plot
anyone know how to add text in the Trellis plot panel ?? i want to add things
eg: dot dot dot. in the headrer of the panel.
eg: http://old.nabble.com/file/p26486579/hist1.png hist1.png
--
View this message in context: http://old.nabble.com/Trellis-Plot-tp26486579p26486579.html
Sent from the R help mailing list archive at Nabble.com.
2004 Jan 27
1
ltext( pos=NULL )
ltext( 0, 0, pos=NULL, label="xxxx")
gives an error message.
The help page of ``ltext'' references to the help page of ``text''
where the default value of pos is set to NULL.
To solve the problem ``ltext'' could be changed:
OLD:
if (!missing(pos))
NEW:
if (!missing(pos) && ! is.null(pos) )
Wolfram
2010 Apr 01
2
How to get the scale limits in lattice plot
I am drawing a density histogram, and want to label the plots with the
mean using ltext(). But I need the x,y coordinates to feed into ltext,
and I can't calculate them easily from my data. Is there a way to get
the x and y ranges being used for the plot, so I can put the text at the
correct position in the panel.function?
Thanks,
Jim Rome
2010 Jan 24
1
lattice ltext
Dear friends - please give me a hand.
I have a dataset of 40 patients in two groups observed on three
occasions. I only want to plot a line
for each patient in the two groups. I use the ltext function to put the
patient number but fail to make lattice understand the numbers as
unique since apparently it starts all over with 1:20 for each panel
instead of respecting my desires to have 1:20
2005 Feb 15
1
lattice multiple plots per page
Dear R-sters,
I was wondering if anyone has encountered the following issues. I've
figured out how to get multiple levelplots [library(lattice)] on a single
plot. However, when I add text (adding axis labels for the entire four
panel plot) the text is missing when I insert the *.eps file I've created
into my LaTeX document (via MikTeX-WinEdt). And, I've just upgraded to R
2004 Apr 14
1
ltext, plotmath, and substitute
I am interested to use plotmath functions within a panel function but am having
some problems getting the code right. Within each panel I am plotting the data,
fitting a regression line, and would like to print the regression equation.
Here is a trivial example of what I'd like to do:
# generate simple data
tmp.df <- data.frame(id = rep(1:4, each=4),
time = rep(1:4, 4),
das =
2002 Apr 23
1
Writing text in lattice graphics
I'm trying to obtain a set of regression lines obtained for different values
of a factor using lattice. I would like to add a string to each panel showing
the R^2 value of the respective line, but I'm having difficulties positioning
the text (namely on which coordinates to give to the "ltext" function).
Here is what I'm using (I've used ?? for the things I would like
2010 Jul 05
4
Data Labels in a barchart (Lattice or otherwise)
Hi,
Can anyone please help me with how I could add labels with the value for
each bar in a barchart? (similar to how data labels can be added in Excel) I
have done a lot of searching but havent been lucky.
Thanks,
Raoul
--
View this message in context: http://r.789695.n4.nabble.com/Data-Labels-in-a-barchart-Lattice-or-otherwise-tp2278027p2278027.html
Sent from the R help mailing list archive at
2003 Oct 27
1
How can strheight be calculated in lattice/grid?
If I have drawn a string with ``ltext( x, y, labels="first string" )''
how can a draw a second string just one line (or strheight("X")
below the first string regardless of the size and scales of the panel?
Thanks
Wolfram
2008 Nov 10
4
Labeling points with xYplot
Hello R-Users,
I am trying to label points on an xYplot. I can label the points, but
then I lose the error bars. I suspect that I should be using
panel.xYplot rather than panel.xyplot, but that didn't work either...
Can anybody help me out? Example code is below. First xYplot has error
bars, second tries to label the points and the bars disappear.
Thanks,
John
a=c(1:4)
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,
2004 Apr 13
1
lattice problem in R-1.9.0
Hi all,
I just installed R-1.9.0 on Windows 2000 from binaries. Yesterday, on
R-1.8.1 I ran a script that looked like:
library(lattice)
tmp <- expand.grid(A = 1:3, B = letters[1:2])
tmp$z <- runif(NROW(tmp))
trellis.device(png, file = "x1081.png", theme = col.whitebg)
xyplot(z ~ A | B, data = tmp,
panel = function(x, y, i) {
panel.xyplot(x, y)
2001 Nov 29
2
text in qqmath
Hello,
I can't seem to make qqmath plot text.
v <- rnorm(8)
qqmath(~v) # this is ok, but
qqmath(~v, panel=function(x, y) {
points(x, y)
text(0, 0, 'print me', cex=2)})
isn't ok.
The axis frame is printed properly (ie, as in
qqmath(~v)), but neither 'print me' nor the points
show up on the graph. I can, however, see the upper
half of the word 'me' in the
2007 Dec 09
1
Adding text outside lattice plot
Hello,
I need to add some text in the upper left position,
outside a lattice plot.
xyplot(x~y)
ltext(locator(1), label='My text')
doesn't work.
I would appreciate any help. Tahnk you,
Judith
____________________________________________________________________________________
Be a better friend, newshound, and