Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations GregLocock on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

edit colorbar

Status
Not open for further replies.

Lukaz

Mechanical
Feb 26, 2005
8
Hello all,

Is there a way to edit the 'ticks' on a colorbar?
I have a colorbar that starts at 0 an ends at 12 with stepsize 2. But the maximum value is 13 and is therefor not shown because of the stepsize. If I plot the figure I can change everything using the axes properties, but I like to include the "change of the colorbar" in my script so I don't have to edit every figure after I plot it.
Does anybody know how to do this?

Thanx in advance,
Lukaz
 
Replies continue below

Recommended for you

Hi,
The colorbar is another axes object. Create it with an output handle:
hxc=colorbar;
Or catch it:
hxc=findobj(gcf,'Type','axes','Tag','Colorbar');
You can change its properties as you do for any axes object (e.g., 'Ylim').

Joe
The new BSTeX- Equation viewer for Matlab7
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor