I would like to plot with matplotlib.pyplot. For the ticks at the x-axis I would like to get integer number multiplied by powers of 10. However, what I get is an integer number multiplied by a float and a power of 10, like it is shown in the figure below.
Deactivating this behavior with:
ax.get_xaxis().get_major_formatter().set_useOffset(False)
means that the tick labels will be integers only.
For example, I would like the number 35000 to be 35 and the multiplier on the axis to be 10^3 or 3.5 and the multiplier to be 10^4. Not 25 and the multiplier to be 1.4 * 10^3.
Update: The code that I used to generate the plot:
fig = plt.figure(figsize=(5, 5), dpi=80)
ax = fig.add_subplot(111)
data = read_data(filename)
ax.hist(data, bins=50)
x_median = np.median(data)
x_std = np.std(data)
ax.set_xlim([x_median - 4*x_std, x_median + 4*x_std])
Also, another plot that uses the same code but doesn't have the same issue.