Skip to content

Latex axes label issue #105

Closed
Closed

Description

@guenp

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

Activity

  1. chriddyp commented on Aug 13, 2014

    @chriddyp
    Member

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

  2. benvarkey commented on Dec 22, 2015

    @benvarkey

    Any ETA on this? Thanks.

  3. chriddyp commented on Dec 22, 2015

    @chriddyp
    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.

  4. benvarkey commented on Dec 22, 2015

    @benvarkey

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

  5. benvarkey commented on Dec 23, 2015

    @benvarkey

    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.

  6. stephf0716 commented on Jan 11, 2016

    @stephf0716

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

  7. rethore commented on Feb 11, 2016

    @rethore

    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.

  8. nvenayak commented on Jun 7, 2016

    @nvenayak

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

  9. Kully commented on Aug 10, 2016

    @Kully
    Contributor

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

  10. MaryAnnEbeling commented on Jan 31, 2017

    @MaryAnnEbeling

    I would also love using Latex in plotly offline mode!

  11. flo-compbio commented on Feb 2, 2017

    @flo-compbio

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

  12. guenp commented on Feb 2, 2017

    @guenp
    Author

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

  13. chriddyp commented on Feb 2, 2017

    @chriddyp
    Member

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

  14. iliyang commented on Jun 16, 2017

    @iliyang

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

  15. ktran9891 commented on Jun 30, 2017

    @ktran9891

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

  16. KseniiaPalin commented on Sep 18, 2017

    @KseniiaPalin

    Same here :)
    +1 for fix request

  17. June-Skeeter commented on Dec 13, 2017

    @June-Skeeter

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

  18. SebastianSchmidl commented on Dec 13, 2017

    @SebastianSchmidl

    @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

  19. June-Skeeter commented on Dec 13, 2017

    @June-Skeeter

    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.

  20. SebastianSchmidl commented on Dec 14, 2017

    @SebastianSchmidl

    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

  21. jdieg0 commented on Apr 27, 2018

    @jdieg0

    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.

  22. jonmmease commented on Sep 21, 2018

    @jonmmease
    Contributor

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

  23. self-assigned this
    on Sep 21, 2018
  24. added this to the v3.4.0 milestone on Sep 21, 2018
  25. jonmmease commented on Oct 30, 2018

    @jonmmease
    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

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions