Hey, I have daily data of some stock.
I want to create a plot and have a button / drop down menu to choose different bins for the xaxis of my daily values. daily / monthly / yearly etc…
is that possible?
I can create the different data on my own (pandas…).
In the Histogram Binning I do not understand how they specify the y axis…
What is the syntex to take my daily pandas data frame and insert to plots into the same plot…
I see. Yeah the histogram example displays the count on the y-axis. If you want another aggregation that you compute yourself in pandas then you could have the buttons update the trace’s x and y data by using the 'restyle' value of the method parameter. Something like
I think the problem is you wrote a dict inside a list… is that right?
Whoops, I accidentally wrote a set rather than a dict. I fixed that above.
Another question - I have a figure with 20 subplots …
How can I add this button for each figure?
You can control which trace the restyle operation applies to by adding a trace numbers list to the end of the args list. e.g. to restyle the third trace added to the figure: