{"id":16282823,"url":"https://github.com/janjoch/interplot-minimal","last_synced_at":"2025-04-08T18:22:08.396Z","repository":{"id":243711000,"uuid":"813216938","full_name":"janjoch/interplot-minimal","owner":"janjoch","description":"Minimal install version: Create matplotlib and plotly charts with the same few lines of code.","archived":false,"fork":false,"pushed_at":"2024-10-12T21:54:12.000Z","size":2357,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T14:27:53.237Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/janjoch.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2024-06-10T17:38:06.000Z","updated_at":"2024-10-12T21:54:15.000Z","dependencies_parsed_at":"2024-06-21T13:53:11.890Z","dependency_job_id":null,"html_url":"https://github.com/janjoch/interplot-minimal","commit_stats":null,"previous_names":["janjoch/interplot-minimal"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjoch%2Finterplot-minimal","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjoch%2Finterplot-minimal/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjoch%2Finterplot-minimal/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/janjoch%2Finterplot-minimal/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/janjoch","download_url":"https://codeload.github.com/janjoch/interplot-minimal/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247898723,"owners_count":21014762,"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-10T19:11:44.399Z","updated_at":"2025-04-08T18:22:08.376Z","avatar_url":"https://github.com/janjoch.png","language":"Jupyter Notebook","readme":"# interplot\n\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0) [![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/janjoch/interplot/HEAD) [![NBViewer](https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.org/github/janjoch/interplot/tree/main/)\n\nCreate `matplotlib` and `plotly` charts with the same few lines of code.\n\nIt combines the best of the `matplotlib` and the `plotly` worlds through a unified, flat API.\n\nSwitch between `matplotlib` and `plotly` with the single keyword `interactive`. All the necessary boilerplate code to translate between the packages is contained in this module.\n\nCurrently supported building blocks:\n\n- scatter plots\n    - `line`\n    - `scatter`\n    - `linescatter`\n- bar charts `bar`\n- histogram `hist`\n- boxplot `boxplot`\n- heatmap `heatmap`\n- linear regression `regression`\n- line fill `fill`\n- annotations `text`\n\nSupported\n- 2D subplots\n- automatic color cycling\n- 3 different API modes\n    - One line of code\n        ```python\n        \u003e\u003e\u003e interplot.line([0,4,6,7], [1,2,4,8])\n        [plotly line figure]\n\n        \u003e\u003e\u003e interplot.hist(np.random.normal(40, 8, 1000), interactive=False)\n        [matplotlib hist figure]\n\n        \u003e\u003e\u003e interplot.boxplot(\n        \u003e\u003e\u003e     [\n        \u003e\u003e\u003e         np.random.normal(20, 5, 1000),\n        \u003e\u003e\u003e         np.random.normal(40, 8, 1000),\n        \u003e\u003e\u003e         np.random.normal(60, 5, 1000),\n        \u003e\u003e\u003e     ],\n        \u003e\u003e\u003e )\n        [plotly boxplots]\n        ```\n\n    - Decorator to auto-initialize plots to use in your methods\n        ```python\n        \u003e\u003e\u003e @interplot.magic_plot\n        \u003e\u003e\u003e def plot_my_data(fig=None):\n        \u003e\u003e\u003e     # import and process your data...\n        \u003e\u003e\u003e     data = np.random.normal(2, 3, 1000)\n        \u003e\u003e\u003e     # draw with the fig instance obtained from the decorator function\n        \u003e\u003e\u003e     fig.add_line(data, label=\"my data\")\n        \u003e\u003e\u003e     fig.add_fill((0, 999), (-1, -1), (5, 5), label=\"sigma\")\n\n        \u003e\u003e\u003e plot_my_data(title=\"My Recording\")\n        [plotly figure \"My Recording\"]\n\n        \u003e\u003e\u003e @interplot.magic_plot_preset(interactive=False, title=\"Preset Title\")\n        \u003e\u003e\u003e def plot_my_data_preconfigured(fig=None):\n        \u003e\u003e\u003e     # import and process your data...\n        \u003e\u003e\u003e     data = np.random.normal(2, 3, 1000)\n        \u003e\u003e\u003e     # draw with the fig instance obtained from the decorator function\n        \u003e\u003e\u003e     fig.add_line(data, label=\"my data\")\n        \u003e\u003e\u003e     fig.add_fill((0, 999), (-1, -1), (5, 5), label=\"sigma\")\n\n        \u003e\u003e\u003e plot_my_data_preconfigured()\n        [matplotlib figure \"Preset Title\"]\n        ```\n\n    - The ```interplot.Plot``` class for full control\n        ```python\n        \u003e\u003e\u003e fig = interplot.Plot(\n        \u003e\u003e\u003e     interactive=True,\n        \u003e\u003e\u003e     title=\"Everything Under Control\",\n        \u003e\u003e\u003e     fig_size=(800, 500),\n        \u003e\u003e\u003e     rows=1,\n        \u003e\u003e\u003e     cols=2,\n        \u003e\u003e\u003e     shared_yaxes=True,\n        \u003e\u003e\u003e     # ...\n        \u003e\u003e\u003e )\n        \u003e\u003e\u003e fig.add_hist(np.random.normal(1, 0.5, 1000), row=0, col=0)\n        \u003e\u003e\u003e fig.add_boxplot(\n        \u003e\u003e\u003e     [\n        \u003e\u003e\u003e         np.random.normal(20, 5, 1000),\n        \u003e\u003e\u003e         np.random.normal(40, 8, 1000),\n        \u003e\u003e\u003e         np.random.normal(60, 5, 1000),\n        \u003e\u003e\u003e     ],\n        \u003e\u003e\u003e     row=0,\n        \u003e\u003e\u003e     col=1,\n        \u003e\u003e\u003e )\n        \u003e\u003e\u003e # ...\n        \u003e\u003e\u003e fig.post_process()\n        \u003e\u003e\u003e fig.show()\n        [plotly figure \"Everything Under Control\"]\n\n        \u003e\u003e\u003e fig.save(\"export/path/file.html\")\n        saved figure at export/path/file.html\n        ```\n\n\n## Resources\n\n- **Documentation:** https://interplot.janjo.ch\n- **Demo Notebooks:** https://nbviewer.org/github/janjoch/interplot/tree/main/demo/\n- **Source Code:** https://github.com/janjoch/interplot\n- **PyPI:** https://pypi.org/project/interplot/\n\n\n## Licence\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](https://www.gnu.org/licenses/gpl-3.0)\n\n\n## Demo\n\nView on `NBViewer`:\n[![NBViewer](https://raw.githubusercontent.com/jupyter/design/master/logos/Badges/nbviewer_badge.svg)](https://nbviewer.org/github/janjoch/interplot/tree/main/)\n\n\nTry on `Binder`:\n[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/gh/janjoch/interplot/HEAD)\n\n\n## Install\n```pip install interplot```\n\n\n### dev installation\n1. ```git clone https://github.com/janjoch/interplot```\n2. ```cd interplot```\n2. ```pip install -e .```\n\n\n## Contribute\n\nIdeas, bug reports/fixes, feature requests and code submissions are very welcome! Please write to [janjo@duck.com](mailto:janjo@duck.com) or directly into a pull request.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanjoch%2Finterplot-minimal","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjanjoch%2Finterplot-minimal","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjanjoch%2Finterplot-minimal/lists"}