Skip to content

Commit 060b9bd

Browse files
committed
update README.md
1 parent d90c634 commit 060b9bd

1 file changed

Lines changed: 42 additions & 0 deletions

File tree

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# physics-plot
2+
3+
`physics-plot` is a lightweight Matplotlib add-on that ships a publication-friendly plotting style and a few helper utilities.
4+
5+
## Features
6+
7+
- **Matplotlib style sheet**`physics_plot.pp_base` enforces serif fonts, LaTeX math, minimalist grids, and high-resolution exports out of the box.
8+
- **Legend utilities**`physics_plot.Handles` makes it easy to build custom legend entries for artists (e.g., violin plots) that don’t expose a `label` argument.
9+
10+
## Installation
11+
12+
```bash
13+
pip install physics-plot
14+
```
15+
16+
## Quick Start
17+
18+
```python
19+
import matplotlib.pyplot as plt
20+
21+
plt.style.use("physics_plot.pp_base")
22+
```
23+
24+
## Examples
25+
26+
- **Bode plot** (`examples/bode-plot.py`) generates a two-panel magnitude/phase plot for a first-order low-pass filter.
27+
28+
![Bode plot](examples/bode-plot@2x.png)
29+
30+
- **Violin plot** (`examples/violin-plot.ipynb`) demonstrates how to pair `Handles` with `Axes.violinplot` so the legend of the violin plot can be created, which is absent in Matplotlib.
31+
32+
![Violin plot](examples/violin-plot@2x.png)
33+
34+
Feel free to start from either example when styling your own figures.
35+
36+
## Development
37+
38+
- Coming soon
39+
40+
## License
41+
42+
[MIT](LICENSE)

0 commit comments

Comments
 (0)