plotly / react-plotly.js

A plotly.js React component from Plotly 📈
MIT License
1.01k stars 135 forks source link

Heatmap not showing #340

Closed AlonsoUriarte14 closed 5 months ago

AlonsoUriarte14 commented 6 months ago

I'm trying to render a heatmap using this data set mel_spectrogram_data.csv

Result is like this in browser image

If i run the same functions in python i am able to get the heatmap like i want image

Here is my code:

 <Plot
                                    data={[
                                        {
                                            z: data,
                                            type: 'heatmap',
                                            colorscale: 'inferno'
                                        }
                                    ]}

                                    layout={{
                                        height: 375,
                                        width: 1100,
                                        title: "Static Spectrogram Plot"
                                    }}
                                >

                                </Plot>

data = csv values in 2d array

AlonsoUriarte14 commented 6 months ago

I notice that the colorbar scale is much different for both plots