how to display tick label on colorbar when both ticks and tick labels are stored in form of array. (display name on colorbar)
5 ビュー (過去 30 日間)
古いコメントを表示
I want to display name of city on the color bar, when i am plotting temperature colormap. But my code is not working
temperature_arry=[28 30 32];
city_name_array={"xyz" "abc" "pqr"};
colorbar('Ticks', temperature_arry, 'TickLabels', city_name_arry)
0 件のコメント
回答 (1 件)
Ameer Hamza
2020 年 3 月 11 日
Set the limits too
temperature_arry=[28 30 32];
city_name_array={"xyz" "abc" "pqr"};
colorbar('Limits', [temperature_arry(1) temperature_arry(end)], ...
'Ticks', temperature_arry, 'TickLabels', city_name_array)
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Colormaps についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!