Re: decimal notation for log scale axis?
- From: NZTideMan <mulgor@xxxxxxxxx>
- Date: Wed, 4 Feb 2009 16:43:44 -0800 (PST)
On Feb 5, 1:32 pm, "Catalin Eberhardt" <longtal...@xxxxxxxxx> wrote:
Hello,
Is it possible to have a log scale y-axis labelled with decimal notation rather than the default exponential (standard) notation?
For example if I create a graph using semilogy, then the y-axis will be logarithmic and the values used to label it by default will be of the form 10^0, 10^1, etc. Is it possible to make those values be "translated" into decimal notation, e.g. 1, 10, etc, without resorting to YTick? I searched all over but could not find a (reasonably simple) way.
Anticipated thanks for any help.
I don't know why you want to do it "without resorting to YTick", but
if you DO resort to YTick, here is a way:
semilogy(abs(randn(100,1)),'x') % Plot some data
ytic=get(gca,'YTick'); % Grab the y tick values
yticlab=num2str(ytic'); % Convert to string mx
set(gca,'YTickLabel',yticlab) % Re-label
.
- Follow-Ups:
- Re: decimal notation for log scale axis?
- From: Catalin Eberhardt
- Re: decimal notation for log scale axis?
- References:
- decimal notation for log scale axis?
- From: Catalin Eberhardt
- decimal notation for log scale axis?
- Prev by Date: MEX, mexCallMATLAB problem
- Next by Date: Re: Hiding part of a legend
- Previous by thread: decimal notation for log scale axis?
- Next by thread: Re: decimal notation for log scale axis?
- Index(es):