How can I export my figures to .pdf without them changing style?

4 次查看(过去 30 天)
I need to export 80 figures (each contains a uitable and plot) to a single pdf document. I was able to do this when my figure only contained the plot, but now that I've added a uitable next to it (I've also tried adding it under the plot), it cuts off half the table and half the plot on my pdf. I've tried different print methods such as 'bestfit' etc, yet it never works.
I can export each figure as JPEG and it looks the way I want it to, but I obviously don't want the to save every 80 image by hand to JPEG as well as then later trying to combine those JPEGs into a pdf file.
Any suggestions? I'm fairly new to matlab so I don't knmow all the terminology very well.
Each figure is created after a for loop. Once a single figure is completed (table + plot) , before my for loop ends there is a : print ('-fillpage', '-dpsc2',['DraftDoc' ], '-append', '-f'); %gcf or -bestfit
  1 个评论
Ulises Alejandro Aregueta Robles
I have worked around this issue by:
  • Making sure the figure position matches the size of the Word document where I want to paste it, and
  • Exporting the figure using exportgraphics:
>> ax=gca;
>> exportgraphics(ax,"Figure_Name.png")

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Printing and Saving 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by