-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Closed as not planned
Labels
GUI: nbaggstatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: duplicatestatus: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Action
Milestone
Description
Hi, I have:
- notebook 4.2.1
- matplotlib 1.5.1
- Python 3.5.2
- running on Ubuntu
I setup my env through conda.
An example from the docs that uses mpl_connect: http://matplotlib.org/users/event_handling.html#event-attributes
from matplotlib import pyplot as plt
class LineBuilder:
def __init__(self, line):
self.line = line
self.xs = list(line.get_xdata())
self.ys = list(line.get_ydata())
self.cid = line.figure.canvas.mpl_connect('button_press_event', self)
def __call__(self, event):
print('click', event)
if event.inaxes!=self.line.axes: return
self.xs.append(event.xdata)
self.ys.append(event.ydata)
self.line.set_data(self.xs, self.ys)
self.line.figure.canvas.draw()
fig = plt.figure()
ax = fig.add_subplot(111)
ax.set_title('click to build line segments')
line, = ax.plot([0], [0]) # empty line
linebuilder = LineBuilder(line)
plt.show()
The print('click', event)
line does not show any output in my Jupyter notebooks.
Metadata
Metadata
Assignees
Labels
GUI: nbaggstatus: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: duplicatestatus: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Action