save as EPS to include into Latex.
Surprise: Matlab has an awful bounding box space around the figure.
You want to autocrop it but its a vector graphics format,
so you can't use mogrify -trim +repage <filename> as you would normally
do with an image.
Solution: epstool. It does an autocrop for the EPS file:
epstool --copy --bbox input.eps output.eps
and your final plot will still look crisp.
Another option: save as PDF in matlab. Then use ImageMagick's convert to convert it to eps:
convert file.pdf file.eps
this will keep the vector graphics intact (at least in recent versions of ImageMagick).
Of course, you can always use pdflatex instead and avoid EPS altogether.
10 comments:
oh man thanks! epstool is a godsent! had been manually editing the bounding box before reading your blog.
Thanks again!
Nice post and this post helped me alot in my college assignement. Gratefulness you seeking your information.
Thanks, your post was very useful.
I did a short script to cut eps files:
#!/bin/sh
mv $1 temp
epstool --copy --bbox temp $1
rm temp
Than you very much! This just saved me a lot of reading and trial and errors. I was having trouble with gnuplot's postscript terminal leaving a lot of blank space.This was a big help! Thanks again!
thank you very much, this really helped me!
Great help! Than you very much!
Thats so much ..... been swapping formats and programs so far
Thank you so much! I had been manually cutting then until now.
Cheers
Thank you so much! I had been manually cutting then until now.
Cheers
many many thanks! this tool really works and is well documented about the purpose!
Post a Comment