{"id":22451,"library":"termplotlib","title":"termplotlib","description":"Library for plotting in the terminal using Unicode characters. Current version 0.3.9, released irregularly. Supports line plots, horizontal and vertical bar charts. Requires Python >=3.7.","status":"active","version":"0.3.9","language":"python","source_language":"en","source_url":"https://github.com/nschloe/termplotlib","tags":["cli","terminal","plotting","unicode"],"install":[{"cmd":"pip install termplotlib","lang":"bash","label":"Install termplotlib"}],"dependencies":[],"imports":[{"note":"Common mistake: the library does not export a 'tpl' alias.","wrong":"from termplotlib import tpl","symbol":"register_brille","correct":"import termplotlib"}],"quickstart":{"code":"import termplotlib as tpl\nimport numpy as np\n\nx = np.linspace(0, 2*np.pi, 20)\ny = np.sin(x)\n\nfig = tpl.figure()\nfig.plot(x, y, label='sine')\nfig.show()","lang":"python","description":"Basic line plot using numpy arrays."},"warnings":[{"fix":"Use print(fig.get_string()) or fig.show() to render to stdout.","message":"The library does not support interactive plots or windowed output. It only prints to terminal.","severity":"gotcha","affected_versions":"all"},{"fix":"Convert to list or numpy array before plotting.","message":"Data must be provided as lists or numpy arrays. Other iterables may not work correctly.","severity":"gotcha","affected_versions":"all"},{"fix":"Check that your input arrays have the same size.","message":"Bar charts require exactly two arrays of equal length for horizontal bars.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-04-27T00:00:00.000Z","next_check":"2026-07-26T00:00:00.000Z","problems":[{"fix":"Use 'import termplotlib as tpl' then 'tpl.figure()'.","cause":"Importing alias 'tpl' as a submodule instead of using import termplotlib as tpl.","error":"AttributeError: module 'termplotlib' has no attribute 'tpl'"},{"fix":"Ensure x and y (or left and right for barh) have the same length.","cause":"Input arrays for line or bar plots have different lengths.","error":"ValueError: x and y must have same first dimension"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}