Overlay polygon on geographic axes
Show older comments
I would like to overlay a patch (filled polygon) on a geographic axis created using geoaxes. Is there any way to do this in R2019b? I have only found functions for plotting lines and symbols (geoplot, geoscatter).
This would be similar to patchm in the mapping toolbox.
Accepted Answer
More Answers (1)
Mike D.
on 21 Feb 2020
8 votes
What if you had (lat,lon) coordinates of the polygon you wanted to overlay? It looks like your x and y coordinates might be normalized coordinates?
4 Comments
erik jensen
on 17 Feb 2021
I have same question .. what kind of coordintaes ae [0.25 0.6 0.6 0.25]?
Mike D.
on 19 Feb 2021
Notice he is creating a new ax2 = axes overtop of the geoaxes, and then setting its limits to be axis([0 1 0 1]); So the coordinates are effectively normalized to the width and height (0 to 1).
This is more of a work-around by creating another axes overtop and making its axes labels invisible. Hopefully a future version of Matlab allows the geoaxes to create a patch on the geoaxes.
Brad Onstott
on 11 Feb 2023
Mike D: Good call! MATLAB 2022b does allow for an overlay consisting of user-defined Lat/Long coordinates.
Mike D.
on 29 Apr 2024
Brad, are you saying the patch command now allows color filled polygons on geoaxes, or maybe after creating a polyshape with geopolyshape?
Categories
Find more on Map Display in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!