Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bskinn/mpl-kaleidagraph
matplotlib style file to mimic Kaleidagraph line/scatter plots
https://github.com/bskinn/mpl-kaleidagraph
matplotlib matplotlib-style-sheets
Last synced: 4 days ago
JSON representation
matplotlib style file to mimic Kaleidagraph line/scatter plots
- Host: GitHub
- URL: https://github.com/bskinn/mpl-kaleidagraph
- Owner: bskinn
- License: mit
- Created: 2019-07-02T20:21:38.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-07-02T21:30:51.000Z (over 5 years ago)
- Last Synced: 2024-10-30T15:08:43.838Z (about 2 months ago)
- Topics: matplotlib, matplotlib-style-sheets
- Language: Shell
- Size: 66.4 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# mpl-kaleidagraph
matplotlib style file created to mimic Kaleidagraph line/scatter plots.
## Sample Kaleidagraph Plot
## matplotlib Replica
*(artificial datasets constructed to resemble the originals)*
## Jupyter Code
```
from pathlib import Path
from random import randomimport numpy as np
%matplotlib inline
import matplotlib.pyplot as plt
from matplotlib.ticker import MultipleLocatorplt.style.use(str(Path('C:\\') / ... / 'kaleida.mplstyle'))
xdata1 = np.arange(0, 193, 7)
ydata1 = 250 * np.exp(-0.15 * (xdata1 / 60))
ydata1_noisy = np.array([(0.99 + 0.02 * random()) * _ for _ in ydata1])xdata2 = np.arange(0, 160, 7)
ydata2 = 250 * np.exp(-0.55 * (xdata2 / 60))
ydata2_noisy = np.array([(0.99 + 0.03 * random()) * _ for _ in ydata2])plt.plot(xdata1, ydata1)
plt.plot(xdata1, ydata1_noisy, 'o', label="Base")plt.plot(xdata2, ydata2)
plt.plot(xdata2, ydata2_noisy, 's', label="Tubing")plt.xlabel('Time (min)')
plt.ylabel('O$_2$ Concentration ($\mathrm{\mu}$M)')plt.text(120, 195, "Base", size='large')
plt.text(115, 100, "Tubing", size='large')ax = plt.gca()
ax.set_xlim([0, 200])
ax.set_xticks(list(range(0, 210, 30)))
ax.xaxis.set_minor_locator(MultipleLocator(5))ax.set_ylim([0, 280])
ax.set_yticks(list(range(0, 300, 50)))
ax.yaxis.set_minor_locator(MultipleLocator(10))
```-----
Copyright (c) Brian Skinn 2019
Style file is licensed under the [MIT License](https://github.com/bskinn/mpl-kaleidagraph/blob/master/LICENSE.txt).
Images are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License .