我有一个需要在纸上打印出精确尺寸的图,因为它是按比例绘制的,而且在纸上它会测量一些东西.什么是最简单的(有可能)这样做的方式?
我有一个绘制时间序列的函数,现在我想将其保存为图像,请问如何才能完成?
function TimeSeriesImages(a, b, c, d, e, f, g, h, i, j, k, l)
x = [a b c d e f g h i j k l];
ts1 = timeseries(x,1:12);
ts1.Name = 'Monthly Count';
ts1.TimeInfo.Units = 'months';
ts1.TimeInfo.Format = 'mmm dd, yy'
ts1.Time=ts1.Time-ts1.Time(1);
plot(ts1)
end
Run Code Online (Sandbox Code Playgroud) 我有大量的文件需要制作直方图因此我想从命令行保存它.对于图,我通常使用以下命令将其保存在matlab中:
figure = plot (x,y)
saveas(figure, output, 'jpg')
Run Code Online (Sandbox Code Playgroud)
我想对直方图做同样的事情:
figure = hist(x)
saveas(figure, output, 'jpg')
Run Code Online (Sandbox Code Playgroud)
但是我得到一个错误,表示句柄不正确.我也试过imwrite功能,代码执行但保存了一个空白的黑色图像.有没有办法可以保存我的直方图?