python - Can a matplotlib figure object be pickled then retrieved? -
i trying pickle matplotlib figure object able regenerate graph x , y data , labels , title @ later time. possible? when trying use open , dump pickle traceback: #3rd party imports , built-in import random import matplotlib.pyplot plt import pickle pk #initializing lists x , y values. voltage trim , current measure our x , y in case. voltage_trim = range(100, 150) current_meas = [] # change of parameters modelled multiplier in case multiplier = range(1,4) # initializing lists store output current if wanted current_storage = [] # required matplotlib plt.close() plt.ion() #required method call in order interactive plotting work # specify graph fig1 = plt.figure() ax = fig1.add_subplot(1,1,1) # creates axis in order have multiple lines plt.title('voltage trim vs current \nsome fancy sub-title here') plt.xlabel('voltage trim / v') plt.ylabel('current measured/ a') plt.grid(true) color_choices = ['k', 'g','r',...