In matlab, for the image output by plot(), sometimes it is necessary to adjust the content displayed in the opened window for subsequent processing
like
%% 以指定分辨率对图像进行保存
map_size1 = 512;
map_size2 = 256;
plot(Value) %Value是一维数组
set(gca,'ytick',[],'xtick',[]) %removing the scale of coordinate(x&y)
set(gca,'position',[0 0 1 1]); %图像填满
set(gcf,'Units','pixels','Position',[0,0,map_size1,map_size2]);%set image size
AA = getframe(gcf);
imwrite(AA.cdata,['test2.jpg']) %保存