help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Force number format in plot tick labels


From: nono
Subject: Force number format in plot tick labels
Date: Wed, 27 Jul 2011 04:23:08 -0700 (PDT)

Hello,

Is there a way to set the number format used in the tick labels of a plot ?
I want to print all numbers in real number notation. For instance:
 
--
x=logspace(-2, 2, 5);  
semilogx(x,sqrt(x)) 
set(gca(), "xminortick", "on")
--

With Octave 3.2.3, it produces a plot with the following labels on the x
axis: 
10^-2, 10^-1, 10^0, 10^1, 10^2

I would like the labels to be formatted as real number :
0.01, 0.1, 1, 10, 100.

The code
--
set(gca(), "xticklabel", {'0.01', '0.1', '1', '10', '100'})
--
changes the tick labels but also suppress the minor ticks ...

Is there a way to achieve this ?

Thank you for your help.
Arnaud


--
View this message in context: 
http://octave.1599824.n4.nabble.com/Force-number-format-in-plot-tick-labels-tp3698183p3698183.html
Sent from the Octave - General mailing list archive at Nabble.com.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]