plotly / plotly/plotly.py

Rendering LaTeX in Figure Not Working

Open
#5,283 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug P2 regression
Dominant language
Python
Stars
18.8k
Forks
2.8k
Avg merge
16h 26m
Merged PRs (30d)
21

Description

Hello,

I've encountered a bug when trying to add LaTeX in a plot through annotation or title. Check out the screenshot below:

Image

As you can see, I'm using JupyerLab so maybe it's a Jupyter specific problem (I still need to check this out). The problem appears in the current version, 6.2.0, as well as the current commit in the main branch, 4cd70adb576433db0f64a7c8883f199f4b6dc62a. The problem is not present in v6.0.1b0. I did a bit of git bisect to narrow down what commit caused the bug but couldn't arrive at one commit because some commits don't result in a successful build. More details from my investigation:

Last working commit: c8b38f41c504e142139f1146caa9ec934e9b5164
First documented broken commit: b4cd36cb476153db726ad8322005334cc8e3e5b1

Skipped commits from bisecting:

# possible first bad commit: [f51b3dc422e5e18f0bb248af941cc99518315c70] Add build file
# possible first bad commit: [525425823cd4cf382f8761165217d4420cd1ee71] Add build step to check for js build changes in CI
# possible first bad commit: [cbfddad7e7780f119d8ebfa83420e048a242df8e] Add CI to check for changes to js build files
# possible first bad commit: [b8cc069559ab1ae8217ae57a946fde56ca188472] Update build files included in output
# possible first bad commit: [4bcbd304c21bf482225a69ac767e313b40cc4457] Black
# possible first bad commit: [1db6c819efcc0759c9a563ca966806987b84d326] Add js build to CI
# possible first bad commit: [1260612f00cb69490939750f2dc6317960a8be19] Update node root path in commands.py
# possible first bad commit: [0859aef980c9cbdce805a47440942ab465ea7f95] Merge branch 'main' of github.com:plotly/plotly.py into notebook-connected-default
# possible first bad commit: [3a6f3ee217721b84d7b12354934756bc0e6bb767] Revert changes to requirements
# possible first bad commit: [62721e90236b66c3d2b4b32b4dbccaf572b98a33] Add js build to dev build
# possible first bad commit: [e3afcf7f89a534cf460e3a94aced0ce4f6372e68] Add version into package
# possible first bad commit: [c67cadac0ed78ee00e1d91c0815e7bf1360baeab] Add metadata about jupyterlab extension
# possible first bad commit: [b827f02795f2a874b434b8989afb4ae321b38425] Update path of js output
# possible first bad commit: [ca54548709c3ffd39c94f00581e0f693809add1b] Update js access to use new filepaths
# possible first bad commit: [18f70acc5e2d9c62a2138ffebbab4d8941a52991] AUpdate file structure and make package include jupyterlab files
# possible first bad commit: [4a2f699ac00f3a846eb9aa92a41f0ffd2fd4101e] Make default renderer in jupyterlab/notebook plotly_mimetype

Let me know if you have any questions or any way I can help with this issue.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce LaTeX rendering in a plot annotation or title in JupyterLab using the current version, then compare it with v6.0.1b0. Inspect the changes between the last working commit c8b38f41c504e142139f1146caa9ec934e9b5164 and first documented broken commit b4cd36cb476153db726ad8322005334cc8e3e5b1. Done means LaTeX renders correctly in the affected figure contexts.

Written by the indexing model from the issue text.

Assessment

Tech stack
jupyter-notebook, latex, python
Domain
data-visualization, frontend
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.