N = PRTNumber;
t = (0:N-1) / Fs; % 从0开始
t = t*1e6; % 以us为单位
Ind = 1:PRTNumber;
figure;
width_inch = 3.7; % 半栏宽度
height_inch = 2.2;
% ===== 关键:设置图窗尺寸 =====
set(gcf, 'Units', 'inches', 'Position', 1 1 width_inch height_inch);
% 注意:前两个数字 1 1 是图窗左下角在屏幕上的位置(英寸),可以根据需要调整。
Figure=pcolor(t,f1.*1e-6,Sstft); %绘制伪彩色图
xticks(0:20:100); %设置显示的刻度点
xlim(0 100);
hX = xlabel('时间', 'FontSize', 10, 'FontName', '宋体');
% 获取xlabel的位置,在其右侧追加μs(用Times New Roman)
pos = get(hX, 'Position');
text(pos(1) +9, pos(2)-1.2, '(μs)', 'FontSize', 10, 'FontName', 'Times New Roman', 'Units', 'data');
%xlabel('时间 (μs)', 'FontSize', 10, 'FontName', '宋体');
%xlabel('时间(', char(956), 's)', 'FontSize', 10, 'FontName', '宋体', 'Color', 0 0 0);
%xlabel('采样点', 'FontSize', 10, 'FontName', '宋体', 'Color', 0 0 0);
ylabel('频率(MHz)', 'FontSize', 10, 'FontName', '宋体', 'Color', 0 0 0);
colormap('jet'); %指定色系:parula、turbo、jet等等
shading flat;%将每个网格片用同一个颜色进行着色,且网格线也用相应的颜色,从而使得图形表面显得更加光滑。
shading interp;%在网格片内采用颜色插值处理,得出的表面图显得最光滑。
%exportgraphics(gcf, 'complex_tf.pdf', 'ContentType', 'image', 'Resolution', 600);
%exportgraphics(gcf, 'complex_tf.pdf', 'ContentType', 'vector');
colorbar; %显示图像的颜色条,提供对图像彩色的可视化表示,使得用户能够更直观的理解图像数据的分布和范围