generating a more detailed contour plot

hello, I am using contourf to plot a color map for a Xi squared table. but since the lowest values are very low, and some values are very high, the resolution is not good enough.
How can I get a higher reolution plot?

 採用された回答

Jon
Jon 2022 年 5 月 18 日

0 投票

If you want more contor lines (is this what you mean by resolution?) you can use the additional levels argument to do this, so for example if you wanted contour lines for 100 different levels
contour(Z,100)
or
contour(X,Y,Z,100)

5 件のコメント

Tal Shavit
Tal Shavit 2022 年 5 月 18 日
it's a color map.
is it the same?
Jon
Jon 2022 年 5 月 18 日
You can also specify a vector of values of the levels you want plotted. If the data has a large range of orders of magnitude you could specify a logarithmically spaced vector of levels like this,
zmin = 0.1; % what ever value you want for the first contour level
zmax = 1000; % what ever value you want for the last contour level
levels = logspace(zmin,zmax);
contour(Z,levels)
Jon
Jon 2022 年 5 月 18 日
For color map (filled) just use the above with contourf instead of contour
Tal Shavit
Tal Shavit 2022 年 5 月 18 日
Thank you!
Jon
Jon 2022 年 5 月 18 日
Your welcome. If that answered your question then please accept the answer. That will take it off of the list of unanswered questions, and let others with a similar question know an answer is available. Thanks

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

その他の回答 (0 件)

カテゴリ

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

タグ

質問済み:

2022 年 5 月 18 日

コメント済み:

Jon
2022 年 5 月 18 日

Community Treasure Hunt

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

Start Hunting!

Translated by