标签:with row with open san read pyplot 取数 reader param
import matplotlib.pyplot as plt
import numpy as np
import csv
plt.rcParams[‘font.sans-serif‘]=[‘SimHei‘]#显示中文
plt.rcParams[‘axes.unicode_minus‘]=False#显示正负号
x=[]
y=[]
with open(‘data.csv‘) as csvfile:
plots=csv.reader(csvfile,delimiter=‘,‘)
for row in plots:
x.append(row[0])
y.append(row[1])
plt.scatter(x,y)
plt.show()
标签:with row with open san read pyplot 取数 reader param
原文地址:https://www.cnblogs.com/shunguo/p/11399365.html