[R] how to draw the legend about color from 3d picture
Greg.Snow at imail.org
Fri Sep 5 18:14:31 CEST 2008
Look at the color.legend function in the plotrix package to see if it does what you want. You may want to use the layout function to split the graphics device into 2 sections, one for the persp plot and the other to hold the legend.
Hope this helps,
Gregory (Greg) L. Snow Ph.D.
Statistical Data Center
greg.snow at imail.org
> -----Original Message-----
> From: r-help-bounces at r-project.org
> [mailto:r-help-bounces at r-project.org] On Behalf Of yk
> Sent: Friday, September 05, 2008 6:07 AM
> To: r-help at r-project.org
> Subject: [R] how to draw the legend about color from 3d picture
> I have drawed a picture with persp, it's 3d map with
> different color, indicate different altitude. In gnuplot, the
> corresponding command 'splot' will generate a picture beside
> to indicate the relationship between color and altitude. But
> in R, how to draw it? I have read the manual of legend, but
> they are all about how to draw a legend with colored text,
> not a continuous varing color with corresponding number.
> R-help at r-project.org mailing list
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
More information about the R-help