Basic Usage#

A short example showcasing how to use the library.

example

Out:

{'cells': array([], dtype=float64), 'pdms': array([], dtype=float64), 'media': array([], dtype=float64)}

import matplotlib.pyplot as plt
import numpy as np

from mpl_point_clicker import clicker

image = np.load('example_image.npy')

fig, ax = plt.subplots()
ax.imshow(image, cmap='gray')
klicker = clicker(ax, ['cells', 'pdms', 'media'], markers=['o', 'x', '*'])
plt.show()


print(klicker.get_positions())

Total running time of the script: ( 0 minutes 0.582 seconds)

Gallery generated by Sphinx-Gallery