[pstricks] log-log-plot

Poul Riis Poul.Riis at skolekom.dk
Tue Feb 5 22:42:47 CET 2008


Is there a way to make a log-log-plot more automatically than in the
example below? And make it look more closely identical to the well-known
log-log-paper?
Why is the y-axis black, not red?

Yours,
Poul Riis


\documentclass[a4paper,12pt]{article}
\usepackage{inputenc}
\usepackage[T1]{fontenc}
\usepackage[english]{babel}
\usepackage[dvipsnames,svgnames,x11names]{xcolor}
\usepackage{pstricks-add}
\usepackage{geometry}

\newcommand{\loglogplot}[4]{\pscircle*[linecolor=#4](!#1 log #2 log){#3pt}}
\newcommand{\loglogplotlabeled}[5]{\pscircle*[linecolor=#4](!#1 log #2
log){#3pt}\uput{5pt}[0](!#1 log #2 log){\color{#4}#5}}

\pagestyle{empty} \topmargin=0cm \textwidth=17.0cm
\textheight=25.5cm \hoffset=-1.0cm \tolerance=5000 \hbadness=5000
\headheight=15pt
\pretolerance=2500
\parindent      =    0em

\begin{document}
\begin{center}
\psset{unit=4cm}
\pspicture(-1.15,-0.15)(1,3)
\psaxes[logLines=x,logLines=all,xticksize=0 3, yticksize=0
2,xsubticksize=1,ysubticksize=1,xylogBase=10,tickcolor=Red3,subtickcolor=Red1,tickwidth=1pt,xsubticks=10,ysubticks=10,labels=none](-1,0)(1,3)
\tiny
\multido{\n=1+1}{6}{\uput{3pt}[180](!1 neg \n\space log){\n}}
\uput{3pt}[180](!1 neg 8 log){8}
\multido{\n=10+10}{6}{\uput{3pt}[180](!1 neg \n\space log){\n}}
\uput{3pt}[180](!1 neg 80 log){80}
\multido{\n=100+100}{6}{\uput{3pt}[180](!1 neg \n\space log){\n}}
\uput{3pt}[180](!1 neg 800 log){800}
\uput{3pt}[180](!1 neg 1000 log){1000}
\multido{\n=1+1}{6}{\uput{3pt}[270](!\n\space log 0){\n}}
\uput{3pt}[270](!8 log 0){8}
\uput{3pt}[270](!10 log 0){10}
\multido{\n=0.2+0.2}{4}{\uput{3pt}[270](!\n\space log 0){\n}}
\uput{3pt}[270](!0.1 log 0){0.1}
\footnotesize
\uput{3pt}[270](!1 log 0.1 neg){Radius of orbit (mill. km)}
\uput{18pt}[180]{90}(!0.1 log 50 log){Siderical time of revolution (days)}
\loglogplotlabeled{0.422}{1.76914}{2.0}{Green1}{Io}
\loglogplotlabeled{0.671}{3.55118}{2.0}{Green2}{Europa}
\loglogplotlabeled{1.070}{7.15455}{2.0}{Green3}{Ganymede}
\loglogplotlabeled{1.883}{16.68902}{2.0}{Green4}{Callisto}
\endpspicture
\end{center}
\end{document}




More information about the PSTricks mailing list