Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/carbonplan/styles
plotting styles for altair and matplotlib
https://github.com/carbonplan/styles
Last synced: 2 months ago
JSON representation
plotting styles for altair and matplotlib
- Host: GitHub
- URL: https://github.com/carbonplan/styles
- Owner: carbonplan
- License: mit
- Created: 2020-05-03T04:08:36.000Z (over 4 years ago)
- Default Branch: main
- Last Pushed: 2024-07-15T21:44:59.000Z (6 months ago)
- Last Synced: 2024-08-04T01:13:32.781Z (5 months ago)
- Language: Python
- Homepage:
- Size: 495 KB
- Stars: 7
- Watchers: 4
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-vega - carbonplan-styles - Two themes (one light and one dark) for Altair (and Matplotlib). (Altair / Packages)
README
# carbonplan / styles
**plot styles for matplotlib and altair**
[![CI](https://github.com/carbonplan/styles/actions/workflows/main.yaml/badge.svg)](https://github.com/carbonplan/styles/actions/workflows/main.yaml)
![PyPI](https://img.shields.io/pypi/v/carbonplan_styles)
[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)A collection of plotting styles for [Matplotlib](https://matplotlib.org/) and [Altair](https://altair-viz.github.io/).
Try it out on Binder:
[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/carbonplan/styles/main?urlpath=lab)## install
```shell
pip install "carbonplan[styles]"
```## usage
There are currently two separate styles/themes available in this package:
1. `carbonplan_dark`: black background, lighter colors
2. `carbonplan_light`: white background, darker colorsBoth styels/themes are automatically made available in Matplotlib and Altair.
### matplotlib
```python
from carbonplan import stylesstyles.mpl.set_theme(style='carbonplan_dark')
```### altair
```python
import altair as altalt.themes.enable('carbonplan_dark')
```## license
All the code in this repository is [MIT](https://choosealicense.com/licenses/mit/)-licensed. We include attribution for this content, and we please request that you also maintain that attribution if using this data.
## about us
CarbonPlan is a nonprofit organization that uses data and science for climate action. We aim to improve the transparency and scientific integrity of climate solutions with open data and tools. Find out more at [carbonplan.org](https://carbonplan.org/) or get in touch by [opening an issue](https://github.com/carbonplan/styles/issues/new) or [sending us an email](mailto:[email protected]).