python编程
LoveLifeLoveSoft
这个作者很懒,什么都没留下…
展开
-
python高精度定时器
python 定时器原创 2022-05-13 15:05:38 · 5036 阅读 · 1 评论 -
python读取csv数据并画图
#画二维坐标图#读取csv并作图import matplotlib.pyplot as pltimport pandas as pdimport numpy as npreadData = pd.read_csv("sendState.csv",header=None) #读取csv数据print(readData)data = readData.iloc[:,2].tolist() #获取dataFrame中的第3列,并将此转换为listxData = list(ran.原创 2022-05-02 17:40:05 · 11083 阅读 · 1 评论 -
python高精度定时小技巧
高精度定时器原创 2022-05-02 17:21:12 · 2443 阅读 · 3 评论 -
python 极坐标画图
#画极坐标图import numpy as npimport matplotlib.pyplot as pltimport maththeta = []for i in [0,30,60,60]: theta.append(math.radians(i))r = [10,20,30,20]ax = plt.subplot(111,projection='polar') #极坐标ax.plot(theta, r, 'r-^')plt.show()传参距离与弧度..原创 2022-04-25 16:09:51 · 5598 阅读 · 0 评论 -
python udp收发很简单
python udp发送注意事项:1、udp客户端不需绑定端口号2、udp发送报文时,需考虑大、小字段,格式对齐等3、udp 发送报文格式对齐,使用到struct.pack(format,data),解包时使用struct.unpack(format,data)struct支持的数据类型为:format ctype python 字节数 x pad byte no value 1 c char string of length 1原创 2022-04-23 09:48:10 · 5397 阅读 · 0 评论