clear
clc
close all
% 创建一些示例数据
x = linspace(0, 2*pi, 100);
y = sin(x);
% 绘制图形
figure;
plot(x, y, 'LineWidth', 2); % 设置线条宽度为2
% 修改字体和其他参数
title('Sin Function', 'FontSize', 16, 'FontWeight', 'bold'); % 设置标题字体大小和粗细
xlabel('X-axis', 'FontSize', 14, 'FontWeight', 'bold'); % 设置X轴标签字体大小和粗细
ylabel('Y-axis', 'FontSize', 14, 'FontWeight', 'bold'); % 设置Y轴标签字体大小和粗细
set(gca, 'FontSize', 12, 'FontWeight', 'bold'); % 设置坐标轴刻度字体大小和粗细
grid on; % 显示网格线
% 保存图形为PNG文件
print('sin_function_plot.png', '-dpng', '-r300'); % 300 dpi的分辨率