|
1626 | 1626 | " plt.show()\n",
|
1627 | 1627 | "\n",
|
1628 | 1628 | " def press(self, event):\n",
|
1629 |
| - " self.start = time.time()\n", |
| 1629 | + " self.start_time = time.time()\n", |
1630 | 1630 | "\n",
|
1631 | 1631 | " def release(self, event):\n",
|
1632 |
| - " self.end = time.time()\n", |
| 1632 | + " self.end_time = time.time()\n", |
1633 | 1633 | " self.draw_click(event)\n",
|
1634 | 1634 | " \n",
|
1635 | 1635 | " def draw_click(self, event):\n",
|
1636 |
| - " size = 4 * (self.end - self.start) ** 2\n", |
| 1636 | + " size = 4 * (self.end_time - self.start_time) ** 2\n", |
1637 | 1637 | " c1 = plt.Circle([event.xdata, event.ydata], 0.002,)\n",
|
1638 | 1638 | " c2 = plt.Circle([event.xdata, event.ydata], 0.02 * size, alpha=0.2)\n",
|
1639 | 1639 | " event.canvas.figure.gca().add_artist(c1)\n",
|
|
3071 | 3071 | " * mouse right click\n",
|
3072 | 3072 | " * mouse doubleclick\n",
|
3073 | 3073 | " \n",
|
3074 |
| - "Also, mouse movement events can be a little inconsistent (this can be especially true if your browser or other application are running at a significant CPU%, causing events to be missed in matplotlib running in an IPython notebook).\n", |
| 3074 | + "Also, mouse movement events can be a little inconsistent (this can be especially true if your browser or other application is running at a significant CPU%, causing events to be missed in matplotlib running in an IPython notebook).\n", |
3075 | 3075 | " \n",
|
3076 | 3076 | "However, we can still use IPython while switching to a new backend for matplotlib. To see which backends are available to you:"
|
3077 | 3077 | ]
|
|
0 commit comments