An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100107/966f8861/attachment.pl>
Graph titles from massive
3 messages · Trafim Vanishek, jim holtman, David Winsemius
An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20100107/5a7592d9/attachment.pl>
On Jan 7, 2010, at 11:24 AM, Trafim Vanishek wrote:
Dear all,
I would like to ask you if there is a possibility in R to give the
names to
graphs which are not const.
For example,
How to name each plot, or to add notes like a=x[i], b=y[i] in this
cycle
x<-c(1,2,3,4,5,6)
y<-c(7,8,9,10,11,12)
par(mfrow=c(2,3))
for (i in 1:6){
plot(x,y)
}
This might be what you want:
> x<-c(1,2,3,4,5,6)
> y<-c(7,8,9,10,11,12)
>
> par(mfrow=c(2,3))
>
> for (i in 1:6){
+ plot(x,y, main=paste("this is plot # ", i, sep=""))
+ }
>
I initially thought you wanted the object names to be different for
which this answer would not be responsive and no answer could be
provided since that is not how base graphics work. For that you would
need grid, lattice, or ggplot methods.
David Winsemius, MD
Heritage Laboratories
West Hartford, CT