Skip to main content

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


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 details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sacredfig-0.1.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file sacredfig-0.1.1.tar.gz.

File metadata

  • Download URL: sacredfig-0.1.1.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.0

File hashes

Hashes for sacredfig-0.1.1.tar.gz
Algorithm Hash digest
SHA256 896768a37cd8cf62fb7d36a60217830730086f60d4751bc38b14f85eee8e047e
MD5 59a4ab92bd75e672bf600459ec98951d
BLAKE2b-256 ab4552627064b1a75768a6cb6dee5e1ac64a50cc0828fe364138512123b014b7

See more details on using hashes here.

File details

Details for the file sacredfig-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sacredfig-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.11.0

File hashes

Hashes for sacredfig-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 c67902990bd8dd94f8cba9d97d8a0bceeca435d852157897f240479aae04556f
MD5 9bb65f8e3bbdb496e997632dc8fe9de0
BLAKE2b-256 71515743f9e2c26075f0bad9ad482917c9588aa40c38d5d9d07e2ab9cd1ae230

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