Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

how to force scientific notation for plot

1,076 views
Skip to first unread message

Huan Lei

unread,
Jun 5, 2009, 1:47:01 AM6/5/09
to
Hi,
I have a matlab code below
x = 0:0.1:0.4;
y = 0:4000:16000;
plot(x,y);

The Ytick of the plot is decimal, and I want it show by scientific notation as 0, 0.4*10^4, 0.8*10^4, 1.2*10^4, 1.6*10^4.
thanks a lot! I am using 2007Ra.

Huan

Aurelien Queffurust

unread,
Jun 5, 2009, 2:48:02 AM6/5/09
to
"Huan Lei" <leiz...@gmail.com> wrote in message <h0abgl$fsj$1...@fred.mathworks.com>...

Use this solution:
How do I format tick labels?
http://www.mathworks.com/support/solutions/en/data/1-16KCT/

Aur?lien

Huan Lei

unread,
Jun 5, 2009, 10:47:02 AM6/5/09
to
"Aurelien Queffurust" <tu...@yahoo.fr> wrote in message <h0af32$5do$1...@fred.mathworks.com>...

thanks! the sprintf can generate the ytick as "0.4e+004", "0.8e+004", "1.2e+004",
"1.6e+004", but I want the tick to be '0.4', '0.8', '1.2', '1.6*10^4'....
thanks again!

0 new messages