Search code examples
pdfexportmatlab-figure

WYSIWYG for Matlab export_fig


I have several matlab figure I want to convert to pdf format for publication. I'm using the export_fig(gcf,'test.pdf','-transparent') command line, but the output pdf is different from the original figure (axes label, text box, anotations,... moved from their initial position).

Have you any idea how to get a WYSIWYG output ? Thanks !


Solution

  • I found a way, but it have to be done manualy :

    • open the .fig file
    • select file > print preview
    • if the graph is too large, select format "A3" and orientation "landscape"
    • then "print"

    For Latex, this orientation can causes some problems (even by using the trim ={. . . .},clip function in includegraphics), that is why I use the pdf rotation website : https://www.rotatepdf.net/

    Hope it could be usefull, because NO NEED for more matlab function or code.