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.0.tar.gz (15.5 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.0-py3-none-any.whl (13.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: clean_charts-0.2.0.tar.gz
  • Upload date:
  • Size: 15.5 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.0.tar.gz
Algorithm Hash digest
SHA256 b9cf323a856473a6fd8b64bc14051826c59c83d2763ca76dedbbae072ac3976b
MD5 6b4f955f82db4a5d8a70267901728000
BLAKE2b-256 88065326b4b5a73b9b419f87d4c1602bad895c9238d4ad338fe1eb65b012c33d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: clean_charts-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 13.7 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 347eb2b27dea458d2270f9138f7a21318ff9d89bb20dca83dc140d8731946803
MD5 7d83458912938f610f506e8a7077a3a2
BLAKE2b-256 55dc772b265bc7f7aadb40354d8be1922c3cfe02cf81036f4bf3e843486e8bc6

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