I need to draw graphs in python matplotlib.
For each graph I do some calculates before and then draw the graphe. Here is some of the code:
import matplotlib.pyplot as plt
def draw(LuxCoordinates, finalPix, verName):
plt.axes([0.2, 0.2, 0.7, 0.6]);
plt.xlim(0,3500); #Axis x
plt.ylim(0,100); #Axis y
plt.plot(LuxCoordinates, finalPix, 'g');
plt.scatter(LuxCoordinates, finalPix, linewidths=1)
plt.grid(axis)
plt.xlabel('X_Coordinates', color='r');
plt.ylabel('Y_Coordinates', color='r');
plt.title(verName, color='#afeeee');
savefig(verName+'.png');
plt.show();
My problem is that I call to this function twice or more, according to the number of graphs I have, I get the graphs in separate plots, but I want to draw all graphs on the same plot, in order to compare them. How can I do it? Thank you all!