question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Figure does not display LaTeX title

See original GitHub issue

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

Issue Analytics

  • State:open
  • Created 4 years ago
  • Comments:11 (2 by maintainers)

github_iconTop GitHub Comments

1reaction
nicolaskruchtencommented, Mar 31, 2021

I can replicate the JupyterLab problem on my end also. The issue is likely to be within the interaction between the way jupyterlab_plotly extension renders Plotly.js figures within JupyterLab, and these problems tend to be pretty hard to debug but if you want to give it a shot, the source for the extension is here: https://github.com/plotly/plotly.py/tree/master/packages/javascript/jupyterlab-plotly

0reactions
QuantumAudiocommented, Jun 18, 2022

I found a solution that worked for me in the help documentation, changing the default renderer. I had the issue on multiple browsers. (https://plotly.com/python/renderers/)

  1. The jupyterlab-plotly extension must be installed in the current environment. For conda, this is conda install -c conda-forge jupyterlab-plotly-extension.

  2. Check the available renderers and ensure jupyterlab is available. import plotly.io as pio pio.renderers

Renderers configuration

Default renderer: 'jupyterlab'
Available renderers:
    ['plotly_mimetype', 'jupyterlab', 'nteract', 'vscode',
     'notebook', 'notebook_connected', 'kaggle', 'azure', 'colab',
     'cocalc', 'databricks', 'json', 'png', 'jpeg', 'jpg', 'svg',
     'pdf', 'browser', 'firefox', 'chrome', 'chromium', 'iframe',
     'iframe_connected', 'sphinx_gallery', 'sphinx_gallery_png']
  1. Set the default renderer to jupyterlab. pio.renderers.default = ‘jupyterlab’
Read more comments on GitHub >

github_iconTop Results From Across the Web

Image not showing up when using figure environment - TeX
This message appears if you try to use the \marginpar command or an unstarred version of the figure or table environment. Such floats...
Read more >
No \author given - Overleaf, Online LaTeX Editor
This error appears if when you have used the \maketitle command, but have not specified any \author . An example of this is...
Read more >
LaTeX/Title Creation - Wikibooks, open books for an open world
We will detail the process here. There are several situations where you might want to create a title in a custom format, rather...
Read more >
Add title - MATLAB title - MathWorks
Modifying the title appearance is not supported for all types of charts. ... Create a figure and display a title in the current...
Read more >
Manual for Formatting Figures and List of Figures in Thesis or ...
A menu will pop up and look similar to the image below. 5. Make sure the word “Figure” is displayed in the Label...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found