5

I want to change the text of the offset in matplotlib. I made a plot:

x = linspace(0, 11, 1000)
plot(x,2000*(1-exp(-x))+randn(1000))
axis((10.3, 11, 1996.9, 2002.9))

enter image description here

Than the offset is written in the form +1.996e+3. It seems to me too difficult. I want to change it to +1996, or disable to use offset at all. I tried it as follows:

t = gca().yaxis.get_offset_text()
t.set_text('+1996')

It have not worked. What is the right way? Or can I set the format of the offset? Or how can I disable to use offsets?

0 Answers0