How do I save multiple figures to a single PDF file in MATLAB?
Show older comments
I have a figure array (6x1) of 6 figures with handle, 'k' in MATLAB R2020a. I can type 'saveas(k,'test.fig')' and the six figures are saved to a single MATLAB file. I would like to save the six figures to a single PDF or TIF file, both of which support multiple pages. If I use 'saveas(k,'test.pdf')' or 'saveas(k,'test.tif')', I get the errors:
Error using checkArgsForHandleToPrint
Handle input must be scalar, vector, or cell array of vectors.
Error in checkArgsForHandleToPrint
Error in print>LocalCreatePrintJob (line 101)
handles = checkArgsForHandleToPrint(0, varargin{:});
Error in print (line 38)
[pj, inputargs] = LocalCreatePrintJob(varargin{:});
Error in saveas (line 181)
print( h, name, ['-d' dev{i}] )
Is there a way I can save the multiple figures in a figure array to a single PDF or TIF file? Is there a built in MATLAB function with arguments that can do this?
Accepted Answer
More Answers (0)
Categories
Find more on Printing and Saving in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!