{"id":20500732,"url":"https://github.com/jafarabdi/matplotlib-wezterm","last_synced_at":"2025-03-05T19:34:25.708Z","repository":{"id":234597986,"uuid":"631382428","full_name":"JafarAbdi/matplotlib-wezterm","owner":"JafarAbdi","description":"matplotlib-wezterm","archived":false,"fork":false,"pushed_at":"2023-04-22T21:58:24.000Z","size":6,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-16T06:58:33.224Z","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":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/JafarAbdi.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2023-04-22T21:08:48.000Z","updated_at":"2023-04-22T21:10:56.000Z","dependencies_parsed_at":"2024-04-20T00:53:43.645Z","dependency_job_id":"162b4aad-8ba5-4b22-8c49-a80e56334596","html_url":"https://github.com/JafarAbdi/matplotlib-wezterm","commit_stats":null,"previous_names":["jafarabdi/matplotlib-wezterm"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JafarAbdi%2Fmatplotlib-wezterm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JafarAbdi%2Fmatplotlib-wezterm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JafarAbdi%2Fmatplotlib-wezterm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/JafarAbdi%2Fmatplotlib-wezterm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/JafarAbdi","download_url":"https://codeload.github.com/JafarAbdi/matplotlib-wezterm/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242092798,"owners_count":20070599,"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-11-15T18:22:33.191Z","updated_at":"2025-03-05T19:34:25.685Z","avatar_url":"https://github.com/JafarAbdi.png","language":"Python","readme":"# matplotlib-wezterm\n\n[![Format](https://github.com/JafarAbdi/matplotlib-wezterm/actions/workflows/format.yml/badge.svg)](https://github.com/JafarAbdi/matplotlib-wezterm/actions/workflows/format.yml)\n\nA matplotlib backend for [wezterm](https://github.com/wez/wezterm/).\nThe code is based on [itermplot](https://github.com/daleroberts/itermplot)\n\n## Installation\n\nAssuming you have [micromamba](https://mamba.readthedocs.io/en/latest/installation.html#automatic-installation)\n\n```bash\nmicromamba create -f environment.yml\nmicromamba run -n matplotlib-wezterm pip install .\n```\n\n## Usage\n\n```bash\nMPLBACKEND='module://matplotlib_wezterm' micromamba run -n matplotlib-wezterm ipython\n```\n\n[![demo-manual]](https://user-images.githubusercontent.com/16278108/233807919-eef927ea-ae60-424c-abe2-63435849be5f.mp4)\n\nIf you want to show the plot without explicitly calling `plt.show()`\ncreate the following `~/.ipython/profile_default/startup/wezterm.py`\nwith the following content:\n\n```python\nimport os\n\n\ndef enable_wezterm():\n    import matplotlib.pyplot as plt\n    import matplotlib\n\n    def display_and_reset(*args):\n        plt.show()\n        plt.figure()  # New figure for next plot (don't re-use)\n\n    # Tell IPython to display matplotlib figures automatically\n    from IPython import get_ipython\n\n    formatter = get_ipython().display_formatter.formatters[\"text/plain\"]\n    formatter.for_type(matplotlib.artist.Artist, display_and_reset)\n    formatter.for_type(matplotlib.axes.Axes, display_and_reset)\n\n\n\nif os.environ.get(\"MPLBACKEND\", \"\") == \"module://matplotlib_wezterm\":\n    enable_wezterm()\n```\n\n[![demo-auto]](https://user-images.githubusercontent.com/16278108/233807925-1d2c92ed-fa16-43e8-a609-3aa07e39e36c.mp4)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjafarabdi%2Fmatplotlib-wezterm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjafarabdi%2Fmatplotlib-wezterm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjafarabdi%2Fmatplotlib-wezterm/lists"}