Contour plot omitting certain points

3 ビュー (過去 30 日間)
EYKL
EYKL 2021 年 11 月 7 日
コメント済み: EYKL 2021 年 11 月 7 日
Hello all,
I have the following dataset, TSE_compiled of which I have plotted as contours using contourf.
However, after comparing my dataset to the contour plot,
  1. I noticed that the plot is missing the last row of my matrix.
  2. caxis maximum limit is also capped at 10. Therefore, any data > 10 does not get plotted.
I have attached my mat. file and plot below. Thank you for your help.
contourf(TSE_compiled,'edgecolor','none');
colormap(jet);
colorbar;
max_lim = max(TSE_compiled,[],'all'); % 13.6147
min_lim = min(TSE_compiled,[],'all'); % -17.4632
lim = caxis; % -17.4632 10.0000

採用された回答

Chris
Chris 2021 年 11 月 7 日
編集済み: Chris 2021 年 11 月 7 日
If it bothers you, you can set caxis(min_lim,max_lim).
You can include more levels by indicating the number in the function call:
contourf(TSE_compiled,34,'edgeColor','none);
All the points in the matrix are there. The last row (17) is on the upper edge of the image.
You can also specify the contour levels.
levels = -18:14;
levels(end) = 13.3;
contourf(TSE_compiled,levels,'edgecolor','none');
  1 件のコメント
EYKL
EYKL 2021 年 11 月 7 日
Yes, setting the levels worked. Thank you!

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

その他の回答 (0 件)

カテゴリ

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

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by