File Exchange

image thumbnail

Fake Colorbar

version 1.0 (1.2 KB) by

Make the x-axes of subplots align when one has a colorbar and one does not.



View License

Often I want to plot two (or many) datasets that have the same time vector. I simply use the SUBPLOT command in MATLAB to do so. A problem arises, however, when one of these datasets happens to be three-dimensional — something that I want to plot with pcolor. When I add a colorbar to that subplot, the time-axis (x-axis) no longer lines up with the other subplots.

To fix this problem, I wrote this simple function called FAKECOLORBAR which changes the size of the subplots that do not require colorbars so they match the subplots with colorbars.

Comments and Ratings (1)

Simon Schegg

MATLAB Release
MATLAB 8.1 (R2013a)

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Win prizes and improve your MATLAB skills

Play today