Generaloverlapping figures

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
lmas
Posts: 2
Joined: Wed Dec 05, 2007 5:51 pm

overlapping figures

Post by lmas »

Hello Latex users,

I am experiencing a problem with eps figures. I generate the eps figures using Matlab. Usually they come with a huge bounding box and I edit the eps file with Wordpad to crop it manually. The problem is that if I don't set a sufficient margin, when I Latex the document the figures (in a subfigure environment) appear overlapped, more precisely, the right figure overlaps the left one. I found a solution to this by opening the eps files with Acrobat Professional, croping there and saving again as eps. Two problems arise: the size of the file increases a lot and I am not able to insert latex text in the figures using psfrag anymore.
I send an example attached.

Does someone knows what I have to do?

Thank you
Attachments
examples.pdf
(73.33 KiB) Downloaded 496 times

Recommended reading 2024:

LaTeXguide.org • LaTeX-Cookbook.net • TikZ.org

NEW: TikZ book now 40% off at Amazon.com for a short time.

And: Currently, Packt sells ebooks for $4.99 each if you buy 5 of their over 1000 ebooks. If you choose only a single one, $9.99. How about combining 3 LaTeX books with Python, gnuplot, mathplotlib, Matlab, ChatGPT or other AI books? Epub and PDF. Bundle (3 books, add more for higher discount): https://packt.link/MDH5p

balfonsi
Posts: 93
Joined: Wed Mar 14, 2007 12:05 am

Re: overlapping figures

Post by balfonsi »

I suppose you use a \subfigure{\includegraphics{myfigure}} command. Why don't you specify the width (in points} since you can read it in the .eps files?
Another suggestion: insert an horizontal space between the subfiguresthat appear on the same line,say
\subfigure{\includegraphics{myfigure1}}
\qquad
\subfigure{\includegraphics{myfigure2}}

B.A.
lmas
Posts: 2
Joined: Wed Dec 05, 2007 5:51 pm

Re: overlapping figures

Post by lmas »

How can I set the width of the figure? With \includegraphics[width=....] ?


If I insert an horizontal space the figures may not appear side by side or to have them side by side I would have to decrease the size. I don't want to have blank spaces between the figures.
balfonsi
Posts: 93
Joined: Wed Mar 14, 2007 12:05 am

Re: overlapping figures

Post by balfonsi »

Well, as you said, you crop the size of the bounding box manually. Then you can test if the new size is correct using ghostscript: if you're under windows at least,using gsview, you set as an option to show Bounding Box. As the precision can be 1/100 pt, it is more than sufficient.

Of course all this has to be done by hand. Btw, did you think of using the miniplot package? It seems to do what you want. There also exists a makeplo package, dedicated to making plots directly out of matlab data files (it's to be found in \pstricks\contributions)

Regards,
B.A.
Post Reply