1

Feeding

\documentclass{article}
\pagestyle{empty}
\usepackage{pst-all}
\begin{document}
%\renewcommand{\psvlabel}[1]{#1000}%%% the label is appended with 000, i.e., is printed as thousands. Unfortunately, this append 000 also to zero. Perhaps, we could write “if #1=0 then 0 else #1000” as the body of the macro \psvlabel, but I've failed to code this conditional statement in (La)TeX properly so far.
\begin{pspicture}(-2,-1)(1,4.5)
  \psaxes[Dy=25,dy=.4cm,xAxis=false]{->}(0,0)(107,4.5)
\end{pspicture}
\end{document}

to latex followed by dvips yields

output

How to get the numbers 0, 25000, 50000, … 250000 instead of 0, 25, 50, … 250 as labels of the ticks on the vertical axis? About 12 years ago, saying Dy=25000 instead of Dy=25 did the job, but now we get “! Dimension too large“ if we do so.

Btw., we DO want to compile via latex+dvips, DO want to have a zero label, do NOT want an exponential notation (0, 25⋅10³, 50⋅10³, …, 250⋅10³), and do NOT want a TikZ solution.

2
  • 1
    \makeatletter \def\pst@@@vlabel#1{#1\ifnum#1=0\else000\fi} \makeatother would probably work. Commented Dec 8, 2022 at 23:55
  • @JasperHabicht It does!!! Thx!!!
    – user282514
    Commented Dec 8, 2022 at 23:58

1 Answer 1

1

Another possibility:

\documentclass{article}
\pagestyle{empty}
\usepackage{pst-all}
\begin{document}
\begin{pspicture}(-2,-1)(1,4.5)
\psaxes[ylabelFontSize=\scriptstyle,ylabelFactor=000,showorigin=false,
        Dy=25,dy=0.4cm,xAxis=false]{->}(0,0)(107,4.5)
\psyTick(0){\scriptstyle0}             
\end{pspicture}
\end{document}

enter image description here

and this: ylabelFactor=\,000 looks nicer:

enter image description here

1
  • Thx! In financial English texts, I think, you could probably wish to say ylabelFactor={,000} instead of ylabelFactor=\,000. In financial German text, you could probably use ylabelFactor=.000. Anyway, I'm typesetting maths rather than finances, so 000 is perfect. \psyTick(0){\scriptstyle0} is news to me; thx again!
    – user282514
    Commented Dec 12, 2022 at 18:02

You must log in to answer this question.