mplcursors
Interactive data selection cursors for Matplotlib.
What it is and what it does
mplcursors is a Matplotlib extension that lets you add interactive cursors to your plots. When you enable it, you can click on data points in a live plot window and the cursor will display the coordinates and values of that point. It's designed as a simpler alternative with a streamlined API.
The package depends only on matplotlib and importlib-metadata, making it lightweight to add to existing visualization workflows. It's actively maintained, has no known security vulnerabilities, and ranks in the top 5000 PyPI packages by download volume, suggesting it's used in real data exploration and analysis pipelines.
Use it for:
- Exploring scatter plots or line plots interactively to read exact values without manually hovering or zooming.
- Building interactive data analysis tools where users need to identify and annotate specific data points in real time.
- Debugging or validating data by clicking on plot points to confirm their coordinates match expectations.
- Creating Jupyter notebooks or scripts where interactive point selection enhances exploratory data analysis without complex UI code.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Adds interactive point-selection cursors to Matplotlib plots, allowing users to click on data points and retrieve their coordinates and values.
Yes, if you work with Matplotlib and need simple interactive point selection. The package is lightweight, actively maintained, has no vulnerabilities, and solves a common exploratory data analysis task. The only caveat is that the license status is unclear in the metadata, so verify the repository license before using it in a restricted context.
Install
mplcursors on PyPI
pip
pip install mplcursorsuv
uv add mplcursorspoetry
poetry add mplcursorsInstalling mplcursors
Before you install
Low friction install with only two runtime dependencies (matplotlib and importlib-metadata). Actively maintained with a recent release and no known vulnerabilities.
License in practice
License status is unclear from the package metadata, so you may want to check the repository directly before adopting it in a commercial or restricted context.
Quickstart
pip install mplcursors
import matplotlib.pyplot as plt
import mplcursors
plt.plot([1, 2, 3])
mplcursors.cursor()
plt.show()
Requires Matplotlib ≥3.1 and Python ≥3.7; interactive cursor features depend on a working display and Matplotlib backend that supports mouse events.
Verify before relying
- Whether the package works with all Matplotlib backends or only interactive ones (e.g., whether it functions in headless or notebook environments).
- Specific behavior when used with large datasets or whether there are performance considerations for plots with many points.
Package facts
| License | not declared (unclear) |
| Python support | supports the current Python release (>=3.7) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — matplotlib, importlib-metadata |
| Maintenance | actively maintained — 149 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,491,144/month — #3,842 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: mplcursors-0.7.1-py3-none-any.whl
Tags
More Graphics packages
Pillow adds image processing capabilities to…
permissive · top 100 on PyPI
fonttoolsfonttools manipulates font files in multiple…
permissive · top 1,000 on PyPI
matplotlib-inlineEnables matplotlib figures to display inline…
permissive · top 1,000 on PyPI
pymupdfPyMuPDF extracts, renders, converts, and…
agpl · top 1,000 on PyPI
pypdfium2pypdfium2 is a Python binding to PDFium that…
permissive · top 1,000 on PyPI
altairAltair is a declarative Python library for…
permissive · top 1,000 on PyPI
mpld3Converts matplotlib plots to interactive D3.js…
permissive · top 15,000 on PyPI
mplfinancemplfinance provides matplotlib-based…
permissive · top 15,000 on PyPI
matplotlibmatplotlib creates static, animated, and…
permissive · top 1,000 on PyPI
MouseInfoMouseInfo displays the XY coordinates and RGB…
copyleft · top 5,000 on PyPI
timpleTimple extends Matplotlib with locators and…
permissive · top 15,000 on PyPI
lovelyplotsLovelyPlots provides matplotlib style sheets…
permissive · top 15,000 on PyPI
hvplothvPlot provides a high-level plotting API that…
permissive · top 5,000 on PyPI
palettablePalettable provides a library of color palettes…
permissive · top 5,000 on PyPI
basemapBasemap renders geographic data on matplotlib…
permissive · top 15,000 on PyPI
colorcetColorcet provides a collection of perceptually…
unclear · top 5,000 on PyPI