Displaying 20 results from an estimated 38 matches for "lattice_002ftrellis".
2010 Feb 17
2
Problems with xyplot
Hello
I wonder whether someone can tell me what I am doing wrong. Here is the
code (from Bayesian Computation with R - Chapter 2.3.R) that I am trying to
run
####################################
# Section 2.3 Using a Discrete Prior
####################################
graphics.off() # Close all graphics
rm(list=ls()) # Clear all variables
library(LearnBayes)
2012 Jan 19
3
Not generating line chart
Hi All,
Can you please help me, why this code in not generating line chart?
library(ggplot2)
par(mfrow=c(1,3))
#qplot(TIME1, BASCHGA, data=Orange1, geom= c("point", "line"), colour= ACTTRT)
unique(Orange1$REFID) -> refid
for (i in refid)
{
Orange2 <- Orange1[i == Orange1$REFID, ]
pdf('PGA.pdf')
qplot(TIME1, BASCHGA, data=Orange2, geom= c("line"),
2010 Apr 04
2
One question about saving graph by using xyplot
Hey, folk.
I am trying to get many figures by using the function "xyplot" in the library "lattice". I tried to using the loop to finish it quickly. But I cannot open the saved file after I run the program. But if I use the function "plot" to get other simply figures, it can work. So I want to ask how I can get the saved figures by using "xyplot".
The
2004 Dec 10
1
lattice graphics empty in Sweave
Hello,
I have problems using lattice graphics together with Sweave under
Windows XP and R 2.0.0; 2.0.1 Patched; 2.1.0 devel respectively.
Base graphics are o.k., but for lattice graphics empty files (.eps and
.pdf) are generated.
The only workaround I found was to write and read the respective figures
explicitely using postscript() and includegraphics{}.
Have I missed something to solve this
2006 Aug 16
1
bwplot in loop doesn't produce any output
Hi,
running the following code by itself runs as expected.
----------------------------------------------------------------------------
k <- 1
i <- 2
j <- 3
NumName <- varnames[num.cols[k]]
FacNames <- varnames[fac.cols[c(i,j)]]
tmp <- paste(FacNames[1],NumName,sep="~")
fml <- formula(paste(tmp,FacNames[2],sep="|"))
bwplot(fml, data
2007 Feb 14
1
lattice graphics and source()
Hi,
I am trying the lattice graphics in R. Let's say, such a little
experiment in file myprog.r:
f <- function(){
x <- 1:10
y <- x^2
xyplot(y ~ x)
}
f()
Then I run the program:
> source("myprog.r")
but nothing happens. Manully run f() at the command line:
> f()
then the figure is shown. This seems to be a bug only associated with
lattice graphics, the
2007 Apr 24
2
xyplot source file only work with echo=TRUE
Hi,
I write several xyplot graphics on a source file. When I try to use
source("graphics.R") the source don't work, but if I use
source("graphics.R",echo=T) it work. Generally some commands work without
echo=T, but xyplot dont work. Why it dont work without echo=T? It is possible
to write a source that dont need echo=T on source command?
Thanks
Ronaldo
--
Aluno de
2007 Oct 09
2
bug: wireframe and tcltk
Dear R users,
When i call the wireframe function from within a tcltk widget, it does
not work.
Here is a sample program that shows the bug.
When you try:
is.it.a.bug()
You can see that the "curve" instruction is run but not the "wireframe" one.
Do you have an explanation about this point?
Best regards,
Pierre Lafaye de Micheaux
--
Pierre Lafaye de Micheaux
Bureau
2008 Dec 05
1
Problems with lattice-histograms or png within loops
Dear R-users,
I have a question concerning the use of lattice plots within for-loops.
I want to create a png file containing a lattice histogram which works out
fine (part 1).
When I loop the whole code, the graphic file does not contain anything (part
2).
I can fix it by wrapping the histogram function into a print command (part
3).
Why is that so? Why can I not loop it directly?
TIA,
Mark
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 Dec 16
2
problem with a densityplot
Hi,
i have a script how i launch lattice to make a densityplot.
in the script:
jpeg(file="XXX.jpg")
densityplot(~f_diametro+m_diametro+n_diametro, plot.points="rug",
auto.key=T)
dev.off()
does'nt work and in R i dont have any output
but if i launch by R row by row, runs correctly.....
any idea?
2010 Jan 27
1
Problem with xyplot when creating a .png graphic
Hello,
I have the following problem. I have created a couple of scripts to
create .png graphic files from data plots, using the xyplot (lattice)
command. When I refere to the script with source(""), the script will be
red but there is no output file. The scripts work well with the regular
plot command and produce a nice PNG file.
On the other hand if I entre the single commands
2010 Apr 01
2
pdf files in loops
I need to make a bunch of PDF files of histograms. I tried
gatelist = unique(mdf$ArrivalGate)
for( gate in gatelist) {
outfile = paste("../", airport, "/", airport, "taxiHistogram", gate,
".pdf", sep="")
pdf(file = outfile, width = 10, height=8, par(lwd=1))
title=paste("Taxi time for Arrival Gate", gate, "by
2006 Oct 23
1
Color eps/ps output from specialized plots?
Hello,
First a disclaimer :) I am very new to using R.
I am generating some plots and eventhough I can get colored output in the encapsulated postscript files in the simplest of commands (e.g. plot(1:10,1:10, type="l", col="red") ), it does not work for the particular plots I want. It works on the screen.
Here is an example taken out from "Mixed-Effects Models in S and
2009 Jan 27
1
need some lattice help
Hello everybody,
I just started with lattice plots and I was wondering why it behaves different
than expected.
If I generated multiple plots in the past, I just used some code like this:
lapply(..., {
windows()
plot(...)
})
I got multiple windows, each containing one plot.
Now, I tried the same with "levelplot" (instead of "plot") and I see all
windows are created but
2009 Feb 05
1
Problem with plotting data from within a function
Dear List,
I try to develop code where plotting functions are embeded in my own
functions. The following is simplified example:
> test <- function() {
> data <- data.frame(x=rep(1:2, each=50), y=rnorm(100))
> library(lattice)
> attach(data)
> xyplot(y~x)
> detach()
>}
>test()
As far as I understand R, when test is called this should create one local
2009 Sep 18
1
Lattice barplot not wokring in for-loop?
Dear List-Members,
I am plotting a barplot with the lattice package. The code works, but
when I execute the same code in a for-loop
no plot is shown. Can't figure what the problem is.
(Maybe I am missing something here, but I tried it with plot device
pdf, calling windows() or X11(), testing on windows and linux, etc.)
INFO: R version 2.9.1 (2009-06-26) using Windows/RGui
require(lattice)
2009 Nov 25
1
lattice: plotting in a loop
Hi,
I'm having trouble seeing graphics output from lattice xyplot() when called
from inside a for loop:
x <- 1:50
for ( i in 1:5 ) {
y <- rnorm(x)
xyplot(y~x) # no graphics when inside for-loop
# plot(x,y) # works fine
# Sys.sleep(0.5) # doesn't seem to help
}
The xyplot() is fine outside the loop. Results are the same to X11 device
and to file
2010 Feb 17
1
function to display histogram fails to do so when histogram is not the last expression in the function
TestHistogram_A is a function that plots a histogram, then returns 3. For
me it fails
to display the plot, at least in the order given below.
TestHistogram_B is a function that plots a histogram, then exits. The only
difference between
the 2 functions is that B does not return 3. It displays the plot.
This problem does not occur when histogram is replaced by boxplot
Their use
2006 May 02
1
Call trellis function in a function (PR#8827)
Full_Name: Fan
Version: 2.2.1
OS: Windows
Submission from: (NULL) (159.50.101.9)
Hello,
When I call trellis function (such as histogram, densityplot, etc.) in a
function,
the call seems being ignored (no graphics is drawing) if some other instructions
are placed afeter that call.
Here's an example:
y = rnorm(100*3)
b = sample(1:3,300,replace=T)
f = function()
{
densityplot(~y|b)
}