plotly.py icon indicating copy to clipboard operation
plotly.py copied to clipboard

[bug] add_hline and add_vline show random diagonal line when passed np.nan

Open al-vincent opened this issue 1 year ago • 3 comments

Behaviour: when add_hline() or add_vline() are called with np.nan, a diagonal line is rendered (perhaps because np.nan is a float?) Expected: possibly raise an exception? Minimal example: image

al-vincent avatar Nov 17 '23 11:11 al-vincent

consider passing valid numerical values as positions for the lines instead of np.nan

sonali489 avatar Nov 17 '23 18:11 sonali489

Thank you, I'm comfortable with how the lines work - I was raising a bug, not asking for advice. I raised this because drawing a diagonal line didn't seem to be the intended behaviour; if you don't want to fix it, then don't.

al-vincent avatar Nov 18 '23 10:11 al-vincent

Thanks for reporting this, @al-vincent . @sonali489 thank you for trying to help @al-vincent.

Coding-with-Adam avatar Nov 21 '23 18:11 Coding-with-Adam