How to smooth this contourf plot?

30 ビュー (過去 30 日間)
Subhodh Sharma
Subhodh Sharma 2022 年 3 月 23 日
コメント済み: Mathieu NOE 2022 年 3 月 24 日
Hello everyone,
I want to plot smooth contour filled data with the given data. I have tried this code.
h1=contourf(X1,X2,DATA1,'edgecolor','none');
shading interp;
with this I am getting this plot. But I want a smooth plot. I would really appreciate your help. Thanks in advance.
  7 件のコメント
Subhodh Sharma
Subhodh Sharma 2022 年 3 月 23 日
@Bjorn Gustavsson I am not familiar witb filtering. But we can use filtering if it solves the issue. only thing is that I need to show all portion of Indian region without cut-offs of any region.
thanks for your response. looking forward to your inputs.
Bjorn Gustavsson
Bjorn Gustavsson 2022 年 3 月 23 日
The underlying problem might be the data you have in DATA1, if I simply do:
imagesc(DATA1)
and zoom in on the Kashmir(?) region it looks very peculiar, some kind of mixture between rasterized data and interpolated data on varying spatial resolution. The answer by Mathieu below looks nice to my eyes, if they are a suitable presentation of the data is for you to judge.

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

採用された回答

Mathieu NOE
Mathieu NOE 2022 年 3 月 23 日
hello
with this FEx submission, you should be happy now
DATA2 = smooth2a(DATA1,10,10); % adapt the smoothing amount to your needs...
figure(2)
h2=contourf(X1,X2,DATA2,'edgecolor','none');
results
  2 件のコメント
Subhodh Sharma
Subhodh Sharma 2022 年 3 月 24 日
@Mathieu NOE thanks man. It worked like wonder.
Mathieu NOE
Mathieu NOE 2022 年 3 月 24 日
My pleasure !

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

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeContour Plots についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by