MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / __init__

Method __init__

lib/matplotlib/lines.py:1683–1700  ·  view source on GitHub ↗

Parameters ---------- line : `~matplotlib.lines.Line2D` The line must already have been added to an `~.axes.Axes` and must have its picker property set.

(self, line)

Source from the content-addressed store, hash-verified

1681 """
1682
1683 def __init__(self, line):
1684 """
1685 Parameters
1686 ----------
1687 line : `~matplotlib.lines.Line2D`
1688 The line must already have been added to an `~.axes.Axes` and must
1689 have its picker property set.
1690 """
1691 if line.axes is None:
1692 raise RuntimeError('You must first add the line to the Axes')
1693 if line.get_picker() is None:
1694 raise RuntimeError('You must first set the picker property '
1695 'of the line')
1696 self.axes = line.axes
1697 self.line = line
1698 self.cid = self.canvas.callbacks._connect_picklable(
1699 'pick_event', self.onpick)
1700 self.ind = set()
1701
1702 canvas = property(lambda self: self.axes.get_figure(root=True).canvas)
1703

Callers

nothing calls this directly

Calls 2

get_pickerMethod · 0.80
_connect_picklableMethod · 0.80

Tested by

no test coverage detected