Graphics, Figures & TablesPreference Schedules- Labeling y-axis problem

Information and discussion about graphics, figures & tables in LaTeX documents.
Post Reply
coachbennett1981
Posts: 274
Joined: Fri Feb 05, 2010 10:15 pm

Preference Schedules- Labeling y-axis problem

Post by coachbennett1981 »

I have used this code here before. I am trying to draw preference schedules, but I can't the labels of the second vertical axis to line up with the actual axis.. Any help would be great..

Code: Select all

\documentclass{article}
\usepackage{pstricks-add}
\newcounter{lC}
\setcounter{lC}{1}

\begin{document}

\psset{unit=.5in}
\begin{pspicture}(1,5)
  \psaxes[labels=none,xAxis=false,linecolor=red,linewidth=1.5pt]{->}(0.5,1)(0.5,5)
  \psforeach{\yL}{B,C,D,A}{\uput[180](0,\value{lC}){\yL}\stepcounter{lC}}
  \uput[90](.5,0){20}
\end{pspicture}

\begin{pspicture}(2,5)
  \psaxes[labels=none,xAxis=false,linecolor=red,linewidth=1.5pt]{->}(2,1)(2,5)
  \psforeach{\yL}{B,D,C,A}{\uput[180](2,\value{lC}){\yL}\stepcounter{lC}}
  \uput[90](2,0){22}
 
\end{pspicture}

\end{document}

Recommended reading 2024:

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

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

Post Reply