Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Milestone
Description
Bug report
Bug summary
Setting axis ticks in a small log scale produces duplicate tick labels.
Code for reproduction
importmatplotlib.pyplotaspltfig,ax=plt.subplots()s=10ax.axis([s,100,10,100])ax.loglog([20,30], [30,40])frommatplotlib.tickerimportScalarFormatterforaxisin [ax.xaxis,ax.yaxis]:axis.set_major_formatter(ScalarFormatter())ax.set_xticks([20,55])ax.set_yticks([20,55])plt.show()
change code a little bit
importmatplotlib.pyplotaspltfig,ax=plt.subplots()s=9ax.axis([s,100,10,100])ax.loglog([20,30], [30,40])frommatplotlib.tickerimportScalarFormatterforaxisin [ax.xaxis,ax.yaxis]:axis.set_major_formatter(ScalarFormatter())ax.set_xticks([20,55])ax.set_yticks([20,55])plt.show()
Matplotlib version
- Operating system: Ubuntu 16.04
- Matplotlib version: 2.2.2
- Matplotlib backend: Qt5Agg
- Python version: 3.6
Metadata
Metadata
Assignees
Labels
No labels