interactive marker support for matplotlib
Project description
mpl-markers
Interactive data markers for line plots in matplotlib
Installation
pip install mpl-markers
Usage
import mpl_markers as mplm
Add a marker attached to plotted data lines:
import numpy as np
import matplotlib.pyplot as plt
plt.style.use('ggplot')
plt.rc('font', size=7)
fig, ax = plt.subplots(1,1)
x1 = np.linspace(-2*np.pi, 2*np.pi, 1000)
ax.plot(x1, np.sin(x1)*np.cos(x1)**2)
mplm.data_marker(x=0)
Add an axis marker that moves freely on the canvas:
ax.xaxis.set_major_formatter(lambda x, pos: '{:.2f}$\pi$'.format(x/np.pi))
mplm.axis_marker(x=0, y=-0.2)
License
mpl-markers is licensed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mpl-markers-0.0.2.tar.gz
(17.5 kB
view hashes)
Built Distribution
Close
Hashes for mpl_markers-0.0.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 85830a607b6fb8bc31ce45a33f657216515e12a6a4a5b08c972d9ca508f0bf92 |
|
MD5 | 66317d1e6b785d4d6e5833ad171792ad |
|
BLAKE2b-256 | 04f639ada37ca7550fdcb69b9b0ac4b5416669491a847a1e92bc4d6e27d1ae70 |