要将一个数组[1,2,3,4,5]绘制成折线图,代码是?( )
import matplotlib.pyplot as plt
plt.plot([1,2,3,4,5])
plt.show()
import numpy as np
import matplotlib.pyplot as plt
plt.plot(np.array(1,5))
plt.show()
import matplotlib.pyplot as plt
plt.bar([1,2,3,4,5])
plt.show()
import matplotlib.pyplot as plt
plt.scatter([1,2,3,4,5])
plt.show()