Need help using contourfm in Map plotting

조회 수: 8 (최근 30일)
Leon
Leon 2021년 4월 22일
답변: Divija Aleti 2021년 4월 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