Skip to content
/ kitcat Public

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

License

Notifications You must be signed in to change notification settings

mil-ad/kitcat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Languages