I am using seaborn for lineplot. I want to store all the plot objects in dict and show (display) the plot later accoding to the dict key.
lookup = df_to_plot['lookup'].unique()
figures = {}
for key in lookup:
figures[key] = plt.figure()
datadf = df_to_plot[df_to_plot['lookup'] == key]
sns.lineplot(data=datadf, x ='year', y='value', hue='tech_low')
Later I want to show the plots like:
key = 'xyz'
plt = figures[key]
plt.show()
Any suggestion how to achieve this?