How do I publish a PDF with multiple figures on a line in MATLAB 8.1 (R2013a)?
8 views (last 30 days)
Show older comments
I want to publish a script as a PDF. In the script, I generate images in a FOR loop, and I use SNAPNOW to get a snapshot of the image. When I print to HTML, the images are printed side-by-side (until it runs out of space on that line), but when I print to PDF, each image is on a new line. I tried specifying the maxHeight and maxWidth options, but the images are still each on a new line.
Accepted Answer
MathWorks Support Team
on 29 Apr 2013
The ability to print multiple images on a line when using PUBLISH is currently unavailable in MATLAB.
As a workaround, put multiple images in one figure using SUBPLOT, and then take a snapshot of those figures. Attached is an example, 'example.zip', that shows how this might be done. Inside this zipped folder, there is the script 'example.m' that creates the figures and is the file that we desire to publish. There is also a driver function, 'main.m' that publishes 'example.m' as both a PDF and HTML document. Simply run 'main.m' to see how the example works.
0 Comments
More Answers (0)
See Also
Categories
Find more on Read, Write, and Modify Image 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!