matplotlib-label-lines
matplotlib-label-lines copied to clipboard
Would there be a simple way to change it to be able to use the y axis for each line?
Not much of an issue, more of a request, but would there be an easy way to line up the text on the lines, but keeping the text at the same y value for each line? I'm doing some sigmoid curve plotting and this would be really nice.
There isn't anything special about picking equally spaced values in the x direction vs the y direction, so it's just a matter of someone actually implementing it :)
23 Feb 2023 16:00:59 ryandikdan @.***>:
Not much of an issue, more of a request, but would there be an easy way to line up the text on the lines, but keeping the text at the same y value for each line? I'm doing some sigmoid curve plotting and this would be really nice.
— Reply to this email directly, view it on GitHub[https://github.com/cphyc/matplotlib-label-lines/issues/121], or unsubscribe[https://github.com/notifications/unsubscribe-auth/ABJJII3TD5RI2IRLIXPYGP3WY723VANCNFSM6AAAAAAVGINFUM]. You are receiving this because you are subscribed to this thread.[Tracking image][https://github.com/notifications/beacon/ABJJII6YWI2Z6MEK6C5DT3LWY723VA5CNFSM6AAAAAAVGINFUOWGG33NNVSW45C7OR4XAZNFJFZXG5LFVJRW63LNMVXHIX3JMTHF6OWEBM.gif]
Any quick recommendations on how to do it?
The current code is specialized to the case where alignment happens along the x axis. That could be parameterized to either operate on x/y. The entry point is around https://github.com/cphyc/matplotlib-label-lines/blob/5881e62f0010ec209d980dc0ff1563cd5c122f92/labellines/line_label.py#L27.