Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Setting axis ticks in log scale produces duplicate tick labels. #11575

Closed
Milestone
@szsdk

Description

@szsdk

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()

Actual outcome
figure_1

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()

Expected outcome
figure_2

Matplotlib version

  • Operating system: Ubuntu 16.04
  • Matplotlib version: 2.2.2
  • Matplotlib backend: Qt5Agg
  • Python version: 3.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp