% #1 length of unit in cm
% #2 number of units
% #3 length of lines in cm
\def\linlines#1#2#3{%
  \multido{\i=0+1}{#2}{%
    \moveto(! #1 \i\space 1 add mul -.5)\rlineto(! 0 0.5 #3 add)
    \stroke
    \gsave
    \psset{linewidth=0pt}%
    \multido{\n=1+1}{4}{%
      \moveto(! #1 0.\n\space \i\space add mul 0)\rlineto(! 0 #3)
      \moveto(! #1 0.\n\space 0.5 add \i\space add mul 0)\rlineto(! 0 #3)
    }%
    \moveto(! #1 0.5 \i\space add mul -.3)\rlineto(! 0 0.3 #3 add)
    \stroke
    \grestore
  }%
}%

\def\horlinscale#1#2#3{}%

\def\verlinscale#1#2#3{}%

\def\normlines#1#2#3{%
  %\translate(0.5 0)%
  \moveto(! -3.290526731491895 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! -3.090232306167814 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! -2.878161739095483 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! -2.575829303548901 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! -2.326347874040841 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! -2.053748910631823 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! -1.644853626951473 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! -1.281551565544600 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! -0.8416212335729142 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! -0.5244005127080408 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! -0.2533471031357998 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 0 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 3.719016485455681 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 3.290526731491895 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 3.090232306167814 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 2.878161739095483 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 2.575829303548901 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 2.326347874040841 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 2.053748910631823 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 1.644853626951473 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 1.281551565544600 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 0.8416212335729142 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 0.5244005127080408 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \moveto(! 0.2533471031357998 7.438032970911362 div 0.5 add #1 mul -0.5)\rlineto(! 0 0.5 #3 add)
  \stroke
  \gsave
  \psset{linewidth=0pt}%
  \moveto(! -3.540083799206145 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -3.431614403623269 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -3.352794780504829 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -3.238880118352978 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -3.194651053763286 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -3.155906757921816 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -3.121389149359866 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -2.967737925341783 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -2.747781385444993 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -2.652069807902196 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -2.512144327930462 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -2.457263390205437 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -2.408915545815461 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -2.365618126864293 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -2.257129244486225 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -2.197286376641052 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -2.144410620911840 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -2.096927429164342 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -1.880793608151251 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -1.750686071252170 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -1.554773594596854 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -1.475791028179171 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -1.405071560309633 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -1.340755033690216 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -1.226528120036610 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -1.174986792066090 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -1.126391129038801 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -1.080319340814956 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -1.036433389493790 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.9944578832097532 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.9541652531461944 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.9153650878428140 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.8778962950512286 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.7721932141886847 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.7063025628400875 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.6433454053929170 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.5828415072712162 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.4676987991145082 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.4124631294414048 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.3584587932511937 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.3054807880993973 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.2018934791418509 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.1509692154967773 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.1004337205114698 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! -0.05015358346473362 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 3.540083799206145 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 3.431614403623269 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 3.352794780504829 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 3.238880118352978 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 3.194651053763286 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 3.155906757921816 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 3.121389149359866 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 2.967737925341783 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 2.747781385444993 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 2.652069807902196 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 2.512144327930462 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 2.457263390205437 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 2.408915545815461 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 2.365618126864293 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 2.257129244486225 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 2.197286376641052 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 2.144410620911840 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 2.096927429164342 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 1.880793608151251 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 1.750686071252170 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 1.554773594596854 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 1.475791028179171 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 1.405071560309633 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 1.340755033690216 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 1.226528120036610 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 1.174986792066090 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 1.126391129038801 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 1.080319340814956 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 1.036433389493790 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.9944578832097532 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.9541652531461944 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.9153650878428140 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.8778962950512286 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.7721932141886847 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.7063025628400875 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.6433454053929170 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.5828415072712162 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.4676987991145082 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.4124631294414048 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.3584587932511937 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.3054807880993973 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.2018934791418509 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.1509692154967773 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.1004337205114698 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \moveto(! 0.05015358346473362 7.438032970911362 div 0.5 add #1 mul 0)\rlineto(! 0 #3)
  \stroke
  \grestore
}%

\def\vernormscale#1#2#3{}%

\def\hornormscale#1#2#3{
  %\pscustom{%
  %\translate(0,3.719016485455681)%
  \rput[r](! -0.55 -3.719016485455681 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 0,01}}%
  \rput[r](! -0.55 -3.290526731491895 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 0,05}}%
  \rput[r](! -0.55 -3.090232306167814 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 0,10}}%
  \rput[r](! -0.55 -2.878161739095483 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 0,20}}%
  \rput[r](! -0.55 -2.575829303548901 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 0,50}}%
  \rput[r](! -0.55 -2.326347874040841 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 1,00}}%
  \rput[r](! -0.55 -2.053748910631823 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 2,00}}%
  \rput[r](! -0.55 -1.644853626951473 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 5,00}}%
  \rput[r](! -0.55 -1.281551565544600 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 10,00}}%
  \rput[r](! -0.55 -0.8416212335729142 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 20,00}}%
  \rput[r](! -0.55 -0.5244005127080408 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 30,00}}%
  \rput[r](! -0.55 -0.2533471031357998 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 40,00}}%
  \rput[r](! -0.55 0 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 50,00}}%
  \rput[r](! -0.55 0.2533471031357998 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 60,00}}%
  \rput[r](! -0.55 0.5244005127080408 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 70,00}}%
  \rput[r](! -0.55 0.8416212335729142 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 80,00}}%
  \rput[r](! -0.55 1.281551565544600 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 90,00}}%
  \rput[r](! -0.55 1.644853626951473 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 95,00}}%
  \rput[r](! -0.55 2.053748910631823 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 98,00}}%
  \rput[r](! -0.55 2.326347874040841 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 99,00}}%
  \rput[r](! -0.55 2.575829303548901 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 99,50}}%
  \rput[r](! -0.55 2.878161739095483 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 99,80}}%
  \rput[r](! -0.55 3.090232306167814 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 99,90}}%
  \rput[r](! -0.55 3.290526731491895 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 99,95}}%
  \rput[r](! -0.55 3.719016485455681 7.438032970911362 div 0.5 add #1 mul ){\hbox{\tiny 99,99}}%
  %}%
}%

% #1 length of unit in cm
% #2 number of units
% #3 length of lines in cm
\def\explines#1#2#3{%
  \multido{\i=0+1}{#2}{%
    \multido{\n=2+1}{8}{%
      \moveto(! #1 \n\space log \i\space add mul -.5)\rlineto(! 0 0.5 #3 add)
    }%
    \moveto(! #1 \i\space 1 add mul -.5)\rlineto(! 0 0.5 #3 add)
    \stroke
    \gsave
    \psset{linewidth=0pt}%
    \moveto(! #1 1.5 log \i\space add mul -.3)\rlineto(! 0 0.3 #3 add)
    \multido{\n=1+1}{4}{%
      \moveto(! #1 1.\n\space log \i\space add mul 0)\rlineto(0,#3)
      \moveto(! #1 1.\n\space 0.5 add log \i\space add mul 0)\rlineto(0,#3)
      \moveto(! #1 2 2 0.\n\space mul add log \i\space add mul 0)\rlineto(0,#3)
      \moveto(! #1 3 2 0.\n\space mul add log \i\space add mul 0)\rlineto(0,#3)
    }%
    \multido{\n=4+1}{6}{%
      \moveto(! #1 \n.5 log \i\space add mul 0)\rlineto(0,#3)
    }%
    \stroke
    \grestore
  }%
}%

% #1 length of unit in cm
% #2 number of units
% #3 length of lines in cm
\def\verexpscale#1#2#3{%
  \rput[t](! 0 -.55){\hbox{\tiny 10\rlap{$\scriptstyle^{\scriptscriptstyle\ldots}$}}}%
  \multirput(#1,0){#2}{%
    \multido{\n=2+1}{8}{%
      \rput[t](! #1 \n\space log mul -.55){\hbox{\tiny \n}}%
    }%
    \rput[t](! #1 -.55){\hbox{\tiny 10\rlap{$\scriptstyle^{\scriptscriptstyle\ldots}$}}}%
  }%
}%

% #1 length of unit in cm
% #2 number of units
% #3 length of lines in cm
\def\horexpscale#1#2#3{%
  \rput[r](! -0.55 0){\hbox{\tiny 10$\scriptstyle^{\scriptscriptstyle\ldots}$}}%
  \multirput(0,#1){#2}{%
    \multido{\n=2+1}{8}{%
      \rput[r](! -0.55 #1 \n\space log mul){\hbox{\tiny \n}}%
    }%
    \rput[r](! -0.55 #1){\hbox{\tiny 10$\scriptstyle^{\scriptscriptstyle\ldots}$}}%
  }%
}%

\def\horlines#1#2#3#4{%
  \FPdiv\out{#2}{#3}%
  \csname hor#1scale\endcsname\out{#3}{#4}%
  \pscustom{%
    \gsave
    \swapaxes
    \psset{linewidth=0.5pt}%
    \psline(0,-.5)(0,#4) % y-axis
    \csname #1lines\endcsname\out{#3}{#4}%
    \grestore
  }%
}%

\def\verlines#1#2#3#4{%
  \FPdiv\out{#2}{#3}%
  \csname ver#1scale\endcsname\out{#3}{#4}%
  \pscustom{%
    \gsave
    \psset{linewidth=0.5pt}%
    \psline(0,-.5)(0,#4) % y-axis
    \csname #1lines\endcsname\out{#3}{#4}%
    \grestore
  }%
}%

% horizontal size (cm)
% horizontal type (lin: linear, exp: logarithmic, norm: normal distribution)
% horizontal amount
% vertical size (cm)
% vertical type (lin: linear, exp: logarithmic, norm: normal distribution)
% vertical amount
\def\papier#1#2#3#4#5#6{%
  {%
    \psset{unit=1cm}%
    \pspicture(0,0)(#1,#4)
      \verlines{#2}{#1}{#3}{#4}%
      \horlines{#5}{#4}{#6}{#1}%
    \endpspicture
  }%
}%
\def\extpapier#1#2#3#4#5#6#7{%
  {%
    \psset{unit=1cm}%
    \pspicture(0,0)(#1,#4)
      \verlines{#2}{#1}{#3}{#4}%
      \horlines{#5}{#4}{#6}{#1}%
      #7
    \endpspicture
  }%
}%


