[R] Making several plots using a loop function
Kehl Dániel
kehld at ktk.pte.hu
Tue Jun 24 15:23:01 CEST 2014
Hi,
try something like
main=paste("plot",i)
in the plot command.
HTH,
kd
________________________________________
Feladó: r-help-bounces at r-project.org [r-help-bounces at r-project.org] ; meghatalmazó: li li [hannah.hlx at gmail.com]
Küldve: 2014. június 24. 15:17
To: r-help
Tárgy: [R] Making several plots using a loop function
Hi all,
When making a bunch of plots using a loop function, how to add title to
reflect different plots.
Specifically, for the code below, I generated 9 plots. I would like to add
a title to each plot.
For example, the titles will be respectively, plot1, plot 2, ⌠plot 9.
Thank you very much!
Hanna
par(mfrow=c(3,3), pty="s", pch=16, col="blue")
for ( i in 1:9) {
lm1 <- lm(log(run_res[2:11, i]) ~ log(level))
plot(log(level), log(run_res[2:11, i]), xlab="dllution levels",
ylab="%PS-80")
abline(lm1)}
[[alternative HTML version deleted]]
More information about the R-help
mailing list