Closed olavolav closed 3 years ago
Let's go with the first solution for the moment. The result looks like this:
>>> from uniplot import plot
>>> plot(xs=[0.433,0.6666], ys=[0.8,0.1133], x_min=0, x_max=1, y_min=0, y_max=1, lines=True)
┌────────────────────────────────────────────────────────────┐
││ │ 1.0
││ │
││ │
││ ▝▖ │
││ ▝▚ │ 0.7
││ ▚ │
││ ▚▖ │
││ ▝▖ │
││ ▝▖ │ 0.5
││ ▝▚ │
││ ▚ │
││ ▚▖ │
││ ▝▖ │ 0.3
││ ▝▖ │
││ ▝▚ │
││ ▝ │
││▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁│ 0.0
└────────────────────────────────────────────────────────────┘
0 1
Actually, the fix that is implemented now does the above but will also reject "overshoot". So it's even a mix between the above solutions.
Sometimes there are gaps at the end of lines.
To reproduce
This is not a bug, but an artifact of the line drawing attempting to be accurate. If the end pixel is drawn because of an end pint that is significantly away from the center of the pixel then this is possible.
Possible solutions