{"id":22456,"library":"textual-plotext","title":"Textual Plotext","description":"A Textual widget wrapper for the Plotext plotting library, enabling interactive terminal-based plots within Textual applications. Current version: 1.0.1. Active development.","status":"active","version":"1.0.1","language":"python","source_language":"en","source_url":"https://github.com/Textualize/textual-plotext","tags":["textual","plotext","plotting","terminal","widget"],"install":[{"cmd":"pip install textual-plotext","lang":"bash","label":"PyPI install"}],"dependencies":[{"reason":"Widget host framework","package":"textual","optional":false},{"reason":"Plotting backend","package":"plotext","optional":false}],"imports":[{"note":"PlotextPlot is exported at package level","wrong":"from textual_plotext.plotext import PlotextPlot","symbol":"PlotextPlot","correct":"from textual_plotext import PlotextPlot"}],"quickstart":{"code":"import asyncio\nfrom textual.app import App, ComposeResult\nfrom textual_plotext import PlotextPlot\n\nclass PlotApp(App):\n    def compose(self) -> ComposeResult:\n        yield PlotextPlot(id=\"plot\")\n\n    def on_mount(self) -> None:\n        plot = self.query_one(\"#plot\", PlotextPlot)\n        plt = plot.plt\n        plt.title(\"Quickstart Plot\")\n        plt.scatter([1, 2, 3], [4, 5, 6])\n        plt.plot([1, 2, 3], [4, 5, 6])\n        plot.refresh()\n\nif __name__ == \"__main__\":\n    app = PlotApp()\n    asyncio.run(app.run_async())","lang":"python","description":"Create a simple Textual app with a scatter plot."},"warnings":[{"fix":"Use the widget's clear() method instead of plotext.clf()","message":"Calling plt.clf() resets the plot size to a default, causing layout flicker. Use plot.clear() instead to reset data while preserving size.","severity":"gotcha","affected_versions":"<=1.0.1"},{"fix":"Adjust the plot via plt.subplots(height, width) or use proportional sizing in the Plotext plot object.","message":"PlotextPlot uses a fixed canvas size; setting widget height/width in CSS may not affect the plot's internal resolution, causing clipping.","severity":"gotcha","affected_versions":"<=1.0.1"},{"fix":"Use the builtin plotext themes without prefix, or customize colors.","message":"Themes prefixed 'textual-' are experimental; future versions may rename them.","severity":"deprecated","affected_versions":">=0.2.0 <1.0.0"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Access plt via the widget instance: plot.plt","cause":"PlotextPlot.plt is an instance of plotext.plot.Plot, not the module.","error":"AttributeError: module 'plotext' has no attribute 'plt'"},{"fix":"Use PlotextPlot as a widget: app.compose() yield PlotextPlot()","cause":"Trying to use PlotextPlot as a container or callable directly.","error":"TypeError: 'PlotextPlot' object does not support indexing"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}