Hello! I’m really enjoying the new Plotly Python library, it’s great.
I don’t know if this is a daft question but I wonder if there is a function to delete all traces from my chart, to revert it to an empty FigureWidget?
I’m setting up a scatterplot with several different datasets that I would like to compare. I start with an empty FigureWidget and add scatter traces using ‘fig.add_scatter’ using a dropdown list to choose which of my datasets I’d like to load to compare.
What I’d really like to be able to do is add a button which removes all my added traces and returns it to an empty plot so that a user can reset the chart and start over choosing traces to compare, but I can’t work out how to do this.
I’ve tried just making a button that runs go.FigureWidget() again but this doesn’t do anything, my chart looks the same!