Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to overlay two spatial plots? #7

Open
matteodefelice opened this issue Oct 18, 2018 · 2 comments
Open

How to overlay two spatial plots? #7

matteodefelice opened this issue Oct 18, 2018 · 2 comments

Comments

@matteodefelice
Copy link

I have gridded data and a set of stations and I would like to plot them together with spatialPlot. Is it possible?

@miturbide
Copy link
Member

miturbide commented Oct 18, 2018

Hi Matteo,
spatialPlot uses spplot (package sp), therefore, you could convert your station data into a SpatialPoints* object and use argument sp.layout like this:

library(visualizeR)
library(sp)
stations <- SpatialPoints(getCoordinates(VALUE_Iberia_pr))
spatialPlot(climatology(EOBS_Iberia_pr), sp.layout = list(stations, first = FALSE, pch = 2, col = "black"))

@matteodefelice
Copy link
Author

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants