Interpolated gridded data with limits

1 visualizzazione (ultimi 30 giorni)
David du Preez
David du Preez il 20 Nov 2020
Commentato: David du Preez il 23 Nov 2020
I have gridded data which I want to plot on a longitude/latitude map. I have used the following code:
pcolor(lon1,S_latitude,sum_pd') %sum_pd' gridded data
shading interp
colormap jet
c = colorbar;
caxis([0 1])
c.Label.String = (['Sensitivity ' species_name ' (' species_unit ')']);
hold on
grid on
borders('countries','k')
But using pcolor interpolate across all longitudes (see image). Is there a way to avoid this or interpolate between a longitude region?

Risposte (1)

KSSV
KSSV il 20 Nov 2020
Don't transpose the ZData. Try:
pcolor(lon1,S_latitude,sum_pd)
If you still face a porblem or if you get an error. Read about inpolygon.
  3 Commenti
KSSV
KSSV il 23 Nov 2020
What error it shows?
David du Preez
David du Preez il 23 Nov 2020
The function assumes that assumes that the polygon goes from -50 to 100 and covers the 0 longitude which is the area I want to exclude.

Accedi per commentare.

Categorie

Scopri di più su Interpolation 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!

Translated by