How to force contour values in geoshow - rainfall in Australia
조회 수: 3 (최근 30일)
이전 댓글 표시
This is probably a very simple question. I have plotted a dataset (rainfall) using geoshow with a color bar. I'm trying to compare it with the official dataset via their output and so I want to plot contour lines so I can see if there is a discrepancy. None of the Matlab help seems to cover this, I probably just need to understand some generic idea about map plots, but I don't..
Here is my simple filled colorbar map, where GP2a is the GPCP rainfall dataset, extracted from their .nc file:
=====
worldmap('Australia');
load coastlines.mat
geoshow(coastlat,coastlon,'Color','k', 'linewidth', 1.5);
geoshow(Lat, Long, flipud(GP2a'), 'DisplayType','surface')
colormap (flipud(parula))
colorbar
=====
This works fine.
Now I try contours - all good:
geoshow(Lat, Long, flipud(GP2a'), 'DisplayType','contour')
Now I add to show values - all good:
geoshow(Lat, Long, flipud(GP2'), 'DisplayType','contour','ShowText','on')
But I want to constrain them to the same as their website output: 0.5:0.5:5
I tried this:
geoshow(Lat, Long, flipud(GP2'), 'DisplayType','contour','ShowText','on',[0 0.5 1 1.5 2 2.5 3 3.5 4 4.5 5])
But got the error message:
Error using parseRasterInputs>checkParamValuePairs (line 99). The property/value inputs must always occur as pairs.
Any help greatly appreciated, thanks!
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Surface and Mesh Plots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!