Skip to content

Lasso selector does not show in Jupyter notebook #15852

Closed
@nvaytet

Description

@nvaytet

Bug report

Bug summary

When trying the Lasso selector example in a Jupyter notebook, the lasso does not show.
It does however show correctly in the Qt window, if I try the same code example in a classic ipython terminal shell.

I also tried with a simpler example:

import matplotlib.pyplot as plt
from matplotlib.widgets import LassoSelector

fig, ax = plt.subplots()

def onSelect(x):
    print(x)

lineprops = {'color': 'red', 'linewidth': 4, 'alpha': 0.8}
lsso = LassoSelector(ax=ax, onselect=onSelect, lineprops=lineprops)

plt.show()

but the same happens:

Jupyter:
Screenshot at 2019-12-07 13-09-52

Qt window:
Screenshot at 2019-12-07 09-16-26

Matplotlib version

  • Operating system: Ubuntu 18.04
  • Matplotlib version: 3.1.1
  • Matplotlib backend (print(matplotlib.get_backend())): Qt5Agg + nbAgg
  • Python version: 3.7.3
  • Jupyter version (if applicable): 1.0.0 notebook: 6.0.2
  • Other libraries:

Matplotlib installed from conda

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions