Graphics, Figures & Tablesfigure flushed to the right on its own !!!

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
pemfir
Posts: 23
Joined: Sun Aug 12, 2012 11:30 pm

figure flushed to the right on its own !!!

Post by pemfir »

WHY the figures move to the left for no reason ? i would like to keep them in the center , there is still alot of margin on both sides, but it keeps giving me this crap figure placement.

Code: Select all

\documentclass[10pt,a4paper]{article}
\usepackage[utf8]{inputenc}
\usepackage{graphicx}
\begin{document}


\begin{figure}[h]
\centering
\includegraphics[width = 6in]{figure1_2} 
\end{figure}


\end{document}
Attachments
figure1_2.PNG
figure1_2.PNG (46.47 KiB) Viewed 2105 times
Last edited by Stefan Kottwitz on Fri Aug 31, 2012 11:40 pm, edited 1 time in total.

Recommended reading 2024:

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

Learn LaTeX easily with newest books:

The LaTeX Beginner's Guide: 2nd edition and perfect for students writing a thesis

The LaTeX Cookbook: 2nd edition full of practical examples for mathematics, physics, chemistry, and more

LaTeX Graphics with TikZ: the first book about TikZ for perfect drawings in your LaTeX thesis

User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Re: figure flushed to the right on its own !!!

Post by Stefan Kottwitz »

It's at the left margin. It's too wide, that's why it overlaps into the right margin. You could make it smaller, or make the margins smaller, i.e. the text area wider. It's also possible to let it overlap symmetrically, if really required. Btw. I would make this table with LaTeX instead of making a figure from external graphics. Especially, since bitmap graphics such as PNG are not lossless scalable, which means lower quality.

Stefan
LaTeX.org admin
pemfir
Posts: 23
Joined: Sun Aug 12, 2012 11:30 pm

figure flushed to the right on its own !!!

Post by pemfir »

thank you !
This was just a sample, when i decrease the size of these pictures in the document, so that they would not interfere with the margins, it moves to the middle, but then there is a large white area on both sides, that i would like to take advantage of, the text in the document has a width i want the figure width to be as large as the text. when using

Code: Select all

\includegraphics[width=\textwidth]{Figure1_2}

I still see a lot of white margin from both sides, i thought maybe the figure itself has some invisible area on both sides, but it does not.
Last edited by cgnieder on Sun Sep 02, 2012 11:55 pm, edited 1 time in total.
User avatar
Stefan Kottwitz
Site Admin
Posts: 10350
Joined: Mon Mar 10, 2008 9:44 pm

Re: figure flushed to the right on its own !!!

Post by Stefan Kottwitz »

So perhaps post a sample figure, which shows the problem you described in your last post with the code above. Right, probably the explanation is whitespace in the figure itself.

Stefan
LaTeX.org admin
Post Reply