3

Consider the following example:

\documentclass{article}

\usepackage{pst-plot}

\begin{document}

\begin{figure}
\def\dx{2.5}
\def\dy{1}
\makeatletter
  \renewcommand*\pst@@@hlabel[1]{$\frac{1}{2}U_{#1}$} % X-labels
  \renewcommand*\pst@@@vlabel[1]{$\frac{1}{5}U_{#1}$} % Y-labels
\makeatother
\centering
  \begin{pspicture}(-1,-0.85)(11.55,5.5)
    \psaxes[dx = \dx, dy = \dy]{->}(11,5)[$X$,0][$Y$,90]
    \multido{\rA = \dy+\dy, \rB = \dx+\dx, \iA = 70+-10}{4}{
      \psline[linecolor = blue!\iA](0,\rA)(\rB,0)
    }
  \end{pspicture}
 \caption{Indifferenskort med linjebundt.}
\end{figure}

\end{document}

output

How do I remove the first label on each axis, i.e., the ones at the origin?

P.S. I want the indices of U to start at 1 instead of 0 so I don't want label offset.

1 Answer 1

2

We have different versions of pst-plot (how it is possible?!), so I can't copy your beginning version. However, it seems that showorigin=false should give you the desired result. If no, I will remove my answer.

\documentclass{article}

\usepackage{pst-plot}

\begin{document}

\begin{figure}
\centering
 \def\dx{2.5}
 \def\dy{1}
 \def\dy{1.0}
 \makeatletter
   \def\pst@@@hlabel#1{$\frac{1}{2}U_{#1}$} % X-labels
   \def\pst@@@vlabel#1{$\frac{1}{5}U_{#1}$} % Y-labels
 \makeatother
  \begin{pspicture}(-0.5,-0.5)(11.5,5.5)
    \psaxes[dx=\dx, dy=\dy, showorigin = false]{->}(11,5)[$X$,0][$Y$,90]
    \multido{\rA = \dy+\dy, \rB = \dx+\dx, \iA = 70+-10}{4}{
      \psline[linecolor=blue!\iA](0,\rA)(\rB,0)
    }
  \end{pspicture}
 \caption{Indifferenskort med linjebundt.}
\end{figure}

\end{document}

output

Update (by Svend Tveskæg)

A small generalization of the code:

\documentclass{article}

\usepackage{pst-plot}

\begin{document}

\begin{figure}
\centering
 \psset{unit = 0.5}
 \def\dx{5}
 \def\dy{2}
 \makeatletter
   \def\pst@@@hlabel#1{$\frac{1}{\dy}U_{#1}$} % X-labels
   \def\pst@@@vlabel#1{$\frac{1}{\dx}U_{#1}$} % Y-labels
 \makeatother
  \begin{pspicture}(-1.8,-1.5)(22.9,10.9)
    \psaxes[dx=\dx, dy=\dy, showorigin = false]{->}(22,10)[$X$,0][$Y$,90]
    \multido{\rA = \dy+\dy, \rB = \dx+\dx, \iA = 70+-10}{4}{
      \psline[linecolor=blue!\iA](0,\rA)(\rB,0)
    }
  \end{pspicture}
 \caption{Indifferenskort med linjebundt.}
\end{figure}

\end{document}
3

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .