set color in contour plot with specified colormap
3 ビュー (過去 30 日間)
古いコメントを表示
I have a contour plot with only two value (3 and 5 for example), thus it should appear only two colors.
but I have a colormap with 6 values: cmb=jet(6);
I have plot the contour using command: [xc,yc]=contourf(X,Y,Z);
I want color the contour having value 3 with cmb(3,:), and color the contour having value 5 with cmb(5,:), is it possible to do this?
Thanks!
Yu
6 件のコメント
jonas
2018 年 10 月 5 日
If you use the same limits for the cbar in every plot, then you can make comparisons between graphs using a single cbar.
回答 (1 件)
参考
カテゴリ
Help Center および File Exchange で Colormaps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!