{"library":"matplotlib-label-lines","title":"matplotlib-label-lines","description":"Label lines in matplotlib by adding text annotations near specified line segments. Version 0.8.1, supports Python >=3.9. Release cadence is low, no major updates in recent years.","language":"python","status":"active","last_verified":"Fri May 01","install":{"commands":["pip install matplotlib-label-lines"],"cli":null},"imports":["from labellines import labelLines","from labellines import labelLine"],"auth":{"required":false,"env_vars":[]},"quickstart":{"code":"import matplotlib.pyplot as plt\nimport numpy as np\nfrom labellines import labelLines\n\nx = np.linspace(0, 1, 100)\nfig, ax = plt.subplots()\nfor i in range(1, 4):\n    ax.plot(x, x**i, label=f'$x^{i}$')\nlabelLines(ax.get_lines())\nplt.show()","lang":"python","description":"Basic example: plot three lines and label them with automatic positioning.","tag":null,"tag_description":null,"last_tested":null,"results":[]},"compatibility":null}