Matplotlib 001


import matplotlib.pyplot as plt
import numpy as np
import csv
column1=[]
column2=[]
with open('book1.csv','r',encoding='utf-8') as data_input:
reader= csv.reader(data_input)
for row in reader:
try:
data1=float(row[0])
data2=float(row[1])
column1.append(data1)
column2.append(data2)
except ValueError:
continue
'''
x=np.linspace(0,10,100)
y=np.sin(x)
y1=np.random.randn(100)
plt.scatter(x,y1,label="scatter figure")
'''
plt.plot(column1,column2,ls='-',lw=2,label="plot figure")
plt.legend()
#plt.xlim(0,10)
#plt.ylim(0,1)
plt.xlabel("x axis")
plt.ylabel("y axis")
#plt.axhline(y=0.5,ls='--')
plt.show()

CAD 标注插入特殊字符

度数:%%d;正负:%%p;直径:%%c;角度:\U+2220;标识:\U+2261;不相等:\U+2260;欧姆:\U+2126;欧米伽:\U+03A9;下标n:\U+208n(n为数字);上标2/3:\U+00B2/3;微米:\U+00B4;希腊字母:增加一种使用symbol字体的字体样式;