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

Method _update_canvas

pyxrf/model/lineplot.py:318–335  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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

Callers 12

_new_optMethod · 0.95
_show_hide_exp_plotMethod · 0.95
update_fit_plotsMethod · 0.95
plot_multi_exp_dataMethod · 0.95
plot_current_elineMethod · 0.95
plot_roi_boundMethod · 0.95
show_roi_boundMethod · 0.95

Calls 2

init_mouse_eventMethod · 0.95
plot_vertical_markerMethod · 0.95

Tested by

no test coverage detected