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 个)

类别

Help CenterFile Exchange 中查找有关 Surface and Mesh Plots 的更多信息

标签

产品


版本

R2016b

Community Treasure Hunt

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

Start Hunting!

Translated by