# Forcing full value on axis

I have a plot where the x axis ticks are given as

0.1 0.15 0.20 0.025 0.30 0.35

with +3.732e2 given in the lower right of the axis.
How can I force the ticks to have
373.3 373.35 ....

and so on?

Cheers
Tommy

It always helps if you give us complete examples that we can run --
then we can give you back tested answers we know work. You should be
able to tweak the axes.formatter.limits rc param. Something like

import matplotlib
matplotlib.rcParams['axes.formatter.limits'] = -15,15

If this doesn't work, please post a complete example.

Darren, for the range he is using according to his post, I wouldn't
expect the exponential formatting to be kicking in since log10(.4) =
-.4 which is within the default range.

JDH

···

On 4/24/07, Tommy Grav <tgrav@...935...> wrote:

I have a plot where the x axis ticks are given as

0.1 0.15 0.20 0.025 0.30 0.35

with +3.732e2 given in the lower right of the axis.
How can I force the ticks to have
373.3 373.35 ....

If all else fails, you can set the tick labels by hand. For example,
I did this when trying to get tick labels of 0.002, 0.0025, 0.003,
etc.:

tickvals = arange(0.002,0.007,0.0005);
ticklabs = map(lambda val:"%.4f"%val, tickvals);
ticklabs[0:9:2] = map(lambda val:"%.3f"%val, tickvals[0:9:2]);
xticks(tickvals,ticklabs);

···

On Tue, 24 Apr 2007, Tommy Grav wrote:

I have a plot where the x axis ticks are given as

0.1 0.15 0.20 0.025 0.30 0.35

with +3.732e2 given in the lower right of the axis.
How can I force the ticks to have
373.3 373.35 ....