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

inset_locator.mark_inset() misplaces box connectors #17711

Closed
@joreiff

Description

@joreiff

Bug report

Bug summary

inset_locator.mark_inset() sometimes misplaces the box connector lines if x/y limits on the parentAxes have not been explicitly set. Updating the plot (e.g. by saving the figure) seems to fix it.

Code for reproduction

importmatplotlib.pyplotaspltimportmpl_toolkits.axes_grid1.inset_locatorasmilocfig, (inset,full)=plt.subplots(ncols=2)# swapping the axes makes the example work# full, inset = inset, fullfull.plot([-1,0], [-1,0])inset.set_xlim(-0.6,-0.4)inset.set_ylim(-0.6,-0.4)# workaround# full.set_xlim(-1.0, 0.0)# full.set_ylim(-1.0, 0.0)miloc.mark_inset(full,inset,1,4)fig.savefig('Bug.png')# saving the figure a second time produces the expected resultfig.savefig('NoBug.png')

Actual outcome

Bug

Expected outcome

NoBug

This issue was not present in version 3.0.2.

Matplotlib version

  • Operating system: Fedora and Debian
  • Matplotlib version: 3.2.1 and 3.2.2
  • Matplotlib backend (print(matplotlib.get_backend())):Qt5Agg andagg
  • Python version: 3.8
  • Jupyter version (if applicable): N/A
  • Other libraries: N/A

Installed via pip on Debian and both pip and dnf on Fedora.

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