这是我的代码和相关的变量结构。
Correlation_Plot = contourplot(cor_Warra_SF_SST_JJA, region=TRUE, at=seq(-0.8, 0.8, 0.2),
labels=FALSE, row.values=(lon_sst), column.values=lat_sst,
xlab='longitude', ylab='latitude')
Correlation_Plot = Correlation_Plot + layer({ ok <- (cor_Warra_SF_SST_JJA>0.6);
panel.text(cor_Warra_SF_SST_JJA[ok]) })
Correlation_Plot
# this is the longitude (from -179.5 to 179.5) , 360 data in total
> str(lon_sst)
num [1:360(1d)] -180 -178 -178 -176 -176 ...
# this is the latitude (from -89.5 to 89.5), 180 data in total
> str(lat_sst)
num [1:180(1d)] -89.5 -88.5 -87.5 -86.5 -85.5 -84.5 -83.5 -82.5 -81.5 -80.5 ...
# This is data set corresponding to longitude and latitude
> dim(cor_Warra_SF_SST_JJA)
[1] 360 180
我尝试使用layer()
仅显示大于 0.6 的轮廓的标签,但它不起作用。
是否可以增加图例中的颜色对比度,以便真正清楚什么颜色对应什么级别。什么是颜色选项,我找不到它们?
最重要的是我想为指定的轮廓间隔(例如 +/- 0.2)画一条更粗的黑线?我认为我也可以这样做
layer()
,但我不确定我panel
应该使用什么功能。另外,我试图用纯色填充大陆,但我找不到任何东西。我试过使用地图,但它不适用于格子。
谢谢你的帮助。