So I'm trying to create a cell that refreshes plots using a slider. Here is the code,
slider = FloatSlider(0.1)
slider.max = 1
slider.min = 0
plt.plot(figsize=(15,10))
def plot_corr_graph_summary(lod):
plt.clf()
corrMatrix_Crushed = df_summary_virtual_physical_split.iloc[:,int(lod):].corr()
sns.heatmap(corrMatrix_Crushed, annot=False)
plt.show()
def level_of_detail(change):
if slider.value >= 0.2:
plot_corr_graph_summary(6-slider.value*10)
slider.observe(level_of_detail, 'value')
slider
The result looks like,
How do I make the plots overwrite one another, I am trying to use plt.clf() in my function but nothing seems to be happening.
