semilog axis on data plots

Herbert Voss Herbert.Voss at fu-berlin.de
Tue Jul 30 06:54:36 CEST 2019



Am 30.07.19 um 04:23 schrieb Djones9976 via texhax:
> I am using the following program to generate a graph with logarithmic 
> scale on the y-axis shown in the attached picture.  In this figure, 
> the scaled x-axis should appear at the bottom not at the 10^0 line, 
> the last two decades should have grid lines and the grid lines should 
> not extend past the x=1 point on the abscissa.   I have tried 
> everything to no avail.   Any suggestions or help will be appreciated.
>

it could be a good idea, if you tried your example code first by 
yourself ... ;-)


\documentclass{article}
\usepackage{pst-plot,pstricks-add}
\pagestyle{empty}

\def\dataX{%
-1.0  0.555
-.80  0.14
-.60  0.21
-.40  2.9
-.20  29
0.00    21
.20     15.1
.40     19
.60     50
.80     175
1.00    650
}

\begin{document}
\psset{xunit=6cm, yunit=2cm}%
\begin{pspicture}(-1,-2)(1,5)
\psaxes[linewidth=2pt,axesstyle=frame,Ox=-1, Oy=-2, Dx=0.2, ylogBase=10,
     tickcolor=gray,ysubticks=10,logLines=y,subtickcolor=gray,
     xticksize=0 7,%  -2 .. 5
     yticksize=0 2 %  -1 .. 1
](-1,-2)(1,5)
\pstScalePoints(1,1){}{log}
\listplot[linewidth=2pt,linecolor=red]{\dataX}
\end{pspicture}

\end{document}



Herbert


-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bildschirmfoto 2019-07-30 um 06.52.30.png
Type: image/png
Size: 71476 bytes
Desc: not available
URL: <https://tug.org/pipermail/texhax/attachments/20190730/d9807c6f/attachment-0001.png>


More information about the texhax mailing list