MCPcopy Index your code
hub / github.com/pythonprofilers/memory_profiler / mouse_click_handler

Function mouse_click_handler

mprof.py:664–678  ·  view source on GitHub ↗
(event)

Source from the content-addressed store, hash-verified

662 FLAME_PLOTTER_VARS['hovered_text'] = None
663
664 def mouse_click_handler(event):
665 x, y = event.xdata, event.ydata
666 if x is None or y is None:
667 return
668
669 for coord, _ in rectangles.items():
670 x0, y0, x1, y1 = coord
671 if x0 < x < x1 and y0 < y < y1:
672 toolbar = pl.gcf().canvas.toolbar
673 toolbar.push_current()
674 timestamp_ax.set_xlim(x0, x1)
675 timestamp_ax.set_ylim(y0, stack_size + 1)
676 toolbar.push_current()
677 pl.draw()
678 return
679
680 # plot timestamps, if any
681 if len(ts) > 0 and timestamps:

Callers

nothing calls this directly

Calls 1

itemsMethod · 0.80

Tested by

no test coverage detected