Graphics, Figures & TablesInserted figure looks cut

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
ledian1983
Posts: 3
Joined: Mon Mar 02, 2009 12:04 pm

Inserted figure looks cut

Post by ledian1983 »

Hi everyone:

I'm kind of new using latex and I have a problem. I wrote a report in which I have some pictures and all of them look cut at the right and bottom sites (like 1 cm or so) and I don't know why.

I left white spaces at those sites in my figures and now I get the complete figures, but the caption does not fit exactly and it does not look like good. I am using emacs and miktex on Windows XP, my figures are all in .eps format and I look the preview with dvi yap viewer.

Does anyone know what I could do? I left a representation of my problem:
Original figure:
+---------------+
|0000000000|
|0000000000|
|0000000000|
|0000000000|
|0000000000|
|0000000000|
|0000000000|
+---------------+
The inserted figure look like this (cut at the right and bottom):
+------------+
|00000000|
|00000000|
|00000000|
|00000000|
|00000000|
+------------+
I add white space at right and bottom:
+-------------------+
|0000000000000|
|0000000000000|
|0000000000000|
|0000000000000|
|0000000000000|
|0000000000000|
|0000000000000|
|0000000000000|
|0000000000000|
|0000000000000|
+-------------------+
Inserted figure looks ok, but caption does not fit:
+---------------+
|0000000000|
|0000000000|
|0000000000|
|0000000000|
|0000000000|
|0000000000|
|0000000000|
+---------------+
Figure 1: Representation of
a model from x ...

Recommended reading 2024:

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

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

localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Inserted figure looks cut

Post by localghost »

Please give a specific code example and attach the concerned image file for test purposes.


Best regards
Thorsten¹
ledian1983
Posts: 3
Joined: Mon Mar 02, 2009 12:04 pm

Re: Inserted figure looks cut

Post by ledian1983 »

Thanks Thorsten for your answer. I was a bit busy and that's why I could post before.

The code I'm using is:

\begin{center} \begin{figure}[!h]
\includegraphics[width=4cm]{images/Ethane}
\caption[Ethane molecule]{Ethane molecule.} \label{fig:c2h6}
\end{figure} \end{center}

I attatched the original picture and I convert it to .eps using OpenOffice Draw.

Thanks in advance
Attachments
Ethane01.png
Ethane01.png (32.82 KiB) Viewed 5241 times
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: Inserted figure looks cut

Post by phi »

The conversion often fails to write the bounding box correctly. Since your picture is a bitmap, it could be better to switch to pdflatex to write PDFs directly. pdflatex is able to include PNG images. Otherwise try to correct the bounding box with ghostscript.
User avatar
localghost
Site Moderator
Posts: 9202
Joined: Fri Feb 02, 2007 12:06 pm

Re: Inserted figure looks cut

Post by localghost »

Nice looking Ethane molecule. Self made with a ray-tracing software? If so, check whether this software supports direct export to EPS. It would have been better if you attached the EPS file you produced (in a ZIP archive if necessary). Then testing is easier.
ledian1983
Posts: 3
Joined: Mon Mar 02, 2009 12:04 pm

Re: Inserted figure looks cut

Post by ledian1983 »

Hi there:

actually I did not think of a wrong conversion and that could be the reason. I copied this picture from a website in .png format, opened it with OpenOffice Draw, edited a bit (e.g. I changed the margins) and then exported as .eps format.

I am trying to understand the logic of all of this.

Thanks in advance
Attachments
Ethane.rar
(43.92 KiB) Downloaded 254 times
phi
Posts: 577
Joined: Tue Oct 21, 2008 8:10 pm

Re: Inserted figure looks cut

Post by phi »

perhaps you could use a different program. I've attached an example of an Ethane molecule with nice 3-D arrows which is interactive in Adobe Reader. If you want to start from that, I'll post the source code. Other possibilities would include drawing the molecule with a molecule visualizer program like PyMOL. PDB files which contain coordinates for many molecules are freely available on the web.
Attachments
Ethane.pdf
Interactive ethane molecule
(237.74 KiB) Downloaded 307 times
Post Reply