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

조회 수: 10 (최근 30일)
egg
egg 2019년 6월 14일
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