- 博客(15)
- 资源 (8)
- 收藏
- 关注
原创 CAXA中添加气动液压元件库方法
**CAXA中添加气动液压元件库方法**先将文件夹 液压元件 复制到 桌面1.打开caxa,随便建立工程文件,点击 插入 ,点击 图库管理 ,如下图2.点击 并入图符,选择并入到 我的图库,选择并入的目标文件 液压元件 ,最后点击 并入,导入完成。3.并入完成后,在图库中-我的图库-液压元件,点击即可选择所需图形下载链接:CAXA中添加气动液压元件库方法(含有元件库)...
2022-01-11 20:04:39
4228
原创 python读取数据绘图
**python读取数据绘图**数据示例如下:import pandas as pd # 导入Pandas库import matplotlib.pyplot as pltdata = pd.read_csv('test.csv') # 读取csv数据x = data.loc[:, 'A'] # 读取各列数据y = data.loc[:, 'B']print(data) # 打印输出数据print(x)print(y)plt.plot(x, y)plt.show(
2022-01-09 21:14:47
1629
原创 Matplotlib学习笔记
**Matplotlib学习笔记——主次坐标轴**import matplotlib.pyplot as pltimport numpy as npx = np.arange(1, 10, 0.1)y1 = 0.5 * x ** 2y2 = -1 * y1fig, ax1 = plt.subplots() # 使用subplotsax2 = ax1.twinx() # 镜像ax1,得到ax2的y轴ax1.plot(x, y1, 'g')ax2.plo
2022-01-06 14:24:58
140
原创 Matplotlib学习笔记
**Matplotllib学习笔记——图中图**import matplotlib.pyplot as pltfig = plt.figure()x = [1, 2, 3, 4, 5, 6, 7]y = [1, 4, 2, 6, 5, 7, 3]# 确定主图的位置left, bottom, width, height = 0.1, 0.1, 0.8, 0.8ax1 = fig.add_axes([left, bottom, width, height])ax1.plot(x, y,
2022-01-06 14:24:45
162
原创 Matplotlib学习笔记
**Matplotlib学习笔记——3Dplot**import numpy as npimport matplotlib.pyplot as pltfrom mpl_toolkits.mplot3d import Axes3Dfig = plt.figure()ax = Axes3D(fig,auto_add_to_figure=False)fig.add_axes(ax)# X,Y的取值X = np.arange(-4, 4, 0.25)Y = np.arange(-4, 4,
2022-01-06 14:24:27
119
原创 Matplotlib学习笔记
**Matplotlib学习笔记——等高线**import matplotlib.pyplot as pltimport numpy as np# 定义等高线的函数def f(x,y): return(x+y)# 绘制图幅的大小n = 256x = np.linspace(-3, 3, n)y = np.linspace(-3, 3, n)X, Y = np.meshgrid(x, y)# 将X,Y的值传给f(x y)plt.contourf(X, Y, f(X, Y
2022-01-05 20:10:52
899
原创 Matplotlib学习笔记
**Matplotlib学习笔记——柱状图**import matplotlib.pyplot as pltimport numpy as np# 绘制上下各12条n = 12X = np.arange(n)Y1 = (1 - X / float(n)) * np.random.uniform(0.5, 1.0, n)Y2 = (1 - X / float(n)) * np.random.uniform(0.5, 1.0, n)# 绘制条形图plt.bar(X, +Y1, face
2022-01-05 18:29:41
871
原创 Matplotlib学习笔记
**Matplotlib学习笔记——散点图**import matplotlib.pyplot as pltimport numpy as npX = np.random.normal(0, 1, 1024) # 生成1024个点Y = np.random.normal(0, 1, 1024)T = np.arctan2(Y, X) # 通过公式对每个点配色plt.scatter(X, Y, s=75, c=T, alpha=0.5) # 绘制散点图,
2022-01-05 18:03:11
174
原创 Matplotlib学习笔记
**Matplotlib学习笔记——tick能见度设置**import matplotlib.pyplot as pltimport numpy as npx = np.linspace(-3, 3, 50)y = 0.1 * xplt.figure()plt.plot(x, y, lw=10, zorder=1) # zorder 图层设置 值越小,在越底层plt.ylim(-2, 2)ax = plt.gca()ax.spines['right'].set_color
2022-01-05 15:44:31
42
原创 Matplotlib学习笔记
**Matplotlib学习笔记——坐标轴移动**import matplotlib.pyplot as pltimport numpy as npimport mathx = np.linspace(-2*math.pi, 2*math.pi, 100)y1 = 3 * np.sin(x)y2 = x**2 + 1plt.figure()plt.plot(x, y1, label='sin(x)')plt.plot(x, y2, color='red', linewidth=5.
2022-01-05 15:35:32
562
原创 Matplotlib学习笔记
**Matplotlib学习笔记——标注**import matplotlib.pyplot as pltimport numpy as npx = np.linspace(-3, 3, 50)y = 2 * x + 1plt.figure(num=1, figsize=(8, 5))plt.plot(x, y)ax = plt.gca() # 坐标轴设置ax.spines['right'].set_color('no
2022-01-05 15:28:36
39
原创 Matplotlib学习笔记
**Matplotlib学习笔记——添加图例**import matplotlib.pyplot as pltimport numpy as npimport mathx = np.linspace(-2*math.pi, 2*math.pi, 100)y1 = 3 * np.sin(x)y2 = x**2 + 1plt.figure()plt.plot(x, y1, label='sin(x)') # label='图例信息'plt.plot(x, y2, color='red
2022-01-05 15:15:05
301
原创 Matplotlib学习笔记
**Matplotlib学习——坐标轴设置**import matplotlib.pyplot as pltimport numpy as npimport mathx = np.linspace(-2*math.pi, 2*math.pi, 100)y1 = 3 * np.sin(x)y2 = x**2 + 1plt.figure()plt.plot(x, y1)plt.plot(x, y2, color='red', linewidth=5.0, linestyle='--')
2022-01-05 15:07:28
40
原创 Matplotlib学习笔记
**Matplotlib学习——Figure**此figure的意思与matlab中figure相近,都是一个画布import matplotlib.pyplot as pltimport numpy as npimport mathx = np.linspace(-2*math.pi, 2*math.pi, 100)y1 = 3 * np.sin(x)y2 = x**2 + 1plt.figure(num=3) # 画布标为3plt.plot(x, y1)plt.figu
2022-01-05 14:55:27
32
原创 Matplotlib学习笔记
**Matplotlib学习笔记——基本绘图**import matplotlib.pyplot as plt # 导入matplotlibimport numpy as np # 导入numpy,用于生成数组import math # 导入math,使用math.pix = np.linspace(-2*math.pi, 2*math.pi, 100) # 在-2pi到2pi之间生成100个点y1 = 3 * np.
2022-01-05 14:40:22
45
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人