question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Idea: Allow plotly.js to accept numpy buffers

See original GitHub issue

If we allowed all GL plot types to accept numpy buffers for plot x/y/z data, then the Python library could optionally avoid JSON serialization of array data, like @maartenbreddels does in his brillant project ipyvolume:

https://github.com/maartenbreddels/ipyvolume/blob/master/ipyvolume/serialize.py#L95

Here is the deserialization on the JS side:

https://github.com/maartenbreddels/ipyvolume/blob/master/js/src/serialize.js#L16

Plotly.js has all of these incredible WebGL figures for scientific computing, but their potential in Python, R, MATLAB, etc is limited by the JSON serialization step.

In a similar vein, it seems like all GL types should be able to accept Float32Array’s directly instead of untyped JS arrays. Currently, it looks like only the Plotly trace type pointcloud accepts Float32Array’s:

https://codepen.io/plotly/pen/GEoPgv

Issue Analytics

  • State:open
  • Created 6 years ago
  • Reactions:2
  • Comments:13 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
antoinergcommented, Dec 17, 2018

Somewhat related to this thread and the topic of data serialization: I came across Apache Arrow which is a cross-language in-memory representation for columnar data to go from the current inefficient copy & convert: to a much-more efficient:

1reaction
jackparmercommented, Sep 10, 2020

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.

Sponsorship range: $10k-$15k

What Sponsorship includes:

  • Completion of this feature to the Sponsor’s satisfaction, in a manner coherent with the rest of the Plotly.js library and API
  • Tests for this feature
  • Long-term support (continued support of this feature in the latest version of Plotly.js)
  • Documentation at plotly.com/javascript
  • Possibility of integrating this feature with Plotly Graphing Libraries (Python, R, F#, Julia, MATLAB, etc)
  • Possibility of integrating this feature with Dash
  • Feature announcement on community.plotly.com with shout out to Sponsor (or can remain anonymous)
  • Gratification of advancing the world’s most downloaded, interactive scientific graphing libraries (>50M downloads across supported languages)

Please include the link to this issue when contacting us to discuss.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Configuration options in JavaScript - Plotly
The plotly.js config argument sets properties like the mode bar buttons and the interactivity in the chart. It's the last argument in Plotly.newPlot...
Read more >
2 Overview | Interactive web-based data visualization with R ...
2 Overview. This part of the book teaches you how to leverage the plotly R package to create a variety of interactive graphics....
Read more >
Develop Data Visualization Interfaces in Python With Dash
In this tutorial, you'll learn how to build a dashboard using Python and Dash. ... Plotly.js generates the charts used in your application....
Read more >
Plotly multiple 3d plots - Silva HOME Nigra
Search: Plotly Multiple Plots. Again, as usual, let's reproduce this in ggplot2 sd-plotly requires pandas-js DataFrame or Series objects for plotting in ...
Read more >
How to create NumPy arrays from scratch? | by Tanu N Prabhu
NumPy stands for Numerical Python. NumPy provides an efficient way to store and operate on dense data buffers. With the help of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found