An opinionated library for scientific figures in matplotlib.
Project description
sacredfig
SacredFig is a Python library that provides opinionated styles for scientific figures in matplotlib.
Installation
Use the package manager pip to install SacredFig.
pip install sacredfig
Usage
import matplotlib.pyplot as plt
import seaborn as sns
sns.reset_orig()
iris = sns.load_dataset("iris")
import sacredfig
from sacredfig import cm2in
plt.style.use(sacredfig.style)
fig, ax = plt.subplots(figsize=(6 * cm2in, 6 * cm2in), dpi=150)
ax.grid(False, which='major', axis='x')
ax.boxplot([iris.sepal_length.values, iris.sepal_width.values],
labels=['Sepal length', 'Sepal width'])
ax.set_box_aspect(1)
ax.set(xlabel="Attribute", ylabel="Empirical distribution", ylim=(0, 10));
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
sacredfig-0.1.1.tar.gz
(4.1 kB
view hashes)
Built Distribution
Close
Hashes for sacredfig-0.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c67902990bd8dd94f8cba9d97d8a0bceeca435d852157897f240479aae04556f |
|
MD5 | 9bb65f8e3bbdb496e997632dc8fe9de0 |
|
BLAKE2b-256 | 71515743f9e2c26075f0bad9ad482917c9588aa40c38d5d9d07e2ab9cd1ae230 |