Leather Charting Library

0.4.1 · active · verified Sun Mar 29

Leather is a Python charting library designed for quickly generating straightforward visualizations, often described as 'charting for 80% of humans.' It currently stands at version 0.4.1, with its last release in December 2025. The library focuses on ease of use and producing functional charts without extensive customization options.

Warnings

Install

Imports

Quickstart

This quickstart example demonstrates how to create a simple scatter plot with 100 random data points and apply a custom colorizing function based on the data values. The resulting chart is then saved as an SVG file.

import random
import leather

# Generate some random data
dot_data = [(random.randint(0, 250), random.randint(0, 250)) for i in range(100)]

# Define a colorizing function based on data values
def colorizer(d):
    return 'rgb(%i, %i, %i)' % (d.x, d.y, 150)

# Create a chart and add dots with custom colors
chart = leather.Chart('Colorized dots')
chart.add_dots(dot_data, fill_color=colorizer)

# Save the chart to an SVG file
chart.to_svg('colorized_dots.svg')
print("Chart saved to colorized_dots.svg")

view raw JSON →