[pstricks] \psaxes: showorigin=true and origin label overlaps axis

Herbert Voss Herbert.Voss at fu-berlin.de
Wed Feb 2 13:51:53 CET 2022



Am 02.02.22 um 01:21 schrieb Peter Mueller:
> Let me drive your attention to the following issue with \psaxes, also 
> described at http://tex.stackexchange.com/questions/632217 
> <http://tex.stackexchange.com/questions/632217> .
>
> Feeding mwe.tex containing
>
> \documentclass{standalone}
> \usepackage{pst-plot}
> \begin{document}%
> \begin{pspicture}(-1,-1.6)(1.6,1.6)
> \psaxes{->}(0,0)(0,-1.5)(1.5,1.5)

\psaxes[showorigin=false]{->}(0,0)(0,-1.5)(1.5,1.5)
\psyTick(0){0}

Herbert

> \end{pspicture}%
> \end{document}
>
> to
> latex mwe && dvipdf -dALLOWPSTRANSPARENCY mwe
> results in the lower 0 overlapping the vertical axis:
> You could also use
> dvips mwe
> instead of
> dvipdf -dALLOWPSTRANSPARENCY mwe
> and get the same result.
> There has been some (apparently) silent change: in 2017, the output 
> had only the left, nonoverlapping 0 but not the lower, overlapping 0.
> Moreover, PSTricks User's Guide clearly states:
>
>     *showorigin=true/false*
>     *Default: true*
>     If true, then labels are placed at the origin, as long as the
>     label doesn’t end up on one of the axes. If false, the labels are
>     never placed at the origin.
>
> The quoted description is formally-logically open on the output when 
> showorigin is true and a label ends up on one of the axes. Still, in 
> this case, a typical reader would probably expect that the label is 
> not placed at the origin.
>
> How to get the old behavior back, i.e., such that the left, 
> nonoverlapping label 0 is shown but the lower, overlapping label 0, is 
> not shown?
> (Of course, one could resort to
> \psaxes[showorigin=false]{->}(0,0)(0,-1.5)(1.5,1.5)
> \uput[l](-.14;0){$0$}
> However, -0.14 is a (probably, font-dependent) guess here to ensure 
> that the left 0 is aligned with the other labels of the vertical axis. 
> It would be much more helpful if the original 
> \psaxes{->}(0,0)(0,-1.5)(1.5,1.5) or 
> \psaxes[showXorigin=false,showYorigin=true]{->}(0,0)(0,-1.5)(1.5,1.5) 
> would do the job).
>
> Thanks in advance,
> Peter



More information about the PSTricks mailing list.