-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed
Description
Bug report
Bug summary
Logarithmic scaling seems to break the label formatting.
Code for reproduction
import matplotlib.pyplot as plt
from matplotlib import ticker
import numpy as np
p = np.linspace(1000, 500, 100)
T = np.linspace(300, 200, p.size)
fig, ax = plt.subplots()
ax.plot(T, p)
ax.set_yscale('log')
ax.yaxis.set_major_formatter(ticker.StrMethodFormatter('{x:.3f}'))
plt.show()
The issue is reproducible using different Formatters (e.g. FuncFormatter, ...).
Expected outcome
I would expect the axis to use the passed Formatter like the linear scaled axis does:
Matplotlib version
- Operating System: macOS Sierra (10.12.4) | Debian GNU/Linux 8.6
- Matplotlib Version: 2.0.0
- Python Version: 3.6.1
Matplotlib was installed from the conda-forge channel.
Thanks for your great work!
/Lukas
mxmlnkn
Metadata
Metadata
Assignees
Labels
No labels