Simple data visualisation library that automatically styles matplotlib plots.
Project description
Diaplot
Diaplot provides a simple endpoint for generating visually appealing plots inspired by The Economist.
Features
- Line plot
- Bar chart
- Parliament visualisation
- Scatter plot
Planned features
- Map visualisations
- Chloropleth
- Bubble maps
- Arc maps
- Drawing geometry over maps
Installation
pip install diaplot
Quick Start
Line Chart
from diaplot import line_chart
import numpy as np
# Create chart
fig, ax = line_chart(
x=years,
y=values,
title="Economic Growth Over Time",
subtitle="Annual GDP growth rate, 1960-2020",
source="Source: World Bank",
color='#006BA2', # Economist blue
event_markers=[1970, 1973, 2008], # Mark recession years
)
Bar Chart
from diaplot import bar_chart
categories = ['2018', '2019', '2020', '2021', '2022']
values = [45, 52, 48, 61, 55]
fig, ax = bar_chart(
x=categories,
y=values,
title="Annual Revenue",
subtitle="Revenue in millions, 2018-2022",
source="Source: Company Reports",
color='#DB0A05', # Economist red
reference_lines=[50], # Add target line
)
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
diaplot-0.1.1.tar.gz
(5.0 MB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file diaplot-0.1.1.tar.gz.
File metadata
- Download URL: diaplot-0.1.1.tar.gz
- Upload date:
- Size: 5.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b62e4b46968dbe0a2ecc42c66018e0349498a0fce1aac32edcfdda494e0c7865
|
|
| MD5 |
a207d7878454aa6d474f2e4a694fe473
|
|
| BLAKE2b-256 |
2b1461411fb440f568a72a42184beee24b7c945d9410ee83153c55df8904a8d0
|
File details
Details for the file diaplot-0.1.1-py3-none-any.whl.
File metadata
- Download URL: diaplot-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.8 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
151eeb24c2a5f90dbc75c6b65a1bdbbe5ae406937dcb64ba7265746e2e0c1c53
|
|
| MD5 |
0cf62895ddb06209438cad1d76c20dae
|
|
| BLAKE2b-256 |
3226cf207a97d5e77a8d1f7b48cad38ed852a2af0270e6e3cc09a8f229991992
|