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