A specific figure can be closed by keeping its handle
import matplotlib.pyplot as plt
fig1 = plt.figure() # create first figure
plt.plot([0, 1], [0, 1])
fig2 = plt.figure() # create second figure
plt.plot([0, 1], [0, 1])
plt.close(fig1) # close first figure although second one is active
...