Skip to content

Commit 91ea5ec

Browse files
committed
fix: update README to include download badge and improve usage instructions
1 parent b86f5a8 commit 91ea5ec

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# physics-plot
22

33
[![PyPI - Version](https://img.shields.io/pypi/v/physics-plot)](https://pypi.org/project/physics-plot/)
4+
[![PyPI - Downloads](https://img.shields.io/pypi/dm/physics-plot)](https://pypi.org/project/physics-plot/)
45

56
`physics-plot` is a lightweight python package shipping a [Matplotlib style sheet](https://matplotlib.org/stable/gallery/style_sheets/style_sheets_reference.html) called [`pp_base.mplstyle`](https://github.com/c0rychu/physics-plot/blob/main/src/physics_plot/pp_base.mplstyle) and a few helper functions to create publication-quality plots with minimal effort.
67

@@ -20,10 +21,30 @@ pip install physics-plot
2021

2122
## Quick Start
2223

24+
`physics-plot` can be installed via pip:
25+
```bash
26+
pip install physics-plot
27+
```
28+
29+
There are basically two ways to use the `physics-plot` stylesheet. You can set it globally at the start of your script/notebook:
2330
```python
2431
import matplotlib.pyplot as plt
2532

2633
plt.style.use("physics_plot.pp_base")
34+
35+
# ======================= #
36+
# Your plotting code here #
37+
# ======================= #
38+
```
39+
40+
Or you can apply it to individual figures using a context manager:
41+
```python
42+
import matplotlib.pyplot as plt
43+
44+
with plt.style.context("physics_plot.pp_base"):
45+
# ======================= #
46+
# Your plotting code here #
47+
# ======================= #
2748
```
2849

2950
## Examples

0 commit comments

Comments
 (0)