How to force contour values in geoshow - rainfall in Australia
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
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 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Surface and Mesh Plots in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!