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 axes label issue #105

Closed
guenp opened this issue Aug 13, 2014 · 23 comments
Closed

Latex axes label issue #105

guenp opened this issue Aug 13, 2014 · 23 comments
Assignees
Milestone

Comments

@guenp
Copy link

guenp commented Aug 13, 2014

ylabel('R$_{xx,ac}$')
worked in matplotlib, didn't work in plotly

@chriddyp
Copy link
Member

thanks for reporting! looks like we'll have to move around our latex $ around a bit

@benvarkey
Copy link

Any ETA on this? Thanks.

@chriddyp
Copy link
Member

@benvarkey - You can combine LaTeX with plain text by using the Text keyword, i.e.: '$\\beta_{1c} = 25 \\pm 11 \\text{ km s}^{-1}$'. See more examples here: https://plot.ly/python/LaTeX/

For now, re-arranging the $ is out of scope for our matplotlib converter.

@benvarkey
Copy link

It doesn't render with plotly.offline.iplot(...) (shows the raw text), but it renders correctly if exported to plot.ly

@benvarkey
Copy link

Actually, I don't get the rendered text even with pure latex code:
screen shot 2015-12-23 at 12 37 42 am

But, when I export to plot.ly, I get this:
screen shot 2015-12-23 at 12 40 12 am

Any ideas? Thanks.

@stephf0716
Copy link

I am experiencing the same issue and can confirm this similarly occurs when using plotly offline with MATLAB.

@rethore
Copy link

rethore commented Feb 11, 2016

I have the same issue in offline Jupyter notebooks. When I export the plot to the online web-ui it renders the latex label correctly.

@nvenayak
Copy link

nvenayak commented Jun 7, 2016

Is there any plan to fix/implement this? LaTeX rendering is a fairly important feature when generating scientific plots.

@Kully
Copy link
Contributor

Kully commented Aug 10, 2016

Hey guys, someone on the Front support is wondering about an estimation for when this feature will be fixed. Any ideas?

@MaryAnnBlaetke
Copy link

I would also love using Latex in plotly offline mode!

@flo-compbio
Copy link

Just wanted to point out to people here that inserting a JavaScript snippet into the notebook fixed the issue for me. Thanks @jjaraalm !!!

@guenp
Copy link
Author

guenp commented Feb 2, 2017

@chriddyp maybe you guys could implement this patch? ❤️

@chriddyp
Copy link
Member

chriddyp commented Feb 2, 2017

Opening a PR here to try out some different solutions: #683

@iliyang
Copy link

iliyang commented Jun 16, 2017

Same problem here - LaTeX math labels don't render properly in offline mode (in a Jupyter notebook). Hope a fix is coming soon, thanks!

@ktran9891
Copy link

Adding my voice, as well: I would love for this to be fixed.

@KseniiaPalin
Copy link

Same here :)
+1 for fix request

@June-Skeeter
Copy link

June-Skeeter commented Dec 13, 2017

I'm having the same issue as well, its pretty frustrating, and its making me not want to use plotly any more.

@SebastianSchmidl
Copy link

@Wes-Skeeter have you tried using the fix mentioned by flo-compbio, see here

this fixed the problem for me, but it's just a workaround and I would also love to have a fix in plotly

@June-Skeeter
Copy link

Thanks, but unfortunately, this didn't fix it for me :/ I just want to put an overbar on some text labels, not sue why it has to be so complicated. HTML works for things like subscripts, Its frustrating I can't use it for this.

@SebastianSchmidl
Copy link

I'm using plotly in offline mode and HTML is working just fine for me, MWE:

import plotly.offline as offline
from plotly.graph_objs import *

offline.init_notebook_mode(connected=True)
layout = Layout(title = '<span style="text-decoration: overline">text</span>')
fig = dict(data = [Scatter()], layout=layout)
offline.iplot(fig)

produces:
newplot

@jdieg0
Copy link

jdieg0 commented Apr 27, 2018

What a pity! LaTeX-Code is still not interpreted in offline plots. So I'll have to go back to Matplotlib until this is fixed.

@jonmmease
Copy link
Contributor

The offline latex/MathJax issues are going to be resolved by plotly/plotly.js#2994 and #1169. Follow along if you're interested!

@jonmmease jonmmease self-assigned this Sep 21, 2018
@jonmmease jonmmease added this to the v3.4.0 milestone Sep 21, 2018
@jonmmease
Copy link
Contributor

Done in #1243 and will be released in version 3.4.0. LaTeX support requires no API changes for iplot or FigureWidget support. An additional include_mathjax argument has been added to plotly.offline.plot to specify how MathJax should be included in the resulting html file/div.

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

No branches or pull requests