Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Plotly REST API for 3d Surface

Is there any example of building a 3d Surface on plotly through their REST API? The documentation for 3d Surface’s is lacking. If anyone could help it would be greatly appreciated.

The REST call you need to make is here:
https://api.plot.ly/v2/plots

It’s easy to deduce the figure object JSON for the POST from:

For a more basic intro to making REST calls to Plotly, see:
https://moderndata.plot.ly/simple-rest-apis-for-charts-and-datasets/

Thanks for the response. Interesting, I have seen the simple rest api examples, but i haven’t seen the javascript/reference site before.

So my problem lies in that i am able to make the grid data in my first POST request, but i run into problems in my second POST request when i try to create a surface plot.

When creating a plot i try to pass in an array of source keys to zsrc (since many columns of z values creates the surface) but it returns an error. However if i do a single source key to zsrc there is no error, but that is not the graph i’m trying to create. Do you have any suggestions?

please let me know if you have found anything else or tried it.