MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / canvas_onpress

Method canvas_onpress

pyxrf/model/lineplot.py:1370–1378  ·  view source on GitHub ↗

Callback, mouse button pressed

(self, event)

Source from the content-addressed store, hash-verified

1368 # self._update_canvas()
1369
1370 def canvas_onpress(self, event):
1371 """Callback, mouse button pressed"""
1372 if self.t_bar.mode == "":
1373 if event.inaxes == self._ax:
1374 if event.button == 1:
1375 xd = event.xdata
1376 self.set_plot_vertical_marker(marker_position=xd, mouse_clicked=True)
1377 else:
1378 self.hide_plot_vertical_marker(mouse_clicked=True)
1379
1380 # ===========================================================
1381 # Functions for plotting spectrum preview

Callers

nothing calls this directly

Calls 2

Tested by

no test coverage detected