发布网友 发布时间:2022-04-23 18:19
共1个回答
热心网友 时间:2022-04-18 07:32
import matplotlib.pyplot as plt
from matplotlib.font_manager import FontProperties
import random
import numpy as np
xlist=[]
ylist=[]
a = [[np.random.randint(1, 100) for j in range(1, 3)] for i in range(1, 101)]
print(a)
for x,y in a:
xlist.append(x)
ylist.append(y)
plt.scatter(xlist,ylist)
font = FontProperties(fname=r"c:\windows\fonts\simsun.ttc", size=15)
plt.xlabel('10^n',fontproperties = font)
plt.ylabel('y轴',fontproperties = font)
plt.show()