I am running the following command in a jupyter notebook with sparkmagic in order to create a figure.
df.toPandas().boxplot()
And in order to show the figure I run in a different cell
%matplot plt
The first time I run it, it works well.
If I run it again by changing the dataframe (e.g. by adding some filter), and run %matplot plt
one more time, the figure won't change.
I have notice the output of the "boxplot cell" does not change: I have for example:
<matplotlib.axes._subplots.AxesSubplot object at 0x7fecf77d36a0>
How can this figure be updated? Is there a way to clear/clean the current figure in order to reset it?