plotly / plotly/plotly.py

Figure does not display LaTeX expressions in JupyterLab and Jupyter Notebook

Open
#1,740 12 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

There is an issue with rendering LaTeX titles in JupyterLab:

fig = go.Figure()
fig.add_scatter(y=[1,3,2], mode='lines+markers')
fig.layout.update(title='$\\text{Negative Log of Estimated Survivor Function}$', 
                  xaxis_title='$t$', yaxis_title='$-log(S(t))$',
                  height=600)
fig.show()

Does not actually display the titles:
newplot (1)

And this is strange as earlier today it did work fine.

I have encountered other anomalies in JupyterLab, such as after restarting the session, one image elongates and stays like that.
Does not happen every time though.

Details
Plotly version: 4.0.0

Ubuntu 18.04.2


Here it is:
Peek 2019-08-28 01-24

Sometimes it elongates and stays like that:

cut


UPDATE 1:

I've just updated to 4.1.0 and now the LaTeX titles are displayed. But, the mentioned anomaly is still there.


UPDATE 2:

I have opened the notebook today again and the title disappears.

If it is of any help. here is what is displayed in the terminal:
image

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 the provided figure in JupyterLab and Jupyter Notebook using the Plotly 4.0.0 and 4.1.0 versions described. Start by comparing the rendered LaTeX titles and the image-elongation behavior, then review the terminal output shown in the issue. Done means LaTeX titles render consistently and figures no longer elongate after restarting the session.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.