Skip to main content

A Python library to generate beautiful, clean charts in premium visual styles

Project description

Clean Charts Library

A Python library to generate line charts in clean, premium visual styles, including right-aligned axes, custom year boundaries, distinct line colors, and dynamic scaling for mini canvas resolutions.

Example Chart

The library automatically identifies date/time columns and any number of value series to plot them dynamically, with overlap-avoiding label placement, and allows custom color interpolation, date label frequencies, titles, and subtitles.

Installation

pip install .

Quick Start

You can run the script without any parameters to recreate the chart from the reference image:

from clean_charts import plot_time_series

# Generates the default landscape image (1000x500)
plot_time_series(
    output_path="chart_landscape.png", 
    aspect_ratio="landscape",
    title="Europe",
    subtitle="Sales of Chinese-made cars, % of total"
)

# Generates a 500x500 square visualization
plot_time_series(
    output_path="chart_500.png", 
    width=500, 
    height=500,
    title="Europe",
    subtitle="Sales of Chinese-made cars, % of total"
)

# Generates a chart with a custom color gradient (from Indigo to Coral)
plot_time_series(
    output_path="chart_gradient.png",
    start_color="#4b0082",
    end_color="#ff7f50",
    title="EV Market Split",
    subtitle="Gradient Theme Demonstration"
)

Custom Data Input and X-Axis Frequencies

You can supply your own pandas DataFrame with any date/time column and value columns. The library dynamically identifies them and configures the X-axis label frequency:

import pandas as pd
from clean_charts import plot_time_series

# Day-frequency dataset example
daily_data = pd.DataFrame({
    "Day": pd.date_range("2026-05-01", periods=10, freq="D"),
    "Users": [120, 150, 190, 240, 220, 250, 270, 310, 340, 320],
    "Signups": [15, 22, 35, 40, 28, 30, 32, 45, 52, 48]
})

plot_time_series(
    data=daily_data,
    output_path="daily_chart.png",
    title="Server Statistics",
    subtitle="10-Day Signups growth",
    label_frequency="day", # Supported: "year", "quarter", "month", "week", "day", "hour", "minute", "second"
    start_color="#006400",
    end_color="#ffd700"
)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

clean_charts-0.2.1.tar.gz (15.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

clean_charts-0.2.1-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file clean_charts-0.2.1.tar.gz.

File metadata

  • Download URL: clean_charts-0.2.1.tar.gz
  • Upload date:
  • Size: 15.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for clean_charts-0.2.1.tar.gz
Algorithm Hash digest
SHA256 0e983b6f898048d3e82e05808ee526cabfe45e940f9ecfd51d1e7fc27e33d378
MD5 4b7710cacb3cb24fcb737ef7a4709570
BLAKE2b-256 c9994148690f18fb0f62df3e37d67a63a2b5c9bc5b93b942e1aa8d920c8e9cce

See more details on using hashes here.

File details

Details for the file clean_charts-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: clean_charts-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.9

File hashes

Hashes for clean_charts-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 7605c5a623d7aa2be5115ddcf5aac1ab164a4ca6aaa35fa7e282b2f9aae2e488
MD5 bb1bd27e5797ce9886e5dcdd58099815
BLAKE2b-256 aedb6ddbb5c95a61e2cdc3d53560f1c9dfbeb16d41dccf75461f776805e1e222

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page