How do I mask out the ocean in m_map?
Show older comments
I am plotting data that is over both land and ocean using m_map, but I only want the data over land to show up. Is there a way I can mask out the ocean (maybe by color filling everything outside of m_coastline instead of inside m_coastline)? I know there has to be a way to do this but I cannot figure it out. I've even tried using m_shaperead and using a shapefile of the ocean but couldn't get it that way either.
Answers (1)
KSSV
on 12 Oct 2016
0 votes
See the discussion:
4 Comments
Silver
on 25 Sep 2018
KSSV The link does not work :/
ahamahoru
on 15 Aug 2020
yes it's no longer available :(
Image Analyst
on 15 Aug 2020
The Mathworks shutdown their newsreader. Try Google or Google Groups.
Hitachi
on 24 Aug 2020
The way i did is
Download the land-ocean-mask martix, lile land.nc from NCEPRI.
Then set land grid = 1 and ocean grid = NaN.
Finally, multiply the matrix to the data.
Categories
Find more on Oceanography and Hydrology in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!