Graphics, Figures & TablesUnwanted figure placement

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Unwanted figure placement

Post by svend_tveskaeg »

Hi all.

Consider the following MWE:

Code: Select all

\documentclass[danish]{article}

\usepackage{babel}
\usepackage[margin=2.4cm]{geometry}
\usepackage{pst-func}

\begin{document}

\section{Test}
\begin{figure}[htbp]
\centering
\psset{xunit=12.708cm,yunit=3.53cm}
 \begin{pspicture}(-0.15,-0.22)(1.06,2.05)
  \psaxes[Dx=0.1,Dy=0.2,comma]{->}(0,0)(-0.02,-0.072)(1.03,2.05)[$x$,0][$y$,90]
  \psBetaDist[alpha=0.7,beta=0.9,linecolor=red,linewidth=1pt]{0.1}{0.9}
  \rput(0.5,1.8){$\alpha$}
 \end{pspicture}
\end{figure}
\noindent Test text, test text, test text, test text, test text, test text, test text, test text, test text, test text, test text, test text.

\end{document}
Why is the picture not horizontically centered on the page?

Thank you in advance!
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)

Recommended reading 2024:

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

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

CrazyHorse
Posts: 351
Joined: Sat Aug 02, 2008 8:47 am

Unwanted figure placement

Post by CrazyHorse »

svend_tveskaeg wrote:Why is the picture not horizontically centered on the page?
first rule: if things are visually not centered, then control the white space!
this can easily be done with \fbox{...} around the object.
User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: Unwanted figure placement

Post by svend_tveskaeg »

Do'h! I actually knew this "trick" but I had forgotte all about it.

Thank you!
``In the game of chess, you can never let your adversary see your pieces.''
-- Zapp Brannigan, Futurama (season 1, episode 4)
Post Reply