Graphics, Figures & TablesPstricks-add \psaxes label vertical axis

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
voorneveld
Posts: 15
Joined: Mon Sep 07, 2009 11:18 am

Pstricks-add \psaxes label vertical axis

Post by voorneveld »

I try to draw three axes systems in two-dimensions. On the horizontal axis, I want label x_1, on the vertical axis label x_2.

This works beautifully for the first axis system, but somehow the x_2 label does not appear in the second and third. What am I doing wrong?

Code: Select all

\documentclass[11pt,a4paper,english]{article}

\usepackage{amsfonts}
\usepackage{amssymb}
\usepackage{amsmath}
\usepackage[T1]{fontenc}
\usepackage[utf8]{inputenc}
\usepackage{babel}
\usepackage[font=small,labelfont=bf,tableposition=top]{caption}
\usepackage{graphicx}
\usepackage{pstricks-add}
\usepackage{auto-pst-pdf}

\begin{figure}[ht]
\psset{unit=1cm}
\begin{pspicture}(0,-0.5)(10.5,2.5)
\psaxes[dx=0.5cm,dy=0.5cm]{->}(0,0)(2,2)[$x_1$,0][$x_2$,90]
\psaxes[dx=0.5cm,dy=0.5cm]{->}(4,0)(6,2)[$x_1$,0][$x_2$,90]
\psaxes[dx=0.5cm,dy=0.5cm]{->}(8,0)(10,2)[$x_1$,0][$x_2$,90]
\end{pspicture}
\end{figure}

Recommended reading 2024:

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

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

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

Pstricks-add \psaxes label vertical axis

Post by localghost »

At first, you forgot the document environment to make your example compilable. After completing your code and adding the \listfiles command I started a run and everything worked fine. I assume that your version of pstricks-add is outdated and you have to update at least this package. Compare your version to that in my list of used files.

Code: Select all

 *File List*
 article.cls    2007/10/19 v1.4h Standard LaTeX document class
  size11.clo    2007/10/19 v1.4h Standard LaTeX file (size option)
 fontenc.sty
   t1enc.def    2005/09/27 v1.99g Standard LaTeX file
inputenc.sty    2008/03/30 v1.1d Input encoding file
  latin1.def    2008/03/30 v1.1d Input encoding file
   babel.sty    2008/07/06 v3.8l The Babel package
 bblopts.cfg    2006/07/31 v1.0 MiKTeX 'babel' configuration
 english.ldf    2005/03/30 v3.3o English support from the babel system
 caption.sty    2008/08/24 v3.1j Customizing captions (AR)
caption3.sty    2008/08/24 v3.1j caption3 kernel (AR)
  keyval.sty    1999/03/16 v1.13 key=value parser (DPC)
pstricks-add.sty    2009/03/17 v. 0.13 package wrapper for pstricks-add.tex (hv
)
pstricks.sty    2008/11/26 v0.40 LaTeX wrapper for `PSTricks' (RN,HV)
pstricks.tex    2009/05/19 v1.29 `PSTricks' (tvz,hv)
  xcolor.sty    2007/01/21 v2.11 LaTeX color extensions (UK)
   color.cfg    2007/01/18 v1.5 color configuration of teTeX/TeXLive
  pdftex.def    2009/08/25 v0.04m Graphics/color for pdfTeX
pstricks-add.tex    2009/05/25 v3.34 `PSTricks-add' (hv)
pst-xkey.tex    2005/11/25 v1.6 PSTricks specialization of xkeyval (HA)
 xkeyval.sty    2008/08/13 v2.6a package option processing (HA)
 xkeyval.tex    2008/08/13 v2.6a key=value parser (HA)
auto-pst-pdf.sty    2009/04/26 v0.6 Wrapper for pst-pdf
   ifpdf.sty    2009/04/10 v2.0 Provides the ifpdf switch (HO)
ifplatform.sty    2009/09/10 v0.3a Testing for the operating system
pdftexcmds.sty    2009/09/23 v0.6 LuaTeX support for pdfTeX utility functions (
HO)
infwarerr.sty    2007/09/09 v1.2 Providing info/warning/message (HO)
ifluatex.sty    2009/04/17 v1.2 Provides the ifluatex switch (HO)
 ltxcmds.sty    2009/08/05 v1.0 Some LaTeX kernel commands for general use (HO)

catchfile.sty    2007/11/11 v1.2 Catches the contents of a file (HO)
 pst-pdf.sty    2008/10/09 v1.1v PS graphics for pdfLaTeX (RN,HjG)
graphicx.sty    1999/02/16 v1.0f Enhanced LaTeX Graphics (DPC,SPQR)
graphics.sty    2009/02/05 v1.0o Standard LaTeX Graphics (DPC,SPQR)
    trig.sty    1999/03/16 v1.09 sin cos tan (DPC)
graphics.cfg    2007/01/18 v1.5 graphics configuration of teTeX/TeXLive
 preview.sty    2006/08/25 11.84 (AUCTeX/preview-latex)
   dvips.def    1999/02/16 v3.0i Driver-dependant file (DPC,SPQR)
 environ.sty    2008/06/18 v0.2 A new way to define environments
supp-pdf.tex
pstricks-prblm-pics.pdf    Graphic file (type pdf)
  t1cmss.fd    1999/05/25 v2.5h Standard LaTeX font definitions
 ***********

Best regards
Thorsten
voorneveld
Posts: 15
Joined: Mon Sep 07, 2009 11:18 am

Pstricks-add \psaxes label vertical axis

Post by voorneveld »

Thank you: I suppose it must have been an old pstricks-add version. An alternative that also worked was to put the working first axes system into a \multirput command and repeat it three times!
Post Reply