|
From: | Ben Abbott |
Subject: | Re: Exponential notation in tick labels? |
Date: | Wed, 09 Sep 2009 07:57:55 -0400 |
On Sep 9, 2009, at 7:18 AM, Matthias Brennwald wrote:
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? Matthias
You can over-ride the automatic formatting by ... set (gca, "yticklabel", num2str (get (gca, "ytick"), '%.1e|')) Ben
[Prev in Thread] | Current Thread | [Next in Thread] |