84669 Lernen von Personen
152542 Lernen von Personen
20005 Lernen von Personen
5487 Lernen von Personen
7821 Lernen von Personen
359900 Lernen von Personen
3350 Lernen von Personen
180660 Lernen von Personen
48569 Lernen von Personen
18603 Lernen von Personen
40936 Lernen von Personen
1549 Lernen von Personen
1183 Lernen von Personen
32909 Lernen von Personen
如题。 Matlab中,执行一次plot后,用语句hold on 然后再plot,两次画图即在一张图上。
在Python中,matplotlib.pyplot或者更多程序包,怎样实现? 多次plot,在同一张图上?
认证0级讲师
matplotlib 和 Matlab 差不多,而且不需要 hold on 语句。例如
import matplotlib.pyplot as plt x = range(10) y1 = [elem*2 for elem in x] plt.plot(x, y1) y2 = [elem**2 for elem in x] plt.plot(x, y2, 'r--') plt.show()
matplotlib 和 Matlab 差不多,而且不需要 hold on 语句。例如