I am trying to set the x and y axis range on a log-log plot. The ranges I
give are automatically adjusted to the nearest power of 10, but I would like
to have the minimum and maximum axis values not be powers of 10. Is there a
way to set the axis range so that it is not automatically rescaled?
···
--
View this message in context: http://www.nabble.com/Setting-axis-range-so-it-is-not-rescaled-tp23878124p23878124.html
Sent from the matplotlib - users mailing list archive at Nabble.com.
Hi,
I am trying to set the x and y axis range on a log-log plot. The ranges I
give are automatically adjusted to the nearest power of 10, but I would like
to have the minimum and maximum axis values not be powers of 10. Is there a
way to set the axis range so that it is not automatically rescaled?
you can explicitly set the X and Y limits, actually overriding the
autoscale selection (to disable autoscale completely, exec
ax.set_autoscale_on(False) ).
depending on your code, you can use xlim([xmin, xmax]), ylim([ymin,
ymax]) or axis([xmin, xmax, ymin, ymax]).
Or directly from the Axes instances: set_xlim(), set_ylim().
You can check for the complete references of these functions on
matplotlib.sf.net
Regards,
···
On Thu, Jun 4, 2009 at 23:26, citronade <ricitron@...935...> wrote:
--
Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi
You can turn autoscaling off entirely with
ax.set_autoscale_on(False)
And then set the xlim/ylim as you like as Sandro suggested.
JDH
···
On Thu, Jun 4, 2009 at 5:33 PM, Sandro Tosi <matrixhasu@...287...> wrote:
Hi,
On Thu, Jun 4, 2009 at 23:26, citronade <ricitron@...935...> wrote:
I am trying to set the x and y axis range on a log-log plot. The ranges I
give are automatically adjusted to the nearest power of 10, but I would like
to have the minimum and maximum axis values not be powers of 10. Is there a
way to set the axis range so that it is not automatically rescaled?