Timple
Timple offers extended functionality for plotting timedelta values with Matplotlib.
Installation
Installation via pip is recommended:
pip install timple
Overview
Matplotlib generally supports plotting of timedelta values but only as numeric values and only for limited data types. It does not natively have locators and formatters to create fancy plot ticks.
This package provides the necessary locators and formatters to create
axis ticks in intervals of minutes, hours, ...
Ticks can be formatted into a more readable time format. For example,
something like 185 seconds can be turned into 3:05 minute:seconds
representation.
Example plot:
The full documentation can be found here: https://theoehrly.github.io/Timple/
Features
- Formatters and Locators for timedelta
- Matplotlib patching, so that everything can happen with minimal effort
- Supports
numpy.timedelta64,datetime.timedelta,pandas.Timedelta
Additionally
- Support for
pandas.NaTwhen plotting timedelta and optionally when plotting date values too.
Usage
Minimal example: import and enable Timple. This will patch Matplotlib and register Timple's timedelta converter. By default, Timple's automatic locators and formatters will be used to determine the tick locations and format best suited for the plotted data. Further customization is possible.
import matplotlib.pyplot as plt
import timple
tmpl = timple.Timple()
tmpl.enable()
# you can now just use matplotlib as always
plt.plot(...some timedelta related data...)
plt.show()
Metadata
Release files for timple 0.1.8
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| timple-0.1.8.tar.gz | 17.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| timple-0.1.8-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 35.1 kB
Release files / timple-0.1.8.tar.gz
| Download URL | timple-0.1.8.tar.gz |
|---|---|
| Size | 17.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bbc120300f0103a3a93e54a0d00491c4b70872fe69b11204701a4889c6a05f0f
|
|
BLAKE2b-256 checksum How to use checksums |
9269728b57ee09a36a228f9f5e399eff5e8e8f4e32e3e366b57f56649a3eff28
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|
Release files / timple-0.1.8-py3-none-any.whl
| Download URL | timple-0.1.8-py3-none-any.whl |
|---|---|
| Size | 17.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
195a49e76f8a435e0bc079340b6c57272cc3aff9041f61f8858790d607a4e49d
|
|
BLAKE2b-256 checksum How to use checksums |
7545c73f9af9a9d50b0ae972d185ef2255c62524d1aa20a76531dd2fcda48819
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.8.18
|