I am trying to plot a Histogram from a 3D NumPy array with 16 million points with this Python code:
data = np.random.random((252,252,252)).flatten()
fig = go.Figure()
fig.add_trace(go.Histogram(x=data, nbinsx=100))
fig.write_json(plotly_file)
I realized, that Plotly saves all the data points even for histogram and makes it unusable for websites. Is there a way to save a plot with only bin data and do not keep the raw data points in the JSON file? Thanks!