Skip to main content

A lightweight matplotlib plugin for rendering chat transcripts.

Project description

yapplotlib

A matplotlib plugin for rendering chat transcripts as matplotlib figures.

Instead of scrolling through this...

[
  {
    "role": "user",
    "content": "Have you heard of yapplotlib?"
  },
  {
    "role": "assistant",
    "content": "Yes! It's a matplotlib plugin for rendering chat logs as figures."
  },
  {
    "role": "user",
    "content": "That's quite meta."
  },
  {
    "role": "assistant",
    "content": "Indeed."
  }
]

...see it how your brain is used to.

Chat thread rendered in the default style

Designed for embedding LLM conversations in academic papers, slides, and notebooks as native matplotlib subplots.

Installation

uv add yapplotlib
# or
pip install yapplotlib

Quick start

import yapplotlib

messages = [
    {'role': 'system',    'content': 'You are a helpful assistant.'},
    {'role': 'user',      'content': 'What is the capital of France?'},
    {'role': 'assistant', 'content': 'The capital of France is Paris.'},
]

fig, ax = yapplotlib.chatplot(messages, style='paper')
fig.savefig('chat.pdf', bbox_inches='tight')

Themes

Four themes: default, paper, dark, minimal

Theme Description
'default' WhatsApp-style green/white, sans-serif
'paper' Greyscale, serif — survives black-and-white printing
'dark' Dark background for slides and web
'minimal' Outline only, no fill

For embedding, options, and customisation see the full documentation.

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

yapplotlib-0.1.0.tar.gz (12.7 kB view details)

Uploaded Source

Built Distribution

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

yapplotlib-0.1.0-py3-none-any.whl (15.4 kB view details)

Uploaded Python 3

File details

Details for the file yapplotlib-0.1.0.tar.gz.

File metadata

  • Download URL: yapplotlib-0.1.0.tar.gz
  • Upload date:
  • Size: 12.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for yapplotlib-0.1.0.tar.gz
Algorithm Hash digest
SHA256 dcef69f0c9d7308ad8d76f585107d5b785fffadf1437adc1ecf20d28958a8cce
MD5 8227ac097d2d4ec22d6e4aa0e9653808
BLAKE2b-256 f848221b052110005100fe3c0ca4055492208c6aa0caf8c99aa46e80c55296c8

See more details on using hashes here.

File details

Details for the file yapplotlib-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: yapplotlib-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.11.3 {"installer":{"name":"uv","version":"0.11.3","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for yapplotlib-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3c34c5c3bde3d4b83cbb14609d3d1f4dca15742bae3c2aa4c5f75bc55c708bcf
MD5 2ad95c1e3d3b608eacebea8906aaa95f
BLAKE2b-256 2e97c80bc16b4c9dfe8252f93346d87df53985ce10157b548a61960ba3635c05

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