Skip to content

Commit

Permalink
Merge pull request matplotlib#8453 from dstansby/capture-lines
Browse files Browse the repository at this point in the history
DOC: Manually collect lines on checkbox example
  • Loading branch information
tacaswell authored Apr 10, 2017
2 parents 102b4a5 + 7df9532 commit 1805226
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions examples/widgets/check_buttons.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
s2 = np.sin(6*np.pi*t)

fig, ax = plt.subplots()
ax.plot(t, s0, visible=False, lw=2, color='k', label='2 Hz')
ax.plot(t, s1, lw=2, color='r', label='4 Hz')
ax.plot(t, s2, lw=2, color='g', label='6 Hz')
l0, = ax.plot(t, s0, visible=False, lw=2, color='k', label='2 Hz')
l1, = ax.plot(t, s1, lw=2, color='r', label='4 Hz')
l2, = ax.plot(t, s2, lw=2, color='g', label='6 Hz')
plt.subplots_adjust(left=0.2)

lines = ax.get_lines()
lines = [l0, l1, l2]

# Make checkbuttons with all plotted lines with correct visibility
rax = plt.axes([0.05, 0.4, 0.1, 0.15])
Expand Down

0 comments on commit 1805226

Please sign in to comment.