0

Feeding the file mwe.tex containing

\documentclass{standalone}
\usepackage{pst-plot}
\begin{document}%
\begin{pspicture}(-1,-1.6)(1.6,1.6)
  \psaxes[logLines=y,ylogBase=10,ysubticks=0]{->}(0,0)(0,-1.5)(1.5,1.5)
\end{pspicture}%
\end{document}

to latex mwe && dvipdf -dALLOWPSTRANSPARENCY mwe yields

unwished output

As you see, the zero overlaps the vertical axis, which is unpleasant. Back in 2017, the zero was not printed; there has been a change since then.

Following http://tex.stackexchange.com/a/632377 , I tried

\documentclass{standalone}
\usepackage{pst-plot}
\begin{document}%
\begin{pspicture}(-1,-1.6)(1.6,1.6)
  \psaxes[logLines=y,ylogBase=10,ysubticks=0,showorigin=false]{->}(0,0)(0,-1.5)(1.5,1.5)
  \psyTick[yticksize=0](0){10^0}
\end{pspicture}%
\end{document}

which gives a better outcome:

wished output

However, the typesetting is somewhat cumbersome: we add a tick with a label but set the size of the tick to zero.

  1. Is there a cleaner solution, and, if so, what would it be?

  2. Why is there no horizontal line at 10^{-1}? How to get it?

1 Answers1

1

It makes no sense to me to have the x axis at 10^0. I'D USE

\documentclass{standalone}
\usepackage{pst-plot}
\begin{document}%
\begin{pspicture}(-1,-1.6)(1.6,1.6)
  \psaxes[logLines=y,ylogBase=10,ysubticks=0,showorigin=false,Oy=-1]{->}(0,-1)(1.5,1.5)
  \psyTick[yticksize=0](0){10^0}
  \psyTick[yticksize=0](-1){10^{-1}}
\end{pspicture}
\end{document}

enter image description here

If you still want it there use xAxis=false and yAxis=false and write independent x/y axes, for example:

\documentclass[border=5mm]{standalone}
\usepackage{pst-plot}
\begin{document}%
\begin{pspicture}(-0.5,-2.5)(5.5,5.5)
  \psaxes[logLines=y,ylogBase=10,ticksize=0 5,ysubticks=0,xAxis=false,Oy=-2]{->}(0,-2)(1.5,5)
  \psaxes[yAxis=false,showorigin=false]{->}(0,0)(5,5)
\end{pspicture}
\end{document}

enter image description here

user187802
  • 16,850
  • In my concrete (not minimal-working-example) usage case, which I have not shown here, the y values range between 10^{-2} and 10^5. I prefer to have the x axis somewhere inside rather than at the bottom, and y = 10^0 is a natural choice for the position of the x axis. –  Feb 02 '22 at 18:17
  • @GeekestGeek: see edited answer – user187802 Feb 02 '22 at 20:12
  • Thx! The number 1.5 in \psaxes[logLines=y,ylogBase=10,ticksize=0 5,ysubticks=0,xAxis=false,Oy=-2]{->}(0,-2)(1.5,5) puzzles me: it should probably be either 0 or 5. –  Feb 03 '22 at 00:44