Skip to main content

Matplotlib backend for direct plotting in the terminal using Kitty graphics protocol.

Project description

kitcat

This project introduces a new kitcat backend for Matplotlib that allows plots to be displayed directly in the terminal. It utilizes the "agg" backend for rendering plots before sending them to the terminal.

  • Direct Matplotlib plotting in terminal emulators that support Kitty or iTerm2 graphics protocols.
  • Works seamlessly over SSH.

Terminal Emulator Support

Not all terminal emulators support Kitty or iTerm2 graphics protocols. I haven't done extensive testing, so please let me know if you find other emulators that are compatible, and I will update the list accordingly.

Terminal Emulator Supported Notes
Kitty
iTerm2
VSCode Needs terminal.integrated.enableImages in settings
WezTerm
tmux
Zellij
Alacritty
Warp
Terminal.app (macOS)
wayst

Installation

pip install kitcat

Usage

Select kitcat backend after importing matplotlib:

import matplotlib
matplotlib.use("kitcat")

Acknowledgements

I discovered matplotlib-backend-kitty repository, which provides similar functionality in Kitty. I aimed to create a simpler solution that works across any terminal supporting the protocol.

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

kitcat-1.2.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

kitcat-1.2.0-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

Details for the file kitcat-1.2.0.tar.gz.

File metadata

  • Download URL: kitcat-1.2.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.2

File hashes

Hashes for kitcat-1.2.0.tar.gz
Algorithm Hash digest
SHA256 76700417339ee057678083cb5f33623f94b4da37f9cc131783ccdc0c9d476a37
MD5 fbd458994f4d689da18d23904cf4b4c7
BLAKE2b-256 22f0289b3d597e62680c4a7c269537c2d3f71a77b2c8a3f7ac819b4db8cb57d6

See more details on using hashes here.

File details

Details for the file kitcat-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: kitcat-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.2

File hashes

Hashes for kitcat-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fa8ac2a25c5111c35d266583e9941fc96146f428dcedb4c91b57b1e31b9ae164
MD5 0ab772c7d257f53aee823d53a9753dfc
BLAKE2b-256 e67f9f56ad6d47b98b88573a3144a3e9e059ddaa4a28cdcdd0a6d8aa54e8c76c

See more details on using hashes here.

Supported by

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