Path: news.mathworks.com!newsfeed-00.mathworks.com!NNTP.WPI.EDU!elk.ncren.net!newsflash.concordia.ca!canopus.cc.umanitoba.ca!not-for-mail
From: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Newsgroups: comp.soft-sys.matlab
Subject: Re: Suppress Plot Unit Modifiers
Date: Sun, 30 Mar 2008 03:13:18 +0000 (UTC)
Organization: National Research Council Canada - Conseil national de rechereches Canada
Lines: 30
Message-ID: <fsn0ge$d3b$1@canopus.cc.umanitoba.ca>
References: <fsluas$gr0$1@fred.mathworks.com> <fsm1hv$dhm$1@fred.mathworks.com> <fsm2ei$t34$1@canopus.cc.umanitoba.ca> <fsm42h$4gq$1@fred.mathworks.com>
NNTP-Posting-Host: origin.ibd.nrc.ca
X-Trace: canopus.cc.umanitoba.ca 1206846798 13419 192.70.172.160 (30 Mar 2008 03:13:18 GMT)
X-Complaints-To: abuse@cc.umanitoba.ca
NNTP-Posting-Date: Sun, 30 Mar 2008 03:13:18 +0000 (UTC)
Originator: roberson@ibd.nrc-cnrc.gc.ca (Walter Roberson)
Xref: news.mathworks.com comp.soft-sys.matlab:459888



In article <fsm42h$4gq$1@fred.mathworks.com>,
David Doria <daviddoria@gmail.com> wrote:
>well in this case since it starts at 0 I think we'd have to
>use max() instead of min(),

But then if your data runs (say) 8000 9000 10000 11000
then the output would be .8 .9 1 1.1 rather than 8 9 10 11 .
You could take the min() of the non-zero values, perhaps.


>but I was wondering if there was
>a more direct method to access what matlab has decided to be
>the best scale factor , ie

>get(gca, 'ScaleFactor') or something

If there is then it is undocumented and in some very hidden property.

But if you have a plot that you know it has happened to, then
you could get() the XTickLabel, str2double() the last of those,
get() the XTick, take the last of those, divide by the computed label,
and the result should be the scale factor that was involved.

Hmmm, for that matter, 

set(gca, 'XTickLabel', get(gca, 'XTickLabel'))

might work!
-- 
  "I think Walter was a very smart man."          -- Gene Autry