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

plt.imshow: clip_on=False has no effect #15546

Closed
Milestone
@Tal-Golan

Description

@Tal-Golan

Bug report

Bug summary

Images plotted by plt.imshow are always clipped, reglardless of the clip_on argument.

Code for reproduction

importnumpyasnpimportmatplotlib.pyplotaspltfrommatplotlib.cbookimportget_sample_datafig=plt.figure(figsize=(10,5))ax=plt.subplot(111)plt.subplots_adjust(left=0.25,bottom=0.1,right=0.75,top=0.9,wspace=0,hspace=0)# plot a line. When clip_on is set to False, the line is extended beyond the axesax.plot(np.linspace(0,2),np.sin(np.linspace(0,2)),clip_on=False)plt.xlim([0,1])plt.ylim([0,1])# plot a bitmap. Although clip_on is set to False, it is clipped by the axeslogo=plt.imread(get_sample_data("logo2.png",asfileobj=False))left,right,bottom,top=0.25,0.25+1.12,0.25,0.25+0.24ax.imshow(X=logo,extent=(left,right,bottom,top),clip_on=False)

Actual outcome

image

Expected outcome
The matplotlib logo shouldn't be clipped by the axes, since clip_on was set to False.

Matplotlib version

  • Operating system: Ubuntu 18.04
  • Matplotlib version: : 3.1.1 (pip installation)
  • Matplotlib backend: Qt5Agg
  • Python version: 3.6

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