Giter Site home page Giter Site logo

Latex axes label issue about plotly.py HOT 23 CLOSED

plotly avatar plotly commented on May 4, 2024
Latex axes label issue

from plotly.py.

Comments (23)

rethore avatar rethore commented on May 4, 2024 12

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.

from plotly.py.

jonmmease avatar jonmmease commented on May 4, 2024 9

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.

from plotly.py.

nvenayak avatar nvenayak commented on May 4, 2024 8

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

from plotly.py.

jdieg0 avatar jdieg0 commented on May 4, 2024 6

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.

from plotly.py.

jonmmease avatar jonmmease commented on May 4, 2024 4

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

from plotly.py.

benvarkey avatar benvarkey commented on May 4, 2024 3

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

from plotly.py.

flo-compbio avatar flo-compbio commented on May 4, 2024 3

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

from plotly.py.

ktran9891 avatar ktran9891 commented on May 4, 2024 3

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

from plotly.py.

guenp avatar guenp commented on May 4, 2024 1

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

from plotly.py.

chriddyp avatar chriddyp commented on May 4, 2024 1

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

from plotly.py.

chriddyp avatar chriddyp commented on May 4, 2024

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

from plotly.py.

benvarkey avatar benvarkey commented on May 4, 2024

Any ETA on this? Thanks.

from plotly.py.

chriddyp avatar chriddyp commented on May 4, 2024

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

from plotly.py.

benvarkey avatar benvarkey commented on May 4, 2024

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.

from plotly.py.

stephf0716 avatar stephf0716 commented on May 4, 2024

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

from plotly.py.

Kully avatar Kully commented on May 4, 2024

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

from plotly.py.

MaryAnnBlaetke avatar MaryAnnBlaetke commented on May 4, 2024

I would also love using Latex in plotly offline mode!

from plotly.py.

iliyang avatar iliyang commented on May 4, 2024

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

from plotly.py.

KseniiaPalin avatar KseniiaPalin commented on May 4, 2024

Same here :)
+1 for fix request

from plotly.py.

June-Skeeter avatar June-Skeeter commented on May 4, 2024

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

from plotly.py.

CodeLionX avatar CodeLionX commented on May 4, 2024

@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

from plotly.py.

June-Skeeter avatar June-Skeeter commented on May 4, 2024

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.

from plotly.py.

CodeLionX avatar CodeLionX commented on May 4, 2024

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

from plotly.py.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.