I am using geoshow to plot filled polygons on a map. The polygons represent lakes. I have latitude and longitude coordinates saved as vectors. This is the command I use:
geoshow(lat,lon,'DisplayType','polygon');
When I use geoshow, MATLAB fills everything outside the polygon (e.g. the whole world from [-180 180] longitude and [-90 90] latitude). Everything except the lake is filled. The first picture shows the whole world:
The second picture shows the same MATLAB figure but zoomed in to the lake. So the lake is being plotted, its just the fill is the wrong way round.
When I use the "fill" command in MATLAB using the same latitude and longitude vectors, the lake polygon is filled correctly as shown below
Even more bizarre is that I am plotting 4 lakes in total, and two of them work fine using both "fill" and "geoshow". But two of them result in the wrong polygon fill. Two sets of coordinates are attached (lat_lon_correct_fill.mat and lat_lon_wrong_fill.mat).
Any help with this is appreciated. The latitude and longitude vectors are attached.
Note: This has been tested on both 2020a and 2016b and the same problem occurs for both. So I don't think it is a version issue.