command line - Save Matlab invisible plot under terminal as an image with same size -
I am connecting SSH to a Linux server and doing some MATLAB programming. I would like to save the invisible plot as
figH = shape ('visible', 'off'); Plots save some% plot as an image with the same size as the plot closed (figH);
Seta ()
and print ()
will resize the size of the saved image separately from the size of the plot. In addition to print ()
, all three renderer modes ( -opengl
, -ZBuffer
and - painters
) Can not be used in terminal emulation mode on linux server getframe ()
does not work either. I wonder how can I solve these problems? Thanks and regards!
Use the following sequence commands to connect and start MATLAB:
ssh -x user @ server # disabled X11 forwarding unset display # unset DISPLAY variable matlab -nodisplay # MATLAB start without desktop
Then a simple conspiracy for example:
figure, close to # should be done first, otherwise plot is empty plot (1:10) # normal file to print # save file.ps saveas (gcf, 'file.eps "EPS 2C") # Saves the work out of work # The work gets done
I tried it myself, and it works as expected.
Edit: / Strong>
You can always -r & lt; Number & gt; You can specify the DPI resolution by using
, for example a very high resolution:
print - dpdf-r600 file.pdf
< P> Note that you can use the -r0
to specify the screen resolution. In addition, you can turn on WYSIWYG printing data by using PaperPositionMode
property:
, Clause plot (1:10) set (gcf, 'paperposition mode', 'auto') print-dps2c -r0 file.eps exit
Comments
Post a Comment