|
Ah, thanks Arthur!
Just what I needed!
"Arthur G" <gorramfreak+news@gmail.com> wrote in message <op.t56a9a0o1g2ca1@whitaker-four-ninety-one.mit.edu>...
> On Thu, 07 Feb 2008 10:34:03 -0500, Florian <flowwiththeflo@hotmail.com>
> wrote:
> > Hey everyone,
> >
> > how can I code my own limits in the colorbar of a figure???
> > I've think CLim should do the job, but I have got no clue
> > how to apply it! :/
> >
> > Thanks for your help everyone,
> > Florian
>
> When you add a colorbar to an axis in a figure, the limits are taken from
> CLim. So you need to change CLim on the axis before displaying the color
> bar, e.g.:
>
> set(gca, 'CLim', [cLow, cHigh]);
>
> If you don't want to limits of the colorbar to match those of the axis,
> you'll have to add another axis to the figure with the desired value of
> CLim and add the colorbar to it.
>
> There's an example under CLim in the Matlab documentation that shows how
> to "fake" one colorbar for two axes.
>
> --Arthur
|