2016-06-23 3 views
0

Ich möchte 3 Funktionen in einem Bild plotten, aber die dritte kann nicht bekommen, Gibt es irgendetwas mit meinem Code?Kann nicht 3 Plots in einem Bild bekommen

x = np.arange(-10., 10., 0.2) 
simod1=sigmoid(x) 
tanh1=tanh1(x) 
relu1=relu(x) 
pl.figure(num=1, figsize=(8, 6)) 
pl.title('Plot 1', size=14) 
pl.xlabel('x-axis', size=14) 
pl.ylabel('y-axis', size=14) 

pl.plot(x, simod1, color='b', linestyle='--', marker='o', label='sigmoid') 
pl.plot(x, tanh1, color='r', linestyle='-', label='tanh') 
pl.plot(x, relu1, color='y', linestyle='*', label='relu') 
pl.legend(loc='upper left') 
pl.savefig('temp.png', format='png') 

Antwort