{"repo":"thiebes/curved-text","free":true,"listed":false,"github":"https://github.com/thiebes/curved-text","clone":"git clone https://github.com/thiebes/curved-text.git","description":"Draw text along an arbitrary curve in matplotlib, with arc-length positioning and a perpendicular offset.","language":"Python","stars":76,"topics":["annotation","data-visualization","labels","matplotlib","plotting","text","visualization"],"license":"MIT","category":"analytics","readme_excerpt":"curved-text Draw text that follows an arbitrary curve in matplotlib. Label a curve along its own path instead of in a legend, so the reader's eye never leaves the data to read a colour key. The figure below shows the difference: a legend on the left, and the same lines labelled along their paths on the right. The label is recomputed every time the figure is drawn, so it keeps following the curve through layout changes, resizing, and interactive panning or zooming. When it fits - The curve (x, y) must be ordered along its length, so each point comes after the one before it, and it must have at least two points. - The curve should be smooth relative to the text size. Label a smoothed or fitted trend line, not raw noisy samples. Each letter follows the direction of the curve under it, so where the curve turns back on itself within the width of a single letter, as noisy data does, the letters overlap. Install To work from a clone, install it in editable mode: Usage Placement Three independent parameters control where the label sits: - pos sets where the label is anchored along the curve, as a fraction of the curve's length. 0.0 is the first point, 1.0 is the last. - anchor sets which part of the label lands at pos : \"start\" , \"center\" , or \"end\" . - offset shifts the label off the curve, measured in typographic points. The shift is perpendicular to the curve. A positive value sits above a left-to-right curve. The figure below sweeps pos from the first point to the last. The green","default_branch":null,"files":null,"tree":[],"storefront":"/r/thiebes","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/thiebes/curved-text/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}