GeneralGraphics taking up too much space

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
meklenborg
Posts: 18
Joined: Tue Mar 20, 2007 7:42 pm

Graphics taking up too much space

Post by meklenborg »

Hi

I've included Excel graphics in my LaTeX document (using wmf2eps to create the eps-files + graphics-packages in the preambule), but they take up too much space. I've reseized the file so that it fits the page, but there is an enormous space separating the figure from the caption. This is the encoding:

\begingroup
\centering
\resizebox{\textwidth}{!}
{\includegraphics[0in,0in][12in,15in]{wp2ny.eps}}
\captionof{figure}{test picture}
\endgroup

If I use the figure-command, it goes from bad to worse, as the graphics take up one whole page.

I'm really pleased to be able to include graphics in my work, and I'm really happy I get LaTeX to hang on to them also when I run dvi2ps before ps2pdf (had some problems with that some months back). I just want it to look nice too! My document class is "book".

Happy for any suggestion!


Christine :)

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

Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Re: Graphics taking up too much space

Post by Stefan Kottwitz »

Hi Christine,

could you post wp2ny.eps as an attachment here? Maybe the wmf file too. Perhaps the space is already inside this eps file. In this case the conversion could be different, or you could crop the eps file before/while including.

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

Graphics taking up too much space

Post by localghost »

Stefan_K wrote:[...] Perhaps the space is already inside this eps file. [...]
You can test that by framing the included graphics.

Code: Select all

\begingroup
  \centering
  \fbox{
    \includegraphics[width=\textwidth]{wp2ny.eps}
  }
  \captionof{figure}{test picture}\label{fig:testfig}
\endgroup

Best regards
Thorsten¹
User avatar
T3.
Posts: 208
Joined: Fri Mar 14, 2008 12:58 pm

Re: Graphics taking up too much space

Post by T3. »

Large space between caption and graph might be the result of wrongly set bounding box in your eps file. You can check this either the way localghost suggests or by using ghostview and displaying the bounding box. Ghostview should also allow you to correct the bounding box if necessary.

I would also recommend that you google for epslatex document. You will find there very comprehensive discussion of how to handle graphics in LaTeX and what tools you can use.

Cheers,

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

Graphics taking up too much space

Post by localghost »

T3. wrote:[...] Ghostview should also allow you to correct the bounding box if necessary. [...]
I'm not sure if GSview offers such a feature, but the bounding box can be changed by editing the EPS file with a normal text editor. There is a commentary section in each EPS file where the bounding box is given. The coordinate system of postscript has its origin in the lower left corner of a page.
T3. wrote:[...] I would also recommend that you google for epslatex document. [...]
A search engine is not needed. As nearly every LaTeX related document epslatex can be found on CTAN.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10335
Joined: Mon Mar 10, 2008 9:44 pm

Graphics taking up too much space

Post by Stefan Kottwitz »

Hi,

you can specify the bounding box with \includegraphics, see grfguide.

Stefan
Post Reply