使用以下命令序列连接并启动MATLAB:
ssh -x user@server # disabled X11 forwarding
unset DISPLAY # unset DISPLAY variable
matlab -nodisplay # start MATLAB without the desktop
那么一个简单的情节来说明:
figure, close # must do this first, otherwise plot is empty
plot(1:10) # usual plotting
print file # save the figure as file.ps
saveas(gcf, 'file.eps', 'eps2c') # saveas aslo works
exit # done
我只是尝试了它,它的工作原理.
编辑:
您可以随时使用-r< number>指定DPI分辨率,例如非常高的分辨率:
print -dpdf -r600 file.pdf
请注意,您可以使用-r0来指定屏幕分辨率.
您也可以使用PaperPositionMode属性打开所见即所得的数字打印:
figure, close
plot(1:10)
set(gcf, 'PaperPositionMode', 'auto')
print -deps2c -r0 file.eps
exit