[R] Contour Plots

Roger Peng rpeng at stat.ucla.edu
Wed Jan 15 17:30:04 CET 2003


I believe this was discussed about two days ago -- check the archives
under the subject "density plot - beginner's question" -- and there were
some good answers.  Basically, the x and y vectors have to be increasing
and response or Level, as you call it, needs to be in the form of a matrix
of dimension length(x) by length(y).  If the response/Level is not in the
form of a matrix, you will need to smoooth or interpolate.

-roger
_______________________________
UCLA Department of Statistics
rpeng at stat.ucla.edu
http://www.stat.ucla.edu/~rpeng

On Wed, 15 Jan 2003, mhoward wrote:

> r-help,
> 
>  I can't seem to get the below data organized in such a manner so as to
> generate a contour plot
> using any of the functions {lattice.contourplot, base.contour,
> base.filled.contour}. I was wondering
> if anyone could please tell me what I need to do to accomplish this.
> 
> 
> X,Y,Level
> -31.105,86.911,3843
> -3.385,86.911,3896
> 24.335,86.911,3874
> -24.175,79.700,3900
> -3.385,79.700,3927
> 17.405,79.700,3922
> -51.895,72.489,3874
> 52.056,72.489,3898
> -44.965,65.278,3914
> 45.125,65.278,3951
> -24.175,58.067,3931
> 17.405,58.067,3942
> -79.615,50.856,3831
> 72.845,50.856,3914
> -72.685,43.645,3891
> 65.915,43.645,3972
> -44.965,36.434,3921
> -3.385,36.434,3889
> 38.195,36.434,3965
> -93.475,22.012,3812
> 86.705,22.012,3913
> -86.545,14.801,3876
> -65.755,14.801,3927
> -24.175,14.801,3861
> 17.405,14.801,3872
> 58.985,14.801,3999
> 79.775,14.801,3970
> -93.475,-6.832,3848
> -86.545,-6.832,3894
> -44.965,-6.832,3905
> -3.385,-6.832,3848
> 38.195,-6.832,3949
> 79.775,-6.832,3983
> 86.705,-6.832,3942
> -86.545,-21.254,3880
> 79.775,-21.254,3967
> -93.475,-28.465,3839
> -65.755,-28.465,3945
> -24.175,-28.465,3906
> 17.405,-28.465,3931
> 58.985,-28.465,4011
> 86.705,-28.465,3899
> -72.685,-50.098,3906
> -44.965,-50.098,3971
> -3.385,-50.098,3956
> 38.195,-50.098,4007
> 65.915,-50.098,3970
> -79.615,-57.309,3894
> 72.845,-57.309,3896
> -58.825,-64.520,3925
> 52.055,-64.520,3964
> -65.755,-71.731,3868
> -24.175,-71.731,3972
> 17.405,-71.731,3989
> 58.985,-71.731,3894
> -17.245,-86.153,3926
> -3.385,-86.153,3943
> 10.475,-86.153,3935
> -24.175,-93.364,3855
> -3.385,-93.364,3894
> 17.405,-93.364,3861
> 
> Thanks,
> 
> Michael R. Howard
> Micron Technology, Inc
> Fab C Engineering Software (FCES)
> Phone368 - 2352 [82352]
> Pager 90713
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> http://www.stat.math.ethz.ch/mailman/listinfo/r-help
>




More information about the R-help mailing list