Need help using contourfm in Map plotting

8 次查看(过去 30 天)
Normally, I can use contourf to plot a countour like this:
[C1, h1] = contourf (X, Y, Z, [7.9:0.005:8.2], 'LineStyle', 'none' );
The problem is that I'm having trouble using it on maps plotted using the Matlab Mapping toolbox. Below is my code to generate the map:
h = worldmap('Australia');
geoshow('landareas.shp', 'FaceColor', [0.6 0.6 0.6])
geoshow('worldlakes.shp', 'FaceColor', 'cyan')
geoshow('worldrivers.shp', 'Color', 'blue')
I got a huge amount of error when attempting:
[C1, h1] = contourfm (X, Y, Z, [7.9:0.005:8.2], 'LineStyle', 'none' );
How do I make a similar contour map in this case?
Many thanks.

回答(1 个)

Divija Aleti
Divija Aleti 2021-4-30
Hi Leon,
The syntax for using the 'contourfm' function is different from that of the 'contourf' function. This is why you are getting the error.
The 'contourfm' function is actually similar to the 'contourm' function (except that the areas between contours are filled with colors).
Do take a look at the following links to understand the usage of these functions along with their similarities and differences:
Hope this helps!
Regards,
Divija

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

产品


版本

R2021a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by