https://github.com/nrennie/rsspythemes
Python package for styling graphics for RSS publications.
https://github.com/nrennie/rsspythemes
python python-package
Last synced: 3 months ago
JSON representation
Python package for styling graphics for RSS publications.
- Host: GitHub
- URL: https://github.com/nrennie/rsspythemes
- Owner: nrennie
- License: cc-by-4.0
- Created: 2023-07-28T14:24:14.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-29T21:07:11.000Z (almost 3 years ago)
- Last Synced: 2025-04-07T21:46:20.305Z (about 1 year ago)
- Topics: python, python-package
- Language: Python
- Homepage:
- Size: 32.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# RSSpythemes
Python package for styling graphics for RSS publications. This package accompanies the *Best Practices for Data Visualisation* guidance, published by the Royal Statistical Society, which can be found at [royal-statistical-society.github.io/datavisguide](https://royal-statistical-society.github.io/datavisguide/). The R version of this package can also be found on [GitHub](https://github.com/nrennie/RSSthemes).
This package, the data visualisation guidance site and its content are under development, and the authors welcome feedback and contributions.
## Installation
Install from GitHub using `pip` with:
```bash
pip install git+https://github.com/nrennie/RSSpythemes.git#egg=RSSpythemes
```
Then load the package (and `matplotlib`):
```python
import RSSpythemes as rss
import matplotlib.pyplot as plt
```
## Examples
Using a single colour from stored variables:
```python
# data for bar chart
x = ['A', 'B', 'C']
value = [1, 2, 3]
# plot simple bar chart with blue bars
plt.bar(x, value, color=rss.signif_blue)
plt.show()
```

Using multiple colours from a palette:
```python
# get RSS colours
colors = rss.RSScols(name="signif_qual", n=3, palette_type="discrete")
# plot simple bar chart with multiple coloured bars
plt.bar(x, value, color=colors)
plt.show()
```

## Contributor guidelines
### To make a suggestion or ask a question
Please open up a discussion in the repository's [Discussions](https://github.com/royal-statistical-society/datavisguide/discussions) section.
### If you spot a bug or an error
Please either:
1. Raise an issue in the repository's [Issues](https://github.com/nrennie/RSSpythemes/issues) section, or
2. Fork this repository, edit the relevant file(s), and make a pull request against the `main` branch of this repository.
### If you want to add a new feature or section to the Python package:
1. Raise an issue in the repository's [Issues](https://github.com/nrennie/RSSpythemes/issues) section, tag it as an 'enhancement' and describe your proposed contribution.
2. Fork this repository and create a new branch named, e.g., `my-new-feature-or-section`.
3. Add content, code and files to your branch.
4. Make a pull request against the `main` branch of this repository.
Proposals for new features will be reviewed by the lead author team ("lead authors"):
- Andreas Krause
- Nicola Rennie
- Brian Tarran
Lead authors may offer feedback or suggestions to contributors before agreeing to merge pull requests. Lead authors reserve the right to refuse to merge pull requests, and the decision of the lead authors is final.
Use of, and all contributions to, our website and repository are governed by our [Code of Conduct](https://github.com/nrennie/RSSpythemes/blob/main/CODE_OF_CONDUCT.md).
This package is licensed under a [Creative Commons Attribution 4.0 (CC BY 4.0) International licence](https://creativecommons.org/licenses/by/4.0/?ref=chooser-v1), meaning it can be used and adapted for any purpose, provided attribution is given to the original authors. By contributing to this guide, contributors agree to licence their work under the same terms.