How to make one colorbar for all subplots?
84 ビュー (過去 30 日間)
古いコメントを表示
Hi everybody
So I made a plot with four subplots (2x2). Now I would like to insert one (big) colorbar on the right Hand side of the four plots without changing the size of any of the plots. Somehow I only manage to make a bar for one subplot...
Cheers Ronny
0 件のコメント
採用された回答
Star Strider
2014 年 8 月 2 日
I assume you’ve already discovered the colorbar function. See Axis Properties for a description of the properties you can set. The location property applies only to colorbars and legends, not to axes.
4 件のコメント
Shan Chu
2020 年 2 月 13 日
Star Strider, I have a similar question here: https://uk.mathworks.com/matlabcentral/answers/505314-how-to-make-one-colorbar-for-a-2x2-subplot
Please help.
Thanks
冠中 王
2022 年 4 月 6 日
For matlab 2019b or after, Create tiled chart layout - MATLAB tiledlayout (mathworks.com) also works and it is easier.
その他の回答 (2 件)
Ronny
2014 年 8 月 3 日
1 件のコメント
Star Strider
2014 年 8 月 3 日
My pleasure!
You can adjust its left edge position by increasing or decreasing the 0.01 in the first element of the 'Position' vector, and its width by adjusting the third element of the vector.
Emmanouil Barmpounakis
2017 年 4 月 25 日
I came up with the Star Strider's solution but by using the Edit plot function. I found it easier to do it manually, rather than changing the 'Position' vector.tor.
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Subplots についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!