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!

Error in cheat sheet

the ‘3D surface plots’ example in cheat sheet seems oddly bracketed:
When I run it, says ‘Unexpected token )’

trace = {
colorscale = ‘Viridis’,
z = [[3,5,7,9),
[[21,13,8,5]] };

Plotly.newPlot('myDiv', [trace]);

correct configuration would be

trace = {
type : ‘surface’,
colorscale : ‘Viridis’,
z : [[3,5,7,9],[21,13,8,5]]

Here z axis would be a two dimensional array. Also replace the ‘=’ sign with ‘:’ inside the trace variable.