A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mpl-point-clicker.readthedocs.io/en/stable below:

mpl_point_clicker documentation

Back to top

Toggle table of contents sidebar

Welcome to mpl_point_clicker’s documentation!#

A library for interactively labelling points with an arbitrary number of classes

Installation#
pip install mpl_point_clicker
Usage#
import numpy as np
import matplotlib.pyplot as plt
from mpl_point_clicker import clicker

fig, ax = plt.subplots(constrained_layout=True)
image = np.random.rand(512, 512)
ax.imshow(image, cmap="gray")
klicker = clicker(
   ax,
   ["cell", "pdms", "media"],
   markers=["o", "x", "*"]
)

You can also add scroll to zoom and middle-click and drag to pan with tools from mpl-interactions

from mpl_interactions import zoom_factory, panhandler

fig, ax = plt.subplots(constrained_layout=True)
image = np.random.rand(512, 512)
ax.imshow(image, cmap="gray")

# add zooming and middle click to pan
zoom_factory(ax)
ph = panhandler(fig, button=2)

klicker = clicker(
   ax,
   ["cell", "pdms", "media"],
   markers=["o", "x", "*"]
)
Getting Help#

If you have a question on how to do something with mpl_point_clicker a great place to ask it is: https://discourse.matplotlib.org/c/3rdparty/18.

Reporting Issues#

Please report issues to https://github.com/ianhi/mpl-point-clicker/issues/new/choose

Indices and tables#

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4