83 lines
4.0 KiB
Plaintext
83 lines
4.0 KiB
Plaintext
Metadata-Version: 2.4
|
|
Name: kitcat
|
|
Version: 1.2.1
|
|
Summary: Matplotlib backend for direct plotting in the terminal using Kitty graphics protocol.
|
|
Project-URL: Repository, https://github.com/mil-ad/kitcat.git
|
|
Project-URL: Issues, https://github.com/mil-ad/kitcat/issues
|
|
Author-email: Milad Alizadeh <git@mil.ad>
|
|
License: MIT License
|
|
|
|
Copyright (c) 2024 Milad Alizadeh
|
|
|
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
of this software and associated documentation files (the "Software"), to deal
|
|
in the Software without restriction, including without limitation the rights
|
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
copies of the Software, and to permit persons to whom the Software is
|
|
furnished to do so, subject to the following conditions:
|
|
|
|
The above copyright notice and this permission notice shall be included in all
|
|
copies or substantial portions of the Software.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
SOFTWARE.
|
|
License-File: LICENSE
|
|
Keywords: kitty,matplotlib
|
|
Requires-Python: >=3.9
|
|
Requires-Dist: matplotlib>=3.9
|
|
Description-Content-Type: text/markdown
|
|
|
|
# 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](https://sw.kovidgoyal.net/kitty/graphics-protocol/) or [iTerm2](https://iterm2.com/documentation-images.html) graphics protocols.
|
|
- Works seamlessly over SSH.
|
|
|
|
<p float="left">
|
|
<img src="https://raw.githubusercontent.com/mil-ad/kitcat/main/demo1.gif" width="45%" />
|
|
<img src="https://raw.githubusercontent.com/mil-ad/kitcat/main/demo2.gif" width="45%" />
|
|
</p>
|
|
|
|
## 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:
|
|
|
|
```py
|
|
import matplotlib
|
|
matplotlib.use("kitcat")
|
|
```
|
|
|
|
## Acknowledgements
|
|
|
|
I discovered [matplotlib-backend-kitty](https://github.com/jktr/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.
|