Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latex plot titles are not rendered in VS Code #3661

Open
MalteMederacke opened this issue Apr 1, 2022 · 8 comments
Open

Latex plot titles are not rendered in VS Code #3661

MalteMederacke opened this issue Apr 1, 2022 · 8 comments
Assignees
Labels
bug something broken P3 backlog

Comments

@MalteMederacke
Copy link

Hi,

I try to rename my plot axis using latex titles, they are not rendered in my VS Code jupyter notebook, nor in an exported html using include_mathjax = 'cdn'.

fig = go.Figure(
    data=go.Scatter3d(x = [1,2,3],y=[2,3,1],z=[1,3,3]))
fig.update_layout(scene = dict(xaxis_title = r"$\lambda$"))
fig.show()

gives me:

image

The same expression in a markdown cell works:

$\lambda$

image

Using maplotlib works, as well.

I tried a workaround posted in #1740 using:

from IPython.display import display,HTML
display(HTML("""
<script type="text/javascript" async
  src="https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.7/MathJax.js?config=config=TeX-AMS-MML_SVG">
</script>
"""))

without success.

Any help is appreciated!

@IliasAarab
Copy link

I'm having the same issue, with the latest versions of Plotly and vscode stable

@Miladiouss
Copy link

I want to confirm that this doesn't work for 2-D plots either. However, when writing the figure as a PNG, it renders correctly.

@theo-brown
Copy link

People have had the same issue due to running on different browsers, so it sounds like it's a rendering issue to do with how VS Code displays notebooks.

Given that VS Code is probably the most popular IDE, it would be nice if plotly did something to support it.

Note that this is also an issue in Google Chrome and Firefox, which are also quite popular browsers.

@mysteriousHerb
Copy link

Can confirm the problem persist, but it could be vscode related not plotly..

@JhianSV
Copy link

JhianSV commented Jul 28, 2022

I confirm the problem persist, I agree with @herbzhao

@borondics
Copy link

I have the same problem.

Visual Studio Code
Version: 1.69.2 (Universal)
Commit: 3b889b090b5ad5793f524b5d1d39fda662b96a2a
Date: 2022-07-18T16:12:57.074Z (3 wks ago)
Electron: 18.3.5
Chromium: 100.0.4896.160
Node.js: 16.13.2
V8: 10.0.139.17-electron.0
OS: Darwin x64 21.5.0

Plotly version: 4.14.3

@ez2rok
Copy link

ez2rok commented Oct 26, 2022

I'm having the same issue as well. My specs are:

Version: 1.72.2 (Universal)
Commit: d045a5eda657f4d7b676dedbfa7aab8207f8a075
Date: 2022-10-12T22:16:30.254Z
Electron: 19.0.17
Chromium: 102.0.5005.167
Node.js: 16.14.2
V8: 10.2.154.15-electron.0
OS: Darwin arm64 21.4.0
Sandboxed: No

Plotly version: 5.10.0

@Philipwur
Copy link

Philipwur commented Dec 21, 2022

Also having this problem on VSCode, LATEX does render fine on Jupyter notebook (firefox) with the same interpreter though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug something broken P3 backlog
Projects
None yet
Development

No branches or pull requests