2009/9/9 Matthias Brennwald <address@hidden>:
Dear all
I'm sure this has been discussed before, but I couldn't find anything
(maybe I did not chose the right search terms). I'd like to use
exponential notation for tick-mark labels in plots. For instance
"plot
([0:1e4:1E6])" yields a plot with y-axis labels 0, 200000, 400000,
600000, 700000, 1e+6. I'd like these to be 0, 2e5, 4e5, 6e5, 8e5,
1e6.
Or, even better, 0, 2x10^5, 4x10^5,..., 10^6. How can I achieve this?
octave-3.2.2:40> plot ([0:1e2:1e6])
octave-3.2.2:41> xt = get(gca, 'xtick');
octave-3.2.2:42> yt = get(gca, 'ytick');
octave-3.2.2:43> set(gca, 'xticklabel', sprintf('%1.1e|', xt));
octave-3.2.2:44> set(gca, 'yticklabel', sprintf('%1.1e|', yt));
HTH,
c.