记录下一些好用的工具,方便以后长期使用。
论文中需要的图主要有两种:
- 模型图
- 实验结果图
模型图
icon
为了使我们的图看起来逼格更高一点,对于模型图中的icon可以使用一些几个网站
- https://www.flaticon.com
pro版本需要充钱,可以使用free版本,只需要涉及版本时归属于原作者就可以了。
- https://www.iconfont.cn
适用于大图标中的小图标,风格多样,可选择性多。
有了icon后可以在ppt中画,或者visio。
实验结果图
可以使用python或者matlab。
Python中有许多绘图库可以用来画实验结果图,其中比较流行的有Matplotlib、Seaborn和Plotly等。
代码示例如:
- 散点图:
import matplotlib.pyplot as plt
import numpy as np
def print_hi(name):
# Use a breakpoint in the code line below to debug your script.
print(f'Hi, {name}') # Press Ctrl+F8 to toggle the breakpoint.
# Press the green button in the gutter to run the script.
if __name__ == '__main__':
# 绘制散点图
plt.scatter(x, y)
# 添加标题和标签
# plt.title('实验结果')
plt.xlabel('x')
plt.ylabel('y')
# 显示图像
plt.show()
2. 折线图:
# 折线图
# 创建一个数据列表
x = [1, 2, 3, 4, 5]
y1 = [1, 3, 2, 4, 5]
y2 = [2, 4, 3, 5, 6]
# 绘制折线图
plt.plot(x, y1, label='Line 1')
plt.plot(x, y2, label='Line 2')
# 添加图例和坐标轴标签
plt.legend()
plt.xlabel('X Label')
plt.ylabel('Y Label')
# 显示图形
plt.show()
- 柱状图:
# 创建数据
x = np.array(['A', 'B', 'C', 'D', 'E'])
y1 = np.array([10, 24, 36, 40, 56])
y2 = np.array([20, 28, 30, 45, 58])
# 绘制柱状图
fig, ax = plt.subplots()
ax.bar(x, y1, label='Bar 1')
ax.bar(x, y2, bottom=y1, label='Bar 2')
# 添加图例和坐标轴标签
ax.legend()
ax.set_xlabel('X Label')
ax.set_ylabel('Y Label')
# 显示图形
plt.show()
可以根据自己的需求进一步设计配色、样式。