-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Labels
Community supportUsers in need of help.Users in need of help.
Description
Hi,
I try to disable the offset computed to label the axes in the plot.
It looks like the global or local set of useOffset
is just ignored.
Code for reproduction
import matplotlib
import matplotlib.pyplot as plt
from mpl_toolkits.axisartist.axislines import Subplot
# Disable it globally
matplotlib.rcParams["axes.formatter.useoffset"] = False
fig = plt.figure(figsize=(3, 3))
ax = Subplot(fig, 111)
fig.add_subplot(ax)
ax.axis["right"].set_visible(False)
ax.axis["top"].set_visible(False)
# Disable it locally
ax.get_yaxis().get_major_formatter().set_useOffset(False)
ax.set_ylim(10 ** 8, 10 ** 8 + 1)
print(ax.get_yaxis().get_major_formatter().useOffset)
# > False
plt.show()
Actual outcome
Expected outcome
We should not see the 1e8
and the axis should be labelled without the remove of the offset.
Matplotlib version
- matplotlib 3.1.1
Metadata
Metadata
Assignees
Labels
Community supportUsers in need of help.Users in need of help.