同matlab一样,matplot也可画散列图scatter。

 

 1 import numpy as np
 2 import matplotlib.pyplot as plt
 3 #fig = plt.figure()
 4 #ax = fig.add_subplot(111)
 5 a1 = np.array([1, 2, 3, 4])
 6 a2 = np.array([1, 2, 3, 4])
 7 #ax.scatter(np.random.rand(5), np.random.rand(5))
 8 #mark = ['s','o','^','v','>','<','d','p','h','8','+','*']
 9 #ax.scatter(a1, a2, marker='s', color='blue')
10 plt.scatter(a1, a2, marker='s', color='blue', label="TT")
11 #fig.show()
12 plt.legend()
13 plt.show()
View Code

相关文章:

  • 2022-12-23
  • 2021-10-15
  • 2021-07-23
  • 2021-07-29
  • 2021-04-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-05-20
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-12-09
  • 2022-01-07
相关资源
相似解决方案