Skip to content

Annotations are not clipped properly #14354

Closed
@2xB

Description

@2xB

Bug report

Bug summary

Drawing an annotation outside the visible region inline in jupyter notebook leads to whitespace added around the figure extending it to where the annotation would be.

Code for reproduction

import matplotlib.pyplot as plt
%matplotlib inline
plt.xlim(0,1)
plt.ylim(0,1)
plt.annotate(xy=(3, 3), s='test')

Actual outcome


grafik


Expected outcome


grafik


Matplotlib version

  • Operating system: KDE neon 5.15
  • Matplotlib version: 3.0.3
  • Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline
  • Python version: 3.6.7
  • Jupyter version: 5.2.2

Everything is installed via pip, pip and python are installed via apt.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions