I'm trying to edit a figure that was obtained using an external function.
For example, "nolds.lyap_r" function creates a figure. Let's say I want to add a title to it after it was plotted. How can I do it?
import nolds
import numpy as np
import matplotlib.pyplot as plt
nolds.lyap_r(y, debug_plot=True)
I guess I need to use plt.gca() or plt.gcf() but it didn't work for me:
ax=plt.gca()
ax.set_title("ABC")
CodePudding user response:
pyplot.draw()
is there to update the existing figure:
plt.title('A good title')
plt.draw()