mpl_to_plotly: map enumerated tick labels to Plotly tickvals/ticktext by willtryagain · Pull Request #5349 · plotly/plotly.py
Hi,
This fixes #5059 preserving axis labels while converting matplotlib plots.
Code PR
- I have read through the contributing notes and understand the structure of the package. In particular, if my PR modifies code of plotly.graph_objects, my modifications concern the code generator and not the generated files.
- I have added tests or modified existing tests.
- For a new feature, I have added documentation examples (please see the doc checklist as well).
- I have added a CHANGELOG entry if changing anything substantial.
- For a new feature or a change in behavior, I have updated the relevant docstrings in the code
.
willtryagain
changed the title
matplotlib tick labels add
matplotllib: map enumerated tick labels to Plotly tickvals/ticktext
willtryagain
changed the title
matplotllib: map enumerated tick labels to Plotly tickvals/ticktext
mpl_to_plotly: map enumerated tick labels to Plotly tickvals/ticktext
thanks @willtryagain - I'll try to find someone to review this in the next work cycle.
Hi @emilykl ,
This change maps enumerated tick labels to Plotly tickvals/ticktext in mpltools.prep_ticks. I realize it could be viewed as risky if applied too broadly (e.g., forcing array-mode on numeric axes). I only tested locally on a simple script.
Would using a more tighter check and adding tests make it easier to review? Let me know if you have any suggestions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters