[pstricks] Labels on loglogplot

Poul Riis Poul.Riis at skolekom.dk
Fri Apr 10 18:05:11 CEST 2009


The labeling of the loglogplots below seems to be wrong - or am I doing
something wrong?
On the upper plot I expect x to range from 10^-2 to 10^0 and y to range
from 10^-1 to 10^2.

Poul Riis





\documentclass{article}
\usepackage{filecontents}
\usepackage{amsmath}
\usepackage[dvips,svgnames,x11names]{xcolor}
\usepackage{pstricks-add}
\usepackage{geometry}

\topmargin=-2cm
\textheight=27cm


\begin{filecontents*}{doublelog.dat}
0.0762 61.65
0.127 24.54
0.24 5.715
0.25 6.20
0.405 2.29
0.8128 0.5776
\end{filecontents*}

\begin{document}

Resistance of equally long metal wires with varying diameters (students'
measurements).\\[1cm]

\readdata{\doublelogdata}{doublelog.dat}


\pstScalePoints(1,1){log}{log}
\psset{llx=-0.5cm,lly=-0.5cm,xAxisLabel=$D$/mm,yAxisLabel=$R/\Omega$,dotsize=3pt}
\psgraph[xylogBase=10](-2,-1)(0,2){6cm}{9cm}
\psaxes[logLines=all,tickcolor=Red2,subtickcolor=Orange,tickwidth=1pt,ysubticks=10,labels=none,xsubticks=10,xticksize=0
3,yticksize=0 2,subticksize=1](-2,-1)(0,2)
\listplot[linecolor=Blue2, linewidth=2pt,
showpoints=true,linestyle=none]{\doublelogdata}
\listplot[plotstyle=LSM,linecolor=green]{\doublelogdata}
\psline[linestyle=dashed,linewidth=0.25pt](-1.5,2)(0,-1)
\endpsgraph\\[1cm]

\pstScalePoints(1,1){dup mul 4 div 3.14159 mul log}{log}
\psset{llx=-0.5cm,lly=-0.5cm,xAxisLabel=$A/\text{mm}^2$,yAxisLabel=$R/\Omega$}
\psgraph[xylogBase=10](-3,-1)(0,2){9cm}{9cm}
\psaxes[logLines=all,tickcolor=Red2,subtickcolor=Orange,tickwidth=1pt,ysubticks=10,labels=none,xsubticks=10,xticksize=0
3,yticksize=0 3,subticksize=1](-3,-1)(0,2)
\listplot[linecolor=Blue2, linewidth=2pt,
showpoints=true,linestyle=none]{\doublelogdata}
\listplot[plotstyle=LSM,linecolor=green]{\doublelogdata}
\psline[linestyle=dashed,linewidth=0.25pt](-3,2)(0,-1)
\endpsgraph

\end{document}



More information about the PSTricks mailing list