[R] filled.contour and NA's

antonio rodriguez antonio.raju at gmail.com
Wed Nov 29 20:44:15 CET 2006


Hi,

I'm trying to do a filled.contour plot where some points are labelled as 
NA. How do I could plot this kind of graphics, so NA points are coloured 
black,  keeping the levels of remaining points. NA's values represent 
land points (meaningless), and what I want to plot is the levels of a 
variable over the sea.

x<-seq(length=21, from=-10, by=.25)
y<-seq(length=8, from=36, by=.25)

filled.contour(x,y,t(ene))

dput(ene,control="all")
structure(c(0.941176470588235, 0.705882352941177, 0.588235294117647,
0.470588235294118, 0.588235294117647, 0.588235294117647, 0.588235294117647,
0.705882352941177, 0.647058823529412, 0.823529411764706, 0.588235294117647,
0.588235294117647, 0.529411764705882, 0.647058823529412, 0.588235294117647,
0.764705882352941, 0.823529411764706, 0.764705882352941, 0.647058823529412,
0.705882352941177, 0.529411764705882, 0.647058823529412, 0.529411764705882,
0.529411764705882, 0.705882352941177, 0.647058823529412, 0.764705882352941,
0.705882352941177, 0.529411764705882, 0.705882352941177, 0.647058823529412,
0.411764705882353, 0.88235294117647, 0.823529411764706, 0.764705882352941,
0.764705882352941, 0.705882352941177, 0.647058823529412, 0.529411764705882,
0.529411764705882, 0.764705882352941, 0.941176470588235, 0.941176470588235,
0.88235294117647, 0.722222222222222, 0.588235294117647, 0.5625,
0.5, 0.823529411764706, 0.823529411764706, 0.833333333333333,
1, 0.529411764705882, 0.909090909090909, 0.818181818181818, 
1.33333333333333,
0.941176470588235, 0.88235294117647, 0.823529411764706, 0.833333333333333,
0.6, NA, NA, NA, 0.705882352941177, 0.88235294117647, 0.823529411764706,
0.722222222222222, 0.75, NA, NA, NA, 0.647058823529412, 0.705882352941177,
0.764705882352941, 0.722222222222222, 0.5, 1.66666666666667,
NA, NA, 0.529411764705882, 0.647058823529412, 0.647058823529412,
0.588235294117647, 1.16666666666667, 1.5, NA, NA, 0.529411764705882,
0.470588235294118, 0.588235294117647, 0.428571428571429, 1.33333333333333,
1.5, NA, NA, 0.470588235294118, 0.470588235294118, 0.529411764705882,
0.727272727272727, 1.66666666666667, 1.5, NA, NA, 0.470588235294118,
0.555555555555556, 0.588235294117647, 1.16666666666667, 1.66666666666667,
1.66666666666667, NA, NA, 0.611111111111111, 0.529411764705882,
0.583333333333333, 1.16666666666667, 1.16666666666667, NA, NA,
NA, 0.428571428571429, 0.875, 1.33333333333333, 1, 1.33333333333333,
NA, NA, NA, 0.833333333333333, 0.833333333333333, 1.5, 1.33333333333333,
NA, NA, NA, NA, 2.16666666666667, 1.66666666666667, NA, NA, NA,
NA, NA, NA, 1.5, 0.833333333333333, 0.5, NA, NA, NA, NA, NA,
0.666666666666667, 0.666666666666667, 1.16666666666667, NA, NA,
NA, NA, NA, 0.666666666666667, 0.666666666666667, 0.666666666666667,
NA, NA, NA, NA, NA), .Dim = as.integer(c(8, 21)))



More information about the R-help mailing list