0

i'm writing my first document using LaTex. I want to include good-quality figures, so i opted to use the PDF format. i saved the images from the plots in Matlab as pdf files, and when i included the figure in my document it showed up with extra white borders, i'm not sure how to fix that. Cropping the pdf can be done, but i have many images to include so that would be tedious. any suggestions? or something else i can do? thank you pic showing my issue

joy
  • 1
  • Welcome to tex.sx. – barbara beeton Aug 20 '23 at 22:45
  • 1
    i found that i can use svg format and it works well for what i want, so i'll be using that instead of pdf format. still open to any tips or suggestions tho, thanks – joy Aug 20 '23 at 22:45
  • 1
    See if https://tex.stackexchange.com/questions/34386/how-to-export-matlab-figures-to-pdf-latex (link you can see at side of your question too) can help you. It seems that your question is duplicate to this. – Zarko Aug 20 '23 at 22:57
  • If you don't want to export the PDFs again (without the whitespace around) and don't want to use, e.g., pgfplots, you can clip the existing images to the contents. – cabohah Aug 21 '23 at 07:15
  • https://tex.stackexchange.com/a/165994/11604. BTW, you are not using the SVG format really, but a copy converted to PDF in the background. No idea of Matlab, but I would start checking this software is able to output PDF with custom sizes or scale the plots to fit a landscape , so avoiding the need of manual or automatic cropping. – Fran Aug 21 '23 at 10:02
  • @Zarko thank you, i check out the link you provided and it had a helpful suggestions – joy Aug 21 '23 at 10:04
  • @Fran hello, yes i was able to find an option to customize the size of the pdf, but the quality of the image was drastically lowered, but in all cases, the svg seems to work fine for now, matlab can provide an svg format of the plots. thank you for your reply! – joy Aug 21 '23 at 10:11
  • @joy If the PDF have a lower quality is because the content is not a vectorial image (zoom it as far as possible, if you see pixelated lines the content is really a PNG or JPG file). If this not happen, it could be that is really a vectorial image but the viewer cannot show well thin lines at a lower scale (the laser print output will show that really is a perfect plot). – Fran Aug 21 '23 at 10:27

0 Answers0