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 Requires terminal.integrated.enableImages in settings
WezTerm
Ghostty
tmux Requires allow-passthrough on in tmux config
Warp
wayst
st Requires st-kitty-graphics patch
Zellij
Alacritty
Terminal.app (macOS)

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.3.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

kitcat-1.3.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: kitcat-1.3.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.11

File hashes

Hashes for kitcat-1.3.0.tar.gz
Algorithm Hash digest
SHA256 9c69f42e27eb3b1680dc3c619f87e01242dbadc7c6b32684315e9d166309f622
MD5 50852bcd7d58a46089762b0c7e951ae7
BLAKE2b-256 c675a5f36fa8489a23102e35cf3e42b23d7ccfb260e217df9879879d33230e00

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kitcat-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.5.11

File hashes

Hashes for kitcat-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3872e6f0e36626a22d3a931e1ae82359dfa715bf0ba297842b84771bf5f8c0f3
MD5 a1cd2bf851464b4416b70246989a1ba0
BLAKE2b-256 6d3e2b2ae4d02109ab8eeb747a0ad0e3f8067cf8f1daf9019b732e0487854c70

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