Interpolated gridded data with limits

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?

回答 (1 件)

KSSV
KSSV 2020 年 11 月 20 日

0 投票

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 件のコメント

David du Preez
David du Preez 2020 年 11 月 23 日
The zdata must be transposed for the dimensions to work. Using inplogon gives an error because the longitude ranges between -50 to 100.
KSSV
KSSV 2020 年 11 月 23 日
What error it shows?
David du Preez
David du Preez 2020 年 11 月 23 日
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.

サインインしてコメントする。

カテゴリ

ヘルプ センター および File ExchangeInterpolation についてさらに検索

質問済み:

2020 年 11 月 20 日

コメント済み:

2020 年 11 月 23 日

Community Treasure Hunt

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

Start Hunting!

Translated by