Cosy matplotlib styles for tea and cat lovers
Project description
Taraplotlib
A cosy matplotlib styles for tea and cat lovers, inspired by the one and only Tara Murphy, part-time science communicator and professional tea drinker.
taraplotlib
(aka tpl
) is a quirky little thing that tries to recreate in a plot the feeling of sipping a cup of warm tea in a rainy day.
How did we do it? Let's see some examples!
If we try to plot a line...
x = np.linspace(0, 10, 100)
fig, ax = plt.subplots()
ax.plot(x, x)
... a line of steaming hot teacups appears! And in a nice pastel color, non of that professional-looking default blue!
Full example available in
taraplotlib/examples/single-line.py
I wonder what happens if I try to plot multiple lines...?
Full example available in
taraplotlib/examples/simple_plot.py
More pastel colors! And more nice little silhouettes! And we haven't even mentioned the cat in the background! That's a plot carrying one heck of a cosy vibe, right?
And to the purists in the room that have noticed, yes, by default tpl
plots (cute) markers, with very faint lines. "But what if I have too many data points? Won't the plot get too crowded?", I hear you ask. And to you - you know who you are - I reply that no! With a little matpllotlib dark magic we can make sure everything stays nice and cosy even with loads of data points. However, I can't but wonder why you have so many data points that you think this might be an issue. This is a cosy plotting library, and you are working too hard by the sounds of it! Stop producing so much data and go enjoy a cup of tea and maybe a movie!
But before you go, please don't forget to
add_background(ax, 'cat')
or your favorite between the available images (cat
, teacup
, teabag
, pawprint
). You wouldn't want to miss on the cosy good vibes!
Ok, now imagine that you have a 2D dataset to plot. Let's see what happens...
Full example available in
taraplotlib/examples/2d_plot.py
... what a cosy colormap! None of that harsh purple and yellow in viridis
.
But... does that mean tpl
has it's own colormaps? Yes! Here they are in their full glory!
Code available in
taraplotlib/examples/colormaps.py
So, if you are convinced, please don't hesitate to join in the cosy fun of tpl
with a simple
pip install .
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file taraplotlib-1.0.0.tar.gz
.
File metadata
- Download URL: taraplotlib-1.0.0.tar.gz
- Upload date:
- Size: 50.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3a0cac2426503676b4fc4e57957592ac38b77f1e0f0d27c91027f8b71cb6067 |
|
MD5 | 8918992f79b230ed121c56f8ea530ef9 |
|
BLAKE2b-256 | 292d83b6e4a46dd9776e5fe5c2c31ceb01a54b4a35b41c62e8e2f411d8a560ce |
File details
Details for the file taraplotlib-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: taraplotlib-1.0.0-py3-none-any.whl
- Upload date:
- Size: 39.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc745b61167518d4c93bb2e8295984225360d3985794a814b7b6687a8cf3003d |
|
MD5 | e6be593c68c56fc82c6412b04bdec4f4 |
|
BLAKE2b-256 | 50e8902d177531b936b3859a723a6350a6e274656ed06b7e2dd2b71020d1d470 |