Michiel
Michiel

Reputation: 120

Rworldmap with Contour Plot

When one uses package(rworldmap), when one is making a contour plot, like:

    X <- Longitude
    Y <- Latitude
    contour(x=X, y=Y, z=Z, xlim=c(min(X),max(X)), ylim=c(min(Y),max(Y)), nlevels=15)

How can this contour plot appear on the world map?

Upvotes: 0

Views: 105

Answers (1)

Michiel
Michiel

Reputation: 120

It is actually quite simple, just add:

plot(getMap())

after your contour statement.

Upvotes: 0

Related Questions