I want to plot different things in two different figures in only 1 loop (I have a huge matrice that I don't want to put 2 for loops) like the following:
plt.figure(0)
plt.figure(1)
for i in range(10):
#plot it only on the figure(0)
plt.plot(np.arange(10), np.power(np.arange(10), i), label = 'square')
#plot it only on the figure(1)
plt.plot(np.arange(10), np.power(np.arange(10), 1/i), label = '1/square')
plt.legend() #if it does for both figures seperately
plt.show()
How can I achieve this? Thanks a lot.