ipywidgets with seaborn PairGrid plots: speed up performance issue
Clash Royale CLAN TAG #URR8PPP ipywidgets with seaborn PairGrid plots: speed up performance issue In a Jupyter Notebook I am visualizing the Iris dataset with seaborn in combination with ipywidgets. That works fine, except that is not that fast because the plots have to be rendered every time you select a new combination of the species 'versicolor', 'virginica' and 'setosa'. See first code block. So I tried to speed up the interaction by pre-processing the plots for each combination op species and storing them in a dictionary. See second code block. The dictionary seems to contain all plots, but the don't show. Any suggestions how to fix this? First code block: import pandas as pd import seaborn as sns import matplotlib.pyplot as plt from ipywidgets import * sns.set(style="white") iris = sns.load_dataset("iris") def iris_pg(species): g = sns.PairGrid(iris[iris.species.isin(species)], diag_sharey=False) g.map_lower(sns.kdeplot) ...