Skip to main content

Interactive data cursors for Matplotlib

Project description

mpldatacursor
============
``mpldatacursor`` provides interactive "data cursors" (clickable annotation boxes) for matplotlib.

Basic Usage
-----------
``mpldatacursor`` offers a few different styles of interaction. The basic
``DataCursor`` displays the x, y coordinates of the selected artist in an
annotation box. ``DraggableDataCursor`` allows the annotation box to be
dragged to a new position after creation, and ``HighlightingDataCursor``
highlights a ``Line2D`` artist in addition to displaying the selected
coordinates. Selected image values can be displayed using ``ImageDataCursor``.

As an example::

import matplotlib.pyplot as plt
import numpy as np
from mpldatacursor import datacursor

data = np.outer(range(10), range(1, 5))

fig, ax = plt.subplots()
lines = ax.plot(data)
ax.set_title('Click somewhere on a line')

datacursor(lines)

plt.show()

.. image:: http://joferkington.github.com/mpldatacursor/images/basic.png
:align: center
:target: https://github.com/joferkington/mpldatacursor/blob/master/examples/basic.py

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mpldatacursor-0.1.tar.gz (4.0 kB view details)

Uploaded Source

File details

Details for the file mpldatacursor-0.1.tar.gz.

File metadata

  • Download URL: mpldatacursor-0.1.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for mpldatacursor-0.1.tar.gz
Algorithm Hash digest
SHA256 39572d7a7399634b07fcb6278fede9ecb39a2113e9cfb06a09689ae55efadd19
MD5 05ef7deb14cd65c4f6a0fbf82aab8eea
BLAKE2b-256 d49679b61f29f6a1fceac6b946cb0166a5442a52096641bdb916bc711ec86d27

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page