Plot Contours of Data onto Map

3 ビュー (過去 30 日間)
Charles Flynn
Charles Flynn 2021 年 3 月 22 日
回答済み: Pratheek Punchathody 2021 年 3 月 31 日
Is is possible to plot conours of my data (a matrix) onto a map similar to that created by: geolimits([49 53],[-6 2.8]) geobasemap streets I get the following error when using conourm:
Error using hggroup Group cannot be a child of GeographicAxes. Error in internal.mapgraph.HGGroupAdapter (line 62) g = hggroup('Parent',ax); Error in internal.mapgraph.ContourGroup (line 282) h = h@internal.mapgraph.HGGroupAdapter(args{:}); Error in internal.mapgraph.GeographicContourGroup (line 55) h = h@internal.mapgraph.ContourGroup(varargin{:}); Error in contourm (line 110) h = internal.mapgraph.GeographicContourGroup(ax, Z, R, levelList); I can plot the data onto a worldmap: >worldmap([50 52],[-5.7 2.5]) > load coastlines > plotm(coastlat,coastlon) > contourm(testlat,testlon,testdat)
However, this map is poor quality as it is not particularly refined. Any advice on how to plot contours of my data onto the geo map would be apprecied. If this is not possible, then I would like to know if there is a way of improving the quality of map produced by worldmap. Thanks

回答 (1 件)

Pratheek Punchathody
Pratheek Punchathody 2021 年 3 月 31 日
You can use the below code of "contourm"
contourm(lat,lon,Z); %displays a contour plot of the geolocated data grid, Z with geolocation defined by lat and lon.
Refer to the documentation on "contourm" which project 2-D contour plot of map data.


Find more on Contour Plots 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!

Translated by