Graphics, Figures & TablesPSTricks | Axes Label Offset

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

PSTricks | Axes Label Offset

Post by svend_tveskaeg »

Hi all.

The following example shows what I would like to achieve:

Code: Select all

\documentclass{article}

\usepackage{auto-pst-pdf,pstricks-add}

\begin{document}

\begin{figure}
 \centering
  \begin{pspicture}(9,6.3)
   \psaxes[labels=y]{->}(0.3,0.3)(0,0)(8.7,6)
   \multido{\i=0+1}{8}{\rput(\i.8,0){\i}}
  \end{pspicture}
\end{figure}

\end{document}
How do I offset the labels on the x axes to put them midway between where two labels would normally be?

It is not that I cannot use \multido but I would rather do it with \psaxes if possible.

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

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

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

PSTricks | Axes Label Offset

Post by CrazyHorse »

svend_tveskaeg wrote: How do I offset the labels on the x axes to put them midway between where two labels would normally be?

It is not that I cannot use \multido but I would rather do it with \psaxes if possible.

Code: Select all

\psaxes[xlabelOffset=0.5,ylabelOffset=0.5]{->}(0.3,0.3)(0,0)(8.7,6)

User avatar
svend_tveskaeg
Posts: 478
Joined: Sun Jul 12, 2009 5:31 am

Re: PSTricks | Axes Label Offset

Post by svend_tveskaeg »

Hmmm! I tried (some like) this yesterday. I wander what the difference is. :?

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