This question is closed. Reopen it to edit or answer.

Assigned colorbar heights in pcolor subplots

1 view (last 30 days)
Heidi Hirsh
Heidi Hirsh on 26 Aug 2019
Closed: MATLAB Answer Bot on 20 Aug 2021
I am making a lot of figures with pcolor subplots. I want all the x-axes to match so I am manually assigned the colorbar positions. Right now I am doing this by a trial and error approach to get the colorbars lined up. Is there a "cheat sheet" somewhere that would tell me where the default subplots line up for assigning heights of the colorbars.
This is the line I am playing with
c=colorbar; set(c, 'Position', [0.93 .11 .015 .2])
Does my question make sense?

Answers (1)

Image Analyst
Image Analyst on 26 Aug 2019
First make up whatever colormap you want. Then look at all your data to find the OVERALL min and max. Then for each axes, use colorbar() and caxis() to make them all match.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!