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.1.2.tar.gz (59.7 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.1.2-py3-none-any.whl (56.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clean_charts-0.1.2.tar.gz
  • Upload date:
  • Size: 59.7 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.1.2.tar.gz
Algorithm Hash digest
SHA256 6e4f7d835b162a5630f912b732ddcc9a36cdeed33c9e249b17c25c939acfd933
MD5 6fd77345d3ef5ea2e71b324813c75c12
BLAKE2b-256 97244e45f42a799bec5c3694a025ecf28ba09aff7587cf4347399aa59d313205

See more details on using hashes here.

File details

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

File metadata

  • Download URL: clean_charts-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 56.1 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.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5bdf37a2ffca608863792ec5f3abb6ebb5fa345fa5ae45357e098f07f47f54b2
MD5 cea201c130d5d2c9175f2706c8c827c0
BLAKE2b-256 cc54ce11b9bea2429399e72b19bddf6d9a1388cad446d3d57c3a9d8f3a68ada8

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