Got Questions? Get Answers.
Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
how can i change the '10^-3' on label ticks of colorbar into float numbers?

Subject: how can i change the '10^-3' on label ticks of colorbar into float numbers?

From: Ha

Date: 8 Mar, 2011 10:05:23

Message: 1 of 2


I plotted a contour figure using 'contourf'. There is a '10^-3' label on the side of colorbar. I wanna remove it and make the tick labels appear in the form of float number. How can i achieve it?

Subject: how can i change the '10^-3' on label ticks of colorbar into float numbers?

From: Aurelien Queffurust

Date: 8 Mar, 2011 11:01:23

Message: 2 of 2

"Ha" wrote in message <il4v13$6fs$1@fred.mathworks.com>...
>
> I plotted a contour figure using 'contourf'. There is a '10^-3' label on the side of colorbar. I wanna remove it and make the tick labels appear in the form of float number. How can i achieve it?


Using sprintf for example:

[C,h] = contourf(peaks(20)*3.14e5,10);
hg = colorbar

set(hg,'YTickLabel',sprintf('%1f|',get(hg,'ytick')))


Aurélien

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us