Displaying 2 results from an estimated 2 matches for "plotfn".
Did you mean:
plotfun
2009 Sep 02
1
Howto Superimpose Multiple Density Curves Into One Plot
...ooks like this:
http://dpaste.com/88561/plain/
And I intend to create multiple density curve into one plot, where each curve
correspond to the unique ID.
I tried to use "sm" package, with this code, but without success.
__BEGIN__
library(sm)
dat <- read.table("mydat.txt");
plotfn <- ("~/Desktop/flowgram_superimposed.pdf");
pdf(plotfn);
sm.density.compare(dat$V1,dat$V2, xlab = "Flow Signal")
colfill <- c(2:10);
legend(locator(1), levels(dat$V2), fill=colfill)
dev.off();
__END__
Please advice what's the right way to do it or if there is
alter...
2009 Mar 19
1
Simple Plot with Grid's Viewport
...age
each. What's wrong with my approach?
__BEGIN__
library(lattice)
library(grid)
test.plot <- function(x,y) {
pushViewport(viewport(layout.pos.col=x, layout.pos.row=y))
pushViewport(viewport(width=0.6, height=0.6));
plot(sin,-pi,2*pi, main= paste(c(i,j),collapse="-") )
}
plotfn <- ("~/Desktop/mygrid.pdf")
pdf(plotfn)
id = 0;
for (i in 1:2) {
for (j in 1:2) {
id = id+1;
cat(i, "-", j, "\n", sep="")
test.plot(i,j);
}
}
dev.off()
__END__
- Gundala Viswanath