contourf with more colours
14 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
采纳的回答
Ameer Hamza
2020-5-27
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
0 个评论
更多回答(1 个)
Abdolkarim Mohammadi
2020-5-27
编辑:Abdolkarim Mohammadi
2020-5-27
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Contour Plots 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!