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
tmux Requires allow-passthrough on in tmux config
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.1.tar.gz (3.8 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.2.1-py3-none-any.whl (5.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for kitcat-1.2.1.tar.gz
Algorithm Hash digest
SHA256 6e236f3a002d494531bc3b411fbf19e8c1bfa6af6b8657acdc30efa246e92ec8
MD5 d29396706006b2a209982c8665a51502
BLAKE2b-256 f9abadfda6eb04e2bfa973aa80f9d9fc5ce1a97f5c72bc39818ffafec2fe3770

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for kitcat-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 0620ff2c112040a833a04c52b674e342184b2f17676131f096a3198d7040620c
MD5 cddcc90b51e8e1d11c006ad3b55c5d84
BLAKE2b-256 654d9242e87398776ac23f29b2b03128eda36c93c94a66be9a28978fabf1b1d4

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