plt.plot
читает графики по столбцам. вот полный пример:
import numpy as np
import matplotlib.pyplot as plt
xa = np.array([1, 2, 3]) # shape (3,)
xb = np.array([[1],
[2],
[3]]) # shape (3,1)
xc = np.array([[1, 4],
[2, 5],
[3, 6]]) # shape (3,2)
ya = np.array([[1, 4],
[2, 5],
[3, 6]]) # shape (3,2)
yb = np.array([1, 2, 3]) # shape (3,)
plt.figure()
plt.plot(xa, ya) # res- 2 lines: ((1,1), (2,2), (3,3)) & ((1,4), (2,5), (3,6))
plt.figure()
plt.plot(xb, ya) # res- 2 lines: ((1,1), (2,2), (3,3)) & ((1,4), (2,5), (3,6))
plt.figure()
plt.plot(xc, ya) # res- 2 lines: ((1,1), (2,2), (3,3)) & ((4,4), (5,5), (6,6))
plt.figure()
plt.plot(xc.T, ya.T) # res- 3 lines: ((1,1), (4,4)) & ((2,2),(5,5)) & ((3,3), (6,6))
plt.figure()
plt.plot(xa, yb) # res- 1 line: ((1,1), (2,2), (3,3))
plt.figure()
plt.plot(xb, yb) # res- 1 line: ((1,1), (2,2), (3,3))
plt.figure()
plt.plot(xc, yb) # res- 2 lines: ((1,1), (2,2), (3,3)) & ((4,1), (5,2), (6,3))
plt.show()