Skip to content
Back to formatted view

Raw Message

Message-ID: <Pine.SOL.4.21.0109252204270.17045-100000@stat1.stat.auckland.ac.nz>
Date: 2001-09-25T10:07:15Z
From: Ko-Kang Kevin Wang
Subject: pairs() Legend

Hi,

Is it possible to create a legend in a pairs() plot?

For example, suppose I have the following R codes:

 data(iris)
 pairs(iris[1:4], main = "Anderson's Iris Data -- 3 species", 
       pch = 21, bg = c("red", "green3", "blue")[codes(iris$Species)])

How can I created a legend that shows which colour represents to which
Iris species?

Thanks,

Kevin

------------------------------------------------------------------------------
Ko-Kang Kevin Wang
Statistical Analysis Division Leader
Software Developers' Klub (SDK)
University of Auckland
New Zealand

-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._