I'm currently trying to plot a 2d histogram in Python using plotly.
I want the chart to feature cumululative, continuous Z values, like so (below is a mockup)
For example, if there is one sale at 12:00, and no sales at 12:01, 12:01 will still show one sale. If there are then 3 sales at 12:02, the colour of the bar will represent 4 total sales at that point.
However currently, the Z values are per-point plotted
Additionally, the data is streamed in realtime.
Initially I tried representing this as a plotly heatmap, and managed to get a semblance of a solution, however the code became far too complicated for my desired implementation and I was certain there had to be a simpler solution. The 2d histogram seeemed more appropriate. Here is my plotting code nowwith the following code
figure = go.Figure(data=go.Histogram2d( x=data['time'], y=data['sales'], histfunc='count', colorscale='Viridis',) )
Any assistance is helpful. Many thanks.