I am trying to plot a world map with the 20°C isothermal lines. I managed to narrow it down to two with nlevels = 2
. Now, I don't know how to get rid of the 0°C lines. I think I need to filter the "SST" list, but I don't know how to do that.
library(oce)
#> Lade nötiges Paket: gsw
library(ocedata)
data(coastlineWorld) # package: oce
data(levitus, package = "ocedata")
mapPlot(coastlineWorld, col = "lightgray", projection = "+proj=robin", drawBox = F)
mapContour(levitus[["longitude"]], levitus[["latitude"]], levitus[["SST"]], nlevels = 2)
Created on 2023-12-10 with reprex v2.0.2
I edited the last line of your code in this way: mapContour(levitus[["longitude"]], levitus[["latitude"]],levitus[["SST"]], levels= 20)
. The option levels
leaves a place for you to specify the contour lines you want on your plot.