[R] Beginners questions on matplot and legend

Martin Maechler maechler at stat.math.ethz.ch
Sat Dec 11 12:55:48 CET 2004


>>>>> "judith" == judith baltsar <judith.baltsar at gmx.de>
>>>>>     on Sat, 11 Dec 2004 10:35:39 +0100 writes:

    judith> Dear list members, I have a problem that is probably
    judith> simple to solve but at the moment I have no clue at
    judith> all:

    judith> I have done a simple matplot matplot(x,y,pch=symb,
    judith> xlab="Axis 1", ylab="Axis 2", main="PCA of plot x
    judith> trait matrix") x has the X-axis values, y has four
    judith> columns of y-values and now I want to have a simple
    judith> legend for the four symbols defined by symb.  Easy
    judith> probably, but maybe someone can give me a hint.

yes, a hint: 

  Look at the legend() call in the iris example close to the end of

help(matplot).

or try
   par(ask=TRUE)
   example(matplot)

    judith> Thank you very much   Judith

gern geschehen!
Martin




More information about the R-help mailing list