You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks a lot for taking the time to report this, and for providing the reproducible example. It looks like you caught a regression in plotly.js 1.42. I've opened a corresponding issue over there plotly/plotly.js#3210. In the meantime, you can work around the issue by converting your histogram x value to a list. e.g.
The reason this only shows up in FigureWidget is because all of the other plotting approaches automatically convert numpy arrays to lists internally. For efficiency FigureWidget preserves numpy arrays as binary buffers and converts them to JavaScript TypedArrays in the browser. And this regression is in the handling of TypedArrays by plotly.js.
Hi @sursu, yes the fix will preserve FigureWidget's efficiency 🙂
As for the situation with your title, at this point LaTeX can't be mixed with non-latex. So the $signs need to be the first and last characters of your string. In this case you could set your title string to something like '$\\text{Distribution of }S_{10}$' to get what you want. Or, if all you need is italic text and subscripts you could do this in HTML as 'Distribution of <i>S</i><sub>10</sub>'
Activity
jonmmease commentedon Nov 3, 2018
Hi @sursu ,
Thanks a lot for taking the time to report this, and for providing the reproducible example. It looks like you caught a regression in plotly.js 1.42. I've opened a corresponding issue over there plotly/plotly.js#3210. In the meantime, you can work around the issue by converting your histogram
xvalue to a list. e.g.The reason this only shows up in
FigureWidgetis because all of the other plotting approaches automatically convert numpy arrays to lists internally. For efficiencyFigureWidgetpreserves numpy arrays as binary buffers and converts them to JavaScript TypedArrays in the browser. And this regression is in the handling of TypedArrays by plotly.js.sursu commentedon Nov 3, 2018
I hope the fix will preserve the efficiency of
FigureWidget.What do I do wrong in the second plot that only the LaTeX expression is displayed as title?
jonmmease commentedon Nov 3, 2018
Hi @sursu, yes the fix will preserve
FigureWidget's efficiency 🙂As for the situation with your title, at this point LaTeX can't be mixed with non-latex. So the
$signs need to be the first and last characters of your string. In this case you could set your title string to something like'$\\text{Distribution of }S_{10}$'to get what you want. Or, if all you need is italic text and subscripts you could do this in HTML as'Distribution of <i>S</i><sub>10</sub>'jonmmease commentedon Nov 5, 2018
Tracking upstream fix in plotly/plotly.js#3211
jonmmease commentedon Nov 7, 2018
Closed by #1268. @sursu, could you give the 3.4.1 release candidate a try and confirm that it fixes the issue for you? Installation instructions for the release candidate at https://github.com/plotly/plotly.py/tree/release_3.4.1
Thanks again for taking the time to to report this!
sursu commentedon Nov 7, 2018
@jonmmease Yes. Issue fixed.
Thank you! 👍
jonmmease commentedon Nov 7, 2018
Great! Thanks for giving the release candidate a try