Displaying 20 results from an estimated 10000 matches similar to: "specifying a key for a trellis display"
2010 Nov 26
3
lattice: strange behavior (?) when using trellis.device(color=FALSE)
Dear expeRts,
I am not sure if I found a bug...
I would like to create a function that itself creates a lattice plot without
colors. Following http://www.mail-archive.com/r-help at r-project.org/msg64699.html
I use trellis.device() to set the colors to FALSE. Whenever I call the minimal
example below *with* trellis.device(), Quartz opens a window (I am working on a
MAC), which it shouldn't,
2006 Aug 09
1
legend on trellis plot
Dear all
I have two questions regarding trellis plots - which I hope you may be able to help me with.
Is it possible to place the key in a trellis plot on the panel (instead of beside the panel)? This will cause the same key to be reproduced on each panel. Please see the plot below - here I placed the legend below the plot. I tried moving the key to the function statement, but it did not really
2008 Nov 19
1
Buggy trellis.focus() with xyplot ?
Hi:
(Tried to find a bug report about this issue, but was unable to find it, let
me know if this is a known issue)
I have been working on an interface to highlight xyplot panels on mouse
overs in JavaGD but I have stumbled with what seems to be a bug in
trellis.focus.
I am using R 2.8 with lattice 0.17-15
*** To replicate the bug:
1.- display an xyplot. For example, from the xyplot help page:
2010 Apr 28
1
Multiple cex sizes in main for xyplot?
Folks:
I would like to write two lines of text in two different font sizes (or
faces or ...) as the title ("main") of a trellis plot. The following code
does it, but not well:
xyplot((0:1)~(0:1),
main = textGrob(lab=c("Some Text","Some More Text"),y=c(.95,.8),
gp=gpar(cex=c(1.2,1.0)))
)
There is too much space between the title text and the plot. I assume
2012 Jul 12
2
trellis margin sizes in absolute units
Dear R users,
I have a lot of experience with traditional R graphics, but I decided to turn to trellis as
it was recommended for spatial graphs by the sp package. In traditional R graphics
I always first set the size of the device region absolute units (e.g. mm) and then I
firmly fix the inner margins with mai and the outer margins with oma also in absolute units.
What is left from the device
2004 Nov 30
2
New trellis settings
I've just upgraded to 2.0.1 and was taken by surprise by the changes
in graphical parameter handling for lattice plots. I'd previously
been using 1.9.1. The old settings seem to have been replaced by a
daunting number of new options. I've poked around a bit and have not
seen any discussion of the changes in the newsletter or on r-help but
maybe I'm overlooking something?
2008 Oct 06
1
Margin on trellis plot
Dear all
I have a problem when I make a trellis plot - I would like to reduce the white margin surrounding the plot.
I used S some years age, as I remember it was possible to use the "par" and "oma" to control margin size even on a trelllis plot (see the plot below).
However, it does not seem to work in R.
All suggestions will be highly appreciated.
Br Henrik
2004 Oct 19
2
Sweave and Trellis in R 2.0.0patched (Windows)
I've been using the following code to plot using Sweave in version
1.9.1
library(RODBC)
library(lattice)
channel <-odbcConnectExcel("h:/water.xls")
data <- sqlQuery(channel,"select * from `Sheet1$` where Test = 'TOC' and
(Valve='5010-05' or Valve='8030-V26' or Valve='1180-08' or
Valve='5040-08')")
odbcClose(channel)
srt <-
2005 Nov 11
1
Lattice (Trellis) plot margins
Is there an equivalent way to set plotting parameters
as in
par(mai=c(......))
in the Lattice package? I searched trellis.par.get(), but am not
sure which one can be used.
Paul E. Green
[[alternative HTML version deleted]]
2007 May 27
2
pie chart in lattice - trellis class
Dear all,
After going through the Lattice doc and R-help list and google, I got
the feeling that there is no function in lattice or other package to
compute a pie chart object of class "trellis". Although pie charts are
obviously not considered optimal even in the pie() doc ;-) , pie chart
trellis objects would be easy positioned e.g. over a map drawn with the
grids package.
Can
2018 Apr 14
2
Extracting specified pages from a lattice ("trellis") object.
Suppose that (e.g.) xyplot() returns an object "xxx" with (say) 3 pages.
I would like to extract/plot (print) just one of these pages, e.g.
page 2.
Here's a toy example:
x <- rep(seq(0,1,length=11),12)
set.seed(42)
y <- rnorm(3*44)
a <- rep(letters[1:12],each=11)
dta <- data.frame(x=x,y=y,a=a)
xxx <- xyplot(y~x|a,data=dta,layout=c(2,2))
I would to extract from
2006 May 13
2
Adding error bars to a trellis barchart display
Hi all --
I'm using trellis to generate bar charts, but there's no built-in
function to generate error bars or confidence intervals, as far as I
can tell. I assumed I could just write my own panel function to add
them, so I searched the archive, and found a posting from the author
of the package stating "... placing multiple bars side by side needs
specialized calculations, which
2006 May 29
3
mtext in trellis-loop & colorkey
Hello,
I would like to create a sequence of plots (using a for loop). I read
in the FAQ that print() has to be used in order to obtain any output.
This works perfectly fine as long as I only consider one function
call in the loop, but I would like to add mtext() to the each plot in
the loop. Unfortunately, this did not work. Any suggestions?
As you can see from the provided example,
2006 Nov 06
1
line width (all elements) in Trellis
Dear All,
I am hoping to implement a barchart using trellis graphics where all
elements have a line width of 2.
Using trellis.par.set(), I am able to make most elements lwd=2, but not
all. In particular, the top of the box (above the upper most strip) and
the left y-axis remain one point.
Code with a barchart() example is below. Any advice would be greatly
appreciated.
Thanks for your
2012 Apr 18
2
Displaying data in Trellis
This is a question relating to the Trellis function in R. I have a set of
socioeconomic data that I would like to display with the xyplot() function
for several states. I will have a total of 6 plots, with the y-variable as
"Age Group", and the x-variable as "Median Income".
Suitability of the plots aside (this cannot be changed), I need to plot the
points of one of the states
2004 Jan 14
1
Trellis graph and two colors display
Hello,
I would like to display two groups of dots in different colors or style and additionnaly a linear regression for all the dots in
panel plots of a Trellis graph. Actually to get in each panel the equivalent of:
plot(x[mois==3],y[mois==3],col="blue")
points(x[mois==9],y[mois==9],col="red")
abline(lm(y~x), col="green")
"mois" being a grouping
2008 Dec 31
2
Lattice trellis.focus() with pdf
Hi,
I have a the code for a plot that works perfectly running in R and
printing to a Quartz object but which doesn't work when I make the
trellis device a pdf.
The code is as follows:
----
trellis.device(device="pdf", new=TRUE)
trellis.par.set(my.theme())
dotplot(Y ~ X | C, groups=G, data=D, layout=c(2,1), ... )
trellis.focus("panel", 1, 1)
for (y in 1:5) {
2009 Nov 13
1
Trellis settings get lost when printing to pdf
Hi all,
I've got some problems when changing the trellis settings for the lattice plots. The plots look exactly as I want them to when calling show.settings() as well as when plotting them in the graphical window. But when printing to a pdf file, none of the settings are used!? Does anyone know what might have happened? Because the when changing the trellis settings, these should remain in
2005 Feb 01
2
How to write a new "top-level" Trellis/lattice function?
Hello,
I am trying to write a new "top level" Trellis/lattice function.
By "top-level", I mean a function like 'xyplot', 'histogram',
'bwplot', etc.
These functions all call 'trellis.skeleton', which I am unable to
call;
an attempt to invoke the function that does so yields the error
message:
-----
Error in do.call("trellis.skeleton",
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