Displaying 20 results from an estimated 7000 matches similar to: "lattice problem in R-1.9.0"
2007 Dec 09
1
Saving lattice plot as a PDF
Hi there,
I need to save a series of lattice plots as a PDF,
this is my code so far:
windows(height=8,width=6)
plot.new()
library('grid')
lattice.options(layout.heights=list(top.padding=list(x=0.15,
units="inches")))
print(plot1, split=c(1,1,2,3), more=TRUE)
print(plot2, split=c(1,2,2,3), more=TRUE)
print(plot3, split=c(1,3,2,3), more=TRUE)
print(plot4, split=c(2,1,2,3),
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
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,
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 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
2004 Jul 18
2
gray background in png
Hi all,
I'm having a problem creating png images with trellis.device. I would
like to create many plots with a white background using a sequence
number in the file argument (i.e. "%02d"). The first plot is as expected
with a white background. However, the second and all subsequent plots
have a gray background. I would like all plots to have a white (or
transparent)
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
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
2013 Feb 27
1
lattice xyplot point labelling
This is my reproducible example
tv.ms<-structure(list(inq = structure(4:17, .Label = c("D4", "D5", "D6a",
"D6b", "D6c", "D7", "D8", "F4", "F5a", "F5b", "F6a", "F6b", "F6c",
"F6d", "F7a", "F7b", "F8"), class =
2004 Oct 22
3
dotplot & lattice problems: y axis values and bg color output in jpg
I have a linux system with Fedora Core 2 and R-2.0.
I was comparing plots made with plot() and dotplot() and discovered a
problem. Although the dots are positioned correctly, the numerical
labels in the dotplot y axis are not correct.
I put copies here:
http://lark.cc.ku.edu/~pauljohn/R/plotTrouble1.jpg
That is the "correct" one from plot, with the higest value on y showing
at 18.
2004 Jul 27
1
re: help with lattice plot
Dear List,
I have been using R to create an xyplot using the panel function within
lattice libraries. This plot is based on the data supplied in R named
'Oats'. The graph represents oat yield by nitro level with an overlay of
each variety of oats for each nitro level.
I have three questions regarding this graph:
1) I cannot seem to specify the type of symbol used by the plot, even
though
2009 Oct 30
1
insert a text in panels, always in the same position (lattice, ltext, ?prepanel?)
Dear R-users,
my present problem is related to lattice.
I would like to put some text in each panel, namely a p-value.
I therefore wrote a simple panel function as reported here below.
I'm able to write the value in each panel at the maximum value of y for
each panel,
but this obviously overlay the text to the points.
What I'm looking for is to write the text always in the same
2009 Jan 21
1
Text Outside Lattice Plot
Dear R users
I created the graph at the bottom using xyplot in the lattice package. I
added a title using the main="Title" command in xyplot, however it is
plotted too close to the legend for my liking. To remedy this I increased
the upper margin of the plot using plot(data, position = c(0,0,1,.9)) and
attempted to move "SNA" upwards and to the right. I have tried using a
2003 Jan 24
1
problem with srt vector in xyplot {lattice}
[ R 1.6.1 ]
PROBLEM
The plot of the appended code does produce
a postscript file which is not interpretable
by gv under Linux.
REMARK
If the srt argument is commented out or set to a constant
like 45 or 90, the ps file becomes interpretable.
CODE
xytest <- function( ... ){
with( airquality, { print( xyplot(
Ozone ~ Temp | Month
, panel
2005 May 13
2
Lattice plot within a "for" loop does not happen?
I am trying to do a series of xyplots plots, using a "for" loop to
substitute the appropriate variables for each plot. The basic command
works fine by itself and produces a nice plot:
> i<-3
> trellis.device(theme="col.whitebg")
> xyplot(as.formula(paste(tmp00[2*i], "~ ", tmp00[(2*i)-1],
+
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
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,
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 Sep 29
1
Plotting text with lattice
Hello,
I've decided to take the leap and try my hand at the lattice package,
though I am getting stuck at what one might consider a trivial problem,
plotting text at a point in a graph. Apologies in advance if (that) I'm
missing something extremely basic.
Consider in base graphics:
> plot(1:10)
> text(2, 4, "Text")
In the above you will see text centered at the point (2,