Displaying 20 results from an estimated 1000 matches for "trellis".
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 g...
2006 Jun 01
3
Key titles in Lattice
...roup.values <- sort(unique(groups))
for (i in seq(along=group.values))
{
id <- (groups[subscripts] == group.values[i])
current.val <- group.values[i]
panel.stripplot(x[id], y[id],
jitter.data = FALSE, horizontal = FALSE,
col = trellis.par.get()$superpose.symbol$col[i],
pch = trellis.par.get()$superpose.symbol$pch[i])
panel.linejoin(
x[id], y[id], horizontal=F,
col = trellis.par.get()$superpose.symbol$col[i],
lty = trellis.par.get()$superpose.line$lty[i],
lwd...
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 d...
2002 Dec 06
2
Controlling graphics parameters in lattice
...'m just starting to work with lattice graphics, and am
having difficulty understanding how to control various graphic
parameters (font sizes, etc.). [I'm actually using xyplot
via plot.effect() in the car package, and would like to be
able to set some global defaults.]
I read ?xyplot and ?trellis.par.set-- which contains no complete
list of parameters, just a reference to print(trellis.par.get())
> print(trellis.par.get())
$fontsize
$fontsize$default
[1] 10
I tried
> trellis.par.set("fontsize", 12)
> data(quakes)
> Depth <- equal.count(quakes$depth, number=8...
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 trel...
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
resem...
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) {
panel.segments(...)
}
trellis.unfocus()
trellis.focus("...
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 Jul 14
2
tracing something in a namespace (PR#7091)
...report directly from R.
# Please copy the bug report (after finishing it) to
# your favorite email program and send it to
#
# r-bugs@r-project.org
#
######################################################
> x <- rnorm(10)
> y <- 1:10
> xyplot(y ~ x)
> trace(lattice:::print.trellis, exit=recover)
[1] "print.trellis"
Warning message:
Assigning over the binding of symbol "print.trellis" in environment/package "lattice"
in: .assignOverBinding(what, newFun, whereF)
> xyplot(y ~ x)
> untrace(lattice:::print.trellis)
Error in untrace(lattice::...
2006 Apr 13
1
panel.abline() and trellis.focus() on multipage plots
Hi,
I'm recently working on a multipage bwplot() using the lattice package. In
this context I was trying to use the panel.abline() function individually on
certain panels but not all. After some research I found the trellis.focus()
and trellis.unfocus() functions which enabled me to do something like:
trellis.focus("panel", 1, 3)
do.call("panel.abline", list (c(0.5, 0), col="tomato", lty=2 ))
trellis.unfocus()
The result is quite what I expected and working properly as...
2005 Jul 28
2
lattice/ grid.layout/ multiple graphs per page
...SS 5.2.3
---------------------------------
Colleagues
I have a set of lattice plots, and want to plot 4 of them on the page.
I am having trouble with the layout.
grid.newpage()
pushViewport(viewport(layout = grid.layout(2,2)))
pushviewport(viewport(layout.pos.col = 1, layout.pos.row = 1))
working trellis graph code here
pushviewport(viewport(layout.pos.col = 1, layout.pos.row = 2))
working trellis graph code here
pushviewport(viewport(layout.pos.col = 2, layout.pos.row = 1))
working trellis graph code here
pushviewport(viewport(layout.pos.col = 2, layout.pos.row = 2))
I'm obviously doing somet...
2009 Aug 01
3
Transparency and trellis device
Dear R-users,
I am trying to produce trellis (png, or jpeg) graphs with transparent background, but I cannot manage to make that happen. I tried to play around with themes but to no avail. Any advise on the following example will be greatly appreciated:
Thank you
Sebastien
####
library(lattice)
df <- data.frame(a=rep(1:4,4), b=rep(1:4,...
2003 Apr 04
3
trellis.graphic in for-loop
Hi list,
I am unsuccessfully trying to produce a serious of trellis barcharts from
within a for-loop. The barcharts work outside the loop. What am I missing?
Example attached.
Thanks Herry
#XXXXXXXXXXXXXXXXXXXXXX
trellis.device(bg="white")
trellis.par.get("fontsize")->fontsize
fontsize$default<-16
trellis.par.set("fontsize",f...
2002 Aug 16
1
How to change parameters of Trellis-like graphs
...,
because, I have to prepare graphs by using the grid and lattice packages.
I tried it with 1.4.1, but I could not it.
After upgrade to 1.5.1, I have finished it.
Next, I tried to modify some graphs with as follows:
#
# setting color for graph
#
library(grid)
library(lattice)
background <- trellis.par.get()
background$col <- "white"
show.settings()
background <- trellis.par.set("background",background)
show.settings()
names(trellis.par.get())
dot.symbol <- trellis.par.get()
dot.symbol$col <- "yellow"
dot.symbol <- trellis.par.set("dot.symbol&...
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, since I only want to create the plot, but do not intend
to "print" it. Moreover, if I check the value of b, it pri...
2007 Mar 22
2
unexpected behavior of trellis calls inside a user-defined function
...itted
models. I wrote a function that takes the fitted model object as the
sole argument and produces these plots. Various strange behavior
ensued, but I have identified one very concrete issue (illustrated
below): when my figure-drawing function includes the addition of
points/lines to trellis plots, some of the information (main title,
placement of additional points) from my i-th function call is leaking
over into the i+1-th call. In the example below, I just get
unexpected results. In my actual application, it breaks the whole
function and one of the error messages I've g...
2008 May 06
2
Lattice problems / cannot load lattice
...es:
1: In loadNamespace(package, c(which.lib.loc, lib.loc), keep.source =
keep.source) :
package 'lattice' contains no R code
2: S3
methods ?[.shingle?, ?as.data.frame.shingle?, ?plot.shingle?, ?print.shingle?, ?summary.shingle?, ?as.character.shingleLevel?, ?print.shingleLevel?, ?print.trellis?, ?plot.trellis?, ?update.trellis?, ?dim.trellis?, ?dimnames.trellis?, ?dimnames<-.trellis?, ?[.trellis?, ?t.trellis?, ?summary.trellis?, ?print.summary.trellis?, ?barchart.formula?, ?barchart.array?, ?barchart.default?, ?barchart.matrix?, ?barchart.numeric?, ?barchart.table?, ?bwplot.formula?,...
2005 Mar 17
3
how to close trellis.device?
Dear All:
I need draw some figure through trellis.device and save them as pdf files. How can I close trellis.device (something like dev.off() in nonlattice figure)?
Many thanks
Zhongming Yang
---------------------------------
[[alternative HTML version deleted]]
2007 Aug 01
1
Problem to remove loops in a routine
Dear R-users,
I have written the following code to generate some trellis plots. It
works perfectly fine except that it is quite slow when it is apply to my
typical datasets (over several thousands of lines). I believe the
problem comes from the loops I am using to subset my data.frame. I read
in the archives that the tapply function is often more efficient than a
l...
2001 Aug 13
2
printing lattice plots
Hi
I'm trying to print several plots to a multi-page postscript file.
Some plots are output of basic commands, some are produced by "trellis"
commands (from the package lattice).
Right now I'm not able to get a straightforward black and white color
scheme for the latter kind: when I open the postscript file the "trellis"
plots are invisible, or parts of them are (usually the bounding
box/axes/axes marks).
Here is...