Need help using contourfm in Map plotting

16 vues (au cours des 30 derniers jours)
Leon
Leon le 22 Avr 2021
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.

Réponses (1)

Divija Aleti
Divija Aleti le 30 Avr 2021
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

Catégories

En savoir plus sur Contour Plots dans Help Center et File Exchange

Produits


Version

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by