{"id":20103223,"url":"https://github.com/lorenzschmid/dynplot","last_synced_at":"2025-05-06T08:31:13.336Z","repository":{"id":94724439,"uuid":"181852108","full_name":"lorenzschmid/dynplot","owner":"lorenzschmid","description":"Extends matplotlib's pyplot.plot() to allow for repetitive plotting to the same figure","archived":false,"fork":false,"pushed_at":"2019-04-17T13:09:58.000Z","size":10,"stargazers_count":8,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-05T03:53:13.096Z","etag":null,"topics":["matplotlib","matplotlib-pyplot","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lorenzschmid.png","metadata":{"files":{"readme":"README.rst","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,"publiccode":null,"codemeta":null}},"created_at":"2019-04-17T08:44:47.000Z","updated_at":"2023-12-21T15:22:01.000Z","dependencies_parsed_at":"2023-04-06T07:47:09.796Z","dependency_job_id":null,"html_url":"https://github.com/lorenzschmid/dynplot","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/lorenzschmid%2Fdynplot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzschmid%2Fdynplot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzschmid%2Fdynplot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lorenzschmid%2Fdynplot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lorenzschmid","download_url":"https://codeload.github.com/lorenzschmid/dynplot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252648578,"owners_count":21782406,"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":["matplotlib","matplotlib-pyplot","python"],"created_at":"2024-11-13T17:35:12.026Z","updated_at":"2025-05-06T08:31:13.330Z","avatar_url":"https://github.com/lorenzschmid.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"dynplot\n=======\n\nExtends matplotlib's pyplot.plot() to allow for repetitive plotting to the same figure\n\nThere is no simple way to update multiple lines repetitively and continuously of an existing figure in `matplotlib \u003chttps://matplotlib.org/\u003e`_. Using this class as drop-in replacement for matplotlib's pyplot, the figure's line will be updated upon every call of the ``plot()`` method and create thus a dynamic plot, constantly refreshing.\n\n**Current limitations:**\n\n- Only the ``plot`` function is supported.\n- The figure and axes are only configurable via the internal ``fig`` and ``ax`` attribute, i.e. the following call will _fail_:\n\n  \u003e\u003e\u003e dplt.title('Will fail!')\n\n  In this case, instead use the following:\n\n  \u003e\u003e\u003e _ = dplt.ax.set_title('Will work!')\n\n**Examples:**\n\nSingle call during one repetition, could also contain multiple ``x``/``y`` data pairs.\n\n\u003e\u003e\u003e from dynplot import dynplot\n\u003e\u003e\u003e from math import sin, pi\n\u003e\u003e\u003e\n\u003e\u003e\u003e dplt = dynplot()\n\u003e\u003e\u003e for i in range(100):\n\u003e\u003e\u003e     x = range(i, i+20)\n\u003e\u003e\u003e     y = [sin(2*pi*x/20) for x in x]\n\u003e\u003e\u003e     dplt.plot(x, y)\n\u003e\u003e\u003e     _ = dplt.ax.set_title('Wave')\n\u003e\u003e\u003e     dplt.show()\n\nMultiple calls (i.e. multiple lines) during one repetition\n\n\u003e\u003e\u003e from dynplot import dynplot\n\u003e\u003e\u003e from math import sin, pi\n\u003e\u003e\u003e\n\u003e\u003e\u003e dplt = dynplot()\n\u003e\u003e\u003e for i in range(100):\n\u003e\u003e\u003e     x = range(i, i+20)\n\u003e\u003e\u003e     y1 = [sin(2*pi*x/20) for x in x]\n\u003e\u003e\u003e     y2 = [sin(2*pi*x/10) for x in x]\n\u003e\u003e\u003e     dplt.plot(y1)\n\u003e\u003e\u003e     dplt.plot(y2)\n\u003e\u003e\u003e     dplt.show()\n\n\nInstallation\n------------\n\nThe module is build in a way to be installable with `pip \u003chttps://pypi.org/project/pip/\u003e`_:\n\n1. Clone this repository and enter it\n2. Type ``pip install .`` to install it\n\nIn order to add it to a requirements file as normally obtained from ``pip freeze``, use the following line:\n\n``-e git+https://github.com/lorenzschmid/dynplot.git#egg=dynplot==1.0.0``\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzschmid%2Fdynplot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Florenzschmid%2Fdynplot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Florenzschmid%2Fdynplot/lists"}