Closed riga closed 4 months ago
Thanks @riga Especially for already providing a fix. I'll look into it!
Can confirm the problem even for a single vertical line:
plot(xs=[1,1], ys=[0,1], lines=True, y_max=0.8)
yields
┌────────────────────────────────────────────────────────────┐
││ │
││ │ 0.8
││ │
││ │
││ │
││ │
││ │ 0.5
││ │
││ │
││ │
││ │
││ │ 0.2
││ │
││ ▌ │
││ ▌ │
││ ▌ │
││▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▌▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁▁│ 0.0
└────────────────────────────────────────────────────────────┘
0.0 0.5 1.0 1.5
Obviously, the line should go all the way to the top.
@riga Thanks to your work identifying and solving this, I fixed it in commit 8a14e93. Will publish it as v0.12.3 later
It's 99% identical to your solution
Hi @olavolav,
First of all, awesome tool 👏!
When rendering histograms, I came across cases where bars completely disappear if their height exceeds the y axis limit. Here's an example where two bars are just above the limit.
After a quick dive into to the pixel rendering, I think I found the issue. After the flip of the y index notation, lines that disappear have a negative
y_index_start
ory_index_stop
. This is because the treatment interferes with how cases withy_index_stop > y_index_start
were handled by a negative step size. Since the smaller and bigger indices already existed, the fix was rather trivial :)Here is a minimal reproducer.