range for log scale

Is it possible to have in Matplotlib.pyplot a log (base 10) scale that does go from xmin to xmax where xmin and xmax are not powers of 10 (as in Excel and OOCalc)?? E.g. a scale from 20 to 2500 like you can do in SciDAVis (and Origin and Mathematica) "Scale/from and Scale/to".
I hope so,
Thanks, Janwillem

Janwillem van Dijk wrote:

Is it possible to have in Matplotlib.pyplot a log (base 10) scale that
does go from xmin to xmax where xmin and xmax are not powers of 10 ...

yes.

best regards,
sebastian.

Janwillem van Dijk wrote:

Is it possible to have in Matplotlib.pyplot a log (base 10) scale that does go from xmin to xmax where xmin and xmax are not powers of 10 (as in Excel and OOCalc)?? E.g. a scale from 20 to 2500 like you can do in SciDAVis (and Origin and Mathematica) "Scale/from and Scale/to".

Example using "ipython -pylab":

In [1]:x = arange(2.5, 250)

In [2]:y = x**2

In [3]:semilogy(x, y)
Out[3]:[<matplotlib.lines.Line2D object at 0x91ddc8c>]

In [4]:axis('tight')
Out[4]:(2.5, 249.5, 6.25, 62250.25)

In [5]:axis(ymin=5, ymax=70000)
Out[5]:(2.5, 249.5, 5, 70000)

OK, that was with y, but it works the same with x.

Eric

···

I hope so,
Thanks, Janwillem

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9&#45;12, 2009. Register now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

P.S.
I noted that the new versions of OOcalc and Exel, 3.0 and 2007, now do allow
log scales other than in decades.

Janwillem wrote:

···

Is it possible to have in Matplotlib.pyplot a log (base 10) scale that
does go from xmin to xmax where xmin and xmax are not powers of 10 (as
in Excel and OOCalc)?? E.g. a scale from 20 to 2500 like you can do in
SciDAVis (and Origin and Mathematica) "Scale/from and Scale/to".
I hope so,
Thanks, Janwillem

------------------------------------------------------------------------------
Come build with us! The BlackBerry&reg; Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9&#45;12, 2009. Register
now&#33;
http://p.sf.net/sfu/devconf
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

--
View this message in context: http://www.nabble.com/range-for-log-scale-tp25529894p25530202.html
Sent from the matplotlib - users mailing list archive at Nabble.com.