With the function contourf I created the picture below. I would like to have more color gradations in it. I succeeded in the colorbar.
Does anyone have an idea?

 採用された回答

Ameer Hamza
Ameer Hamza 2020 年 5 月 27 日

0 投票

You can specify the 4 input argument to contourf() to specify the number of levels you want.
contourf(x,y,z,50); % 50 levels will be created

その他の回答 (1 件)

Abdolkarim Mohammadi
Abdolkarim Mohammadi 2020 年 5 月 27 日
編集済み: Abdolkarim Mohammadi 2020 年 5 月 27 日

1 投票

This works for both contour and contourf. You can either tell MATLAB how many levels you want.
contour (X,Y,Z, levels);
If levels is a positive integer, it tells MATLAB how many levels you want. If levels is a vector, it tells MATLAB at which specific heights of Z you want levels to be drawn.

カテゴリ

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

質問済み:

2020 年 5 月 27 日

編集済み:

2020 年 5 月 27 日

Community Treasure Hunt

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

Start Hunting!

Translated by