Tech Stack

Python Plotly.py Open source Debugging Data visualization

Overview

This contribution focused on a real bug inside Plotly.py’s autoshape helpers: labeled vertical lines on datetime axes could crash because the library tried to compute annotation placement with arithmetic that did not generalize beyond numeric coordinates.

The deeper architectural issue was that Plotly.py was manually building annotations for shapes even though Plotly.js already supports labels natively through shape.label. Moving toward that path makes the behavior more robust, more consistent across axis types, and less dependent on fragile placement logic.

Focus

What I Changed

Why it matters

This work was valuable not just because of one bug fix, but because it touched the boundary between Plotly.py and Plotly.js. It was a good example of how wrapper libraries can drift into duplicated abstractions, and how aligning them back to the underlying platform can remove subtle user-facing failures.

Plotly.py repository · Related article