{"id":17800442,"url":"https://github.com/anntzer/mplterm","last_synced_at":"2025-04-19T14:44:10.826Z","repository":{"id":145645434,"uuid":"397773849","full_name":"anntzer/mplterm","owner":"anntzer","description":"Terminal backend(s) for Matplotlib","archived":false,"fork":false,"pushed_at":"2025-01-07T17:22:13.000Z","size":46,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-29T08:51:09.502Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"zlib","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anntzer.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-08-19T00:51:57.000Z","updated_at":"2025-01-07T17:22:17.000Z","dependencies_parsed_at":null,"dependency_job_id":"ba8ad4df-3475-47d2-bf87-a8db5023c394","html_url":"https://github.com/anntzer/mplterm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anntzer%2Fmplterm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anntzer%2Fmplterm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anntzer%2Fmplterm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anntzer%2Fmplterm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anntzer","download_url":"https://codeload.github.com/anntzer/mplterm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249716763,"owners_count":21315068,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-27T12:21:59.404Z","updated_at":"2025-04-19T14:44:10.798Z","avatar_url":"https://github.com/anntzer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"mplterm: terminal backend(s) for Matplotlib\n===========================================\n\n| |GitHub|\n\n..\n    |PyPI|\n\n.. |GitHub|\n   image:: https://img.shields.io/badge/github-anntzer%2Fmplterm-brightgreen\n   :target: https://github.com/anntzer/mplterm\n.. |PyPI|\n   image:: https://img.shields.io/pypi/v/mplterm.svg\n   :target: https://pypi.python.org/pypi/mplterm\n\n``mplterm`` supports outputting Matplotlib figures directly to some terminals.\nCurrently, ``mplterm`` supports (to various degrees) the iterm2_, kitty_, and\nsixel_ protocols, but other protocols may be implemented in the future.\n\nThis package's implementation is heavily inspired by itermplot_ and other\nterminal integrations for Matplotlib, as listed below.\n\nInstall with pip_ (``pip install git+https://github.com/anntzer/mplterm``).\nUse by setting your Matplotlib backend to ``module://mplterm`` (e.g. by setting\nthe ``MPLBACKEND`` environment variable to ``module://mplterm``, or by calling\n``matplotlib.use(\"module://mplterm\")``).  The protocol to be used is normally\nauto-detected, but can also be configured manually.\n\nProtocols\n---------\n\nThe following protocols are implemented; they are listed in the default order\nin which ``mplterm`` searches a protocol supported by the underlying terminal.\n\n- The ``kitty`` protocol is supported by the kitty and WezTerm_ terminals.\n- The ``iterm2`` protocol is supported by the iterm2, WezTerm, and wsltty_\n  terminals.  Note that plain mintty_ is not supported.\n- The ``sixel`` protocol requires a `sixel-capable terminal`_, such as xterm_,\n  and ImageMagick≥7.0.1.  Note that ``mplterm`` will automatically and\n  silently set (once) the ``numColorRegisters`` resource to its maximum allowed\n  value.\n\nAnimations\n~~~~~~~~~~\n\nThe ``kitty`` and ``iterm2`` protocols provide different types of support for\n(standard, timed) animations.  The ``kitty`` protocol runs the actual animation\nloop in real time and updates the displayed figure, as would be done in a GUI\nwindow.  The ``iterm2`` protocol instead saves the animation to a GIF file\n(``save_count`` may need to be set accordingly) and then displays that file.\n\nConfiguration\n-------------\n\nConfiguration is done via the ``MPLTERM`` environment variable, which should be\nset to a semicolon-separate list of codes:\n\n- ``backend=...``: Set the underlying rendering backend (by default, \"agg\").\n- ``protocols=...``: Force the protocol to one of ``kitty``, ``iterm2``, or\n  ``sixel``.  This parameter can also be set to a comma-separated list of\n  protocols, in which case they will be tried in that order and the first\n  protocol supported by the underlying terminal will be selected.\n- ``transparency``: Make the figure and axes background transparent, if the\n  protocol supports transparency (the sixel protocol, implemented via\n  ImageMagick_, doesn't support it).\n- ``revvideo``: Reverse-video the colors (similarly to ``itermplot``).\n\nOther terminal backends for Matplotlib\n--------------------------------------\n\n- ``iterm2``:\n\n  - itermplot_.\n\n- ``kitty``:\n\n  - matplotlib-backend-kitty_.\n  - xontrib-kitty_.\n\n- ``sixel``:\n\n  - matplotlib-sixel_ (not on PyPI; uses ``ImageMagick``'s sixel support).\n  - sixelplot_ (wraps PySixel_; not a Matplotlib backend but rather provides\n    ``sixelplot.show()`` which displays the current figure).\n\n.. _ImageMagick: https://imagemagick.org/\n.. _ipykernel: https://pypi.org/project/ipykernel/\n.. _iterm2: https://iterm2.com/documentation-images.html\n.. _itermplot: https://pypi.org/project/itermplot/\n.. _kitty: https://sw.kovidgoyal.net/kitty/graphics-protocol/\n.. _matplotlib-backend-kitty: https://github.com/jktr/matplotlib-backend-kitty\n.. _matplotlib-sixel: https://github.com/koppa/matplotlib-sixel\n.. _matplotlib-sixel: https://github.com/koppa/matplotlib-sixel\n.. _mintty: https://mintty.github.io/\n.. _pip: https://pip.pypa.io/\n.. _PySixel: https://pypi.org/project/PySixel/\n.. _sixel-capable terminal: https://www.arewesixelyet.com\n.. _sixel: https://en.wikipedia.org/wiki/Sixel\n.. _sixelplot: https://pypi.org/project/sixelplot/\n.. _xontrib-kitty: https://pypi.org/project/xontib-kitty/\n.. _xterm: https://invisible-island.net/xterm/\n.. _WezTerm: https://wezfurlong.org/wezterm/\n.. _wsltty: https://github.com/mintty/wsltty\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanntzer%2Fmplterm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanntzer%2Fmplterm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanntzer%2Fmplterm/lists"}