(self)
| 316 | self._fig.canvas.mpl_connect("button_press_event", self.canvas_onpress) |
| 317 | |
| 318 | def _update_canvas(self): |
| 319 | # It may be sufficient to initialize the event only once, but at this point |
| 320 | # it seems to be the most reliable option. May be changed in the future. |
| 321 | self.init_mouse_event() |
| 322 | self.plot_vertical_marker() |
| 323 | |
| 324 | self._ax.legend(loc=2) |
| 325 | try: |
| 326 | self._ax.legend(framealpha=0.2).set_draggable(True) |
| 327 | except AttributeError: |
| 328 | self._ax.legend(framealpha=0.2) |
| 329 | self._fig.tight_layout(pad=0.5) |
| 330 | # self._ax.margins(x=0.0, y=0.10) |
| 331 | |
| 332 | # when we click the home button on matplotlib gui, |
| 333 | # relim will remember the previously defined x range |
| 334 | self._ax.relim(visible_only=True) |
| 335 | self._fig.canvas.draw() |
| 336 | |
| 337 | def _update_ylimit(self): |
| 338 | # manually define y limit, from experience |
no test coverage detected