Latex plot titles are not rendered in VS Code
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 18.8k
- Forks
- 2.8k
- Ø Merge
- 16 Std. 26 Min.
- Gemergte PRs (30 T.)
- 21
Beschreibung
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:

The same expression in a markdown cell works:
$\lambda$

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!
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduziere das Beispiel in einem VS Code Jupyter-Notebook und im exportierten HTML mit include_mathjax = 'cdn' und vergleiche anschließend das Verhalten der Plot-Titel mit dem funktionierenden Markdown-Zellen-Beispiel. Das Issue ist gelöst, wenn LaTeX-Achsentitel in beiden Umgebungen ohne den erfolglosen MathJax-Workaround gerendert werden.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- jupyter-notebook, latex, python
- Bereich
- data-visualization
- Issue-Typ
- Bug
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100