# sacredfig
SacredFig is a Python library that provides opinionated styles for scientific figures in matplotlib.
## Installation
Use the package manager [pip](https://pip.pypa.io/en/stable/) to install SacredFig.
```bash
pip install sacredfig
```
## Usage
```python
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));
```
Raw data
{
"_id": null,
"home_page": "https://github.com/cynddl/sacredfig",
"name": "sacredfig",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.8",
"maintainer_email": null,
"keywords": "matplotlib, data-visualization, scientific-figures, plotting",
"author": "Luc Rocher",
"author_email": "luc@rocher.lc",
"download_url": "https://files.pythonhosted.org/packages/ab/45/52627064b1a75768a6cb6dee5e1ac64a50cc0828fe364138512123b014b7/sacredfig-0.1.1.tar.gz",
"platform": null,
"description": "# sacredfig\n\nSacredFig is a Python library that provides opinionated styles for scientific figures in matplotlib.\n\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install SacredFig.\n\n```bash\npip install sacredfig\n```\n\n## Usage\n\n```python\nimport matplotlib.pyplot as plt\n\nimport seaborn as sns\nsns.reset_orig()\niris = sns.load_dataset(\"iris\")\n\nimport sacredfig\nfrom sacredfig import cm2in\n\nplt.style.use(sacredfig.style)\n\nfig, ax = plt.subplots(figsize=(6 * cm2in, 6 * cm2in), dpi=150)\nax.grid(False, which='major', axis='x')\n\nax.boxplot([iris.sepal_length.values, iris.sepal_width.values],\n labels=['Sepal length', 'Sepal width'])\n\nax.set_box_aspect(1)\nax.set(xlabel=\"Attribute\", ylabel=\"Empirical distribution\", ylim=(0, 10));\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "An opinionated library for scientific figures in matplotlib.",
"version": "0.1.1",
"project_urls": {
"Homepage": "https://github.com/cynddl/sacredfig",
"Repository": "https://github.com/cynddl/sacredfig"
},
"split_keywords": [
"matplotlib",
" data-visualization",
" scientific-figures",
" plotting"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "71515743f9e2c26075f0bad9ad482917c9588aa40c38d5d9d07e2ab9cd1ae230",
"md5": "9bb65f8e3bbdb496e997632dc8fe9de0",
"sha256": "c67902990bd8dd94f8cba9d97d8a0bceeca435d852157897f240479aae04556f"
},
"downloads": -1,
"filename": "sacredfig-0.1.1-py3-none-any.whl",
"has_sig": false,
"md5_digest": "9bb65f8e3bbdb496e997632dc8fe9de0",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.8",
"size": 4320,
"upload_time": "2024-03-23T21:58:34",
"upload_time_iso_8601": "2024-03-23T21:58:34.431717Z",
"url": "https://files.pythonhosted.org/packages/71/51/5743f9e2c26075f0bad9ad482917c9588aa40c38d5d9d07e2ab9cd1ae230/sacredfig-0.1.1-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "ab4552627064b1a75768a6cb6dee5e1ac64a50cc0828fe364138512123b014b7",
"md5": "59a4ab92bd75e672bf600459ec98951d",
"sha256": "896768a37cd8cf62fb7d36a60217830730086f60d4751bc38b14f85eee8e047e"
},
"downloads": -1,
"filename": "sacredfig-0.1.1.tar.gz",
"has_sig": false,
"md5_digest": "59a4ab92bd75e672bf600459ec98951d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.8",
"size": 4115,
"upload_time": "2024-03-23T21:58:37",
"upload_time_iso_8601": "2024-03-23T21:58:37.102434Z",
"url": "https://files.pythonhosted.org/packages/ab/45/52627064b1a75768a6cb6dee5e1ac64a50cc0828fe364138512123b014b7/sacredfig-0.1.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-03-23 21:58:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "cynddl",
"github_project": "sacredfig",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"tox": true,
"lcname": "sacredfig"
}