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

New yticks behavior in 3.1.1 vs 3.1.0 #14897

Closed
@caldwellshane

Description

@caldwellshane

Bug report

I'm usingimshow, and between 3.1.0 and 3.1.1 the behavior of the extents of the plot has changed when usingAxes.set_yticks. In 3.1.0, and in 3.1.1 when not callingset_yticks, the plot includes the outer 0.5 bin in the top and bottom rows. This is the desired behavior. But in 3.1.1 when usingset_yticks, the outer 0.5 bin in the top and bottom rows is not included in the plot.

Code for reproduction

importmatplotlibimportmatplotlib.pyplotaspltxy= [[1,3], [2,4]]fig,ax=matplotlib.pyplot.subplots(1)ax.imshow(xy)ax.set_xticks([0,1])ax.set_xticklabels(["0","1"])ax.set_yticks([0,1])ax.set_yticklabels(["0","1"])fig.savefig(f"matplotlib-v{matplotlib.__version__}.png")

The behavior changes in 3.1.1 ifax.set_yticks([0, 1]) is commented out.

Desired behavior
image

Behavior in 3.1.1 withset_yticks
image

Matplotlib version

  • Operating system: Mac OS 10.14.5
  • Matplotlib version: 3.1.1
  • Matplotlib backend: agg
  • Python version: 3.7.3
  • Jupyter version (if applicable): N/A
  • Other libraries: Fresh conda install of just matplotlib, using conda-forge

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp