GeneralInserting figure, size and position

LaTeX specific issues not fitting into one of the other forums of this category.
Post Reply
Aisha
Posts: 3
Joined: Sat Jun 30, 2007 11:12 am

Inserting figure, size and position

Post by Aisha »

Plzz...can anyone help me how to insert figure coz whenever i try to...its size is not adjusting and when i scale or adjust its width it goes to another page...and i want it in the bottom of the page..

And yes...as far as caption is concerned....it is so far from the figure..

plzz help :( i'm stuck i hav to submit report asap!!!

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

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

Inserting figure, size and position

Post by localghost »

It would be very helpful if you could say what you have done so far. Without any information i only can guess what's going wrong. But you can try a very simple piece of code to get it work.

Code: Select all

\begin{figure}[!hb]
  \centering
  \includegraphics[scale=0.5]{<picturefile>}
  \caption{A Picture}\label{fig:picture}
\end{figure}
Note that a figure only can be placed on the desired page when there is enough space beside the text. If not, this object is floated. So you have to adjust its size to make it fit the space left on the page.
User avatar
pumpkinegan
Posts: 91
Joined: Thu May 03, 2007 10:29 pm

Inserting figure, size and position

Post by pumpkinegan »

I also suspect that you do not have a bounding box on your .eps figure. This may explain why the caption is so far away from the bottom of the figure, and also why the figure environment jumps all over the place when you adjust the width.

If you open the .eps (or .ps) file with a text editor, make sure the first two line look something like:

Code: Select all

%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: L B R T
where L, B, R, T are the left, bottom, right, and top coordinates (in points). Open the .eps with Ghostview and the cursor will guide you as to what values are the best.

There are probably easier ways, but this is the way I do it. (Note if you are using .ps figures, just do the same, but then save it as a .eps).

Patrick.



EDIT: My apologies for my mistake in the bounding box coordinates. As balfonsi pointed out there are four numbers: the first two mark the lower left corner, the second two mark the top right corner.
Last edited by pumpkinegan on Mon Jul 02, 2007 12:51 pm, edited 2 times in total.
Aisha
Posts: 3
Joined: Sat Jun 30, 2007 11:12 am

Inserting figure, size and position

Post by Aisha »

consider following portion:

Code: Select all

\newpage
\item[``PCS and Beyond"]\textit{}
\begin{itemize}
\item 1995 - FCC auctions off frequencies in Personal
Communications System (PCS) band at 1.8 GHz for mobile telephony
\item 1997 - Number of cellular telephone users in U.S. \textgreater 50M
\item 2000 - Third generation cellular system standards. Bluetooth
standards.
\end{itemize}

Since the mid 1990s, the cellular communications industry has
witnessed explosive growth. Wireless communications networks have
become much pervasive than anyone could have imagined when the
cellular concept was developed in the 1960s and 1970s. As shown in
figure 1.1.\\


\begin{figure}[!hb]
  \centering
  \vspace{2cm}
  \fbox{
  \includegraphics[width=7cm,height=10cm]{Growth}}
  \caption{A Picture}\label{fig:Growth}
\end{figure}
Now...this figure is not of appropraite size and box is also not a good one...what should i do here???
Aisha
Posts: 3
Joined: Sat Jun 30, 2007 11:12 am

Re: Inserting figure

Post by Aisha »

%!PS-Adobe-3.0 EPSF-3.0
%%BoundingBox: L R B U


where should i apply above code????and when i open .eps figure from ghost view....it do not open..why???
balfonsi
Posts: 93
Joined: Wed Mar 14, 2007 12:05 am

Re: Inserting figure

Post by balfonsi »

You don't have to specify width and height for an eps figure: they can be read from the bounding box specified at the beginning of the file. Try first without the \fbox command, to have a figure environment as simple as possible, to be able to detect the real problems. This being said, that you can't see your eps figure in GhostView is quite strange. How did you obtain it? And what does the line

%% Bounding Box L R B U

mean? Normally you have a series of four numbers (the coordinates of the lower leftand upper right corners (in typographical points).

Regards,
B.A.
Post Reply