Open yankev opened 8 years ago
A known limitation of using WebGL for 3D plots.
Won't be fixed any time soon.
This is still not fixed? It has been 2 years. Kindly plan to support.
Has there been any updates on this feature?
It's really unfortunate that 3d plot does not support latex renderig. For the mean time, is it possible to use unicode/html entity in place of latex like instead of giving $\rho$
, can't we just give ρ
or ρ
Well it works if directly putting rho
from copy pasting it somewhere like ρ
I would like to have this feature and I can contribute so it is done. Is it very hard to do? What are the problems encountered? If anyone has looked at this, can you give me an overview or point me to the place to look at so I can check if I am able to help?
@Catarina-Alves thanks very much! For rendering text using webgl @mikolalysenko's vectorize-text is called .
I think if one converts Latex to pixel data, then it could be used here https://github.com/mikolalysenko/vectorize-text/blob/18c472de123e7ea7ea25ec80b7ac15b2ea0540c4/lib/vtext.js#L310. But I may be wrong.
cc: @antoinerg @alexcjohnson
Thank you @archmoj. I will have a look at your resources and the code and see if it is within my knowledge to make the necessary changes.
@Catarina-Alves, any chances you would have come up with a solution?
I have looked through this but I do not have the right skills to solve this issue. I am sorry.
This issue has been tagged with NEEDS SPON$OR
A community PR for this feature would certainly be welcome, but our experience is deeper features like this are difficult to complete without the Plotly maintainers leading the effort.
What Sponsorship includes:
Please include the link to this issue when contacting us to discuss.
For those still interested in this issue, the crux is that 3D plots currently draw everything in WebGL, including the text. Up in https://github.com/plotly/plotly.js/issues/608#issuecomment-600920777, @archmoj proposed one way to solve this, by rasterizing the LaTeX. Another way (which is more akin to what we did with 2D WebGL plots) would be to refactor this to draw the text (ideally both titles and tick labels) in SVG instead of in WebGL. That would make it easy to support LaTeX the same way we do the rest of SVG text, and would make all of these labels higher-quality overall, particularly in vector output like PDF. Unfortunately it's a fairly major refactor, and I'm not quite sure what would be needed to pull the coordinates for all of these text items out of the stack.gl modules that handle 3D subplots and return them to our SVG drawing code.
It only appears to render in the legend. Demo: https://jsfiddle.net/60eqc0xz/7/