[pstricks] Metric Stick

Herbert Voss Herbert.Voss at FU-Berlin.DE
Fri May 1 08:23:23 CEST 2009


David Arnold schrieb:

> Has anyone drawn a meter stick, a yardstick, or a ruler (inches) that
> would be willing to share their code?


\documentclass[a3paper,landscape]{article}
\usepackage[T1]{fontenc}
\usepackage[dvips,margin=1cm]{geometry}
\usepackage{pstricks-add}
\pagestyle{empty}
\begin{document}
\def\pshlabel#1{\scriptsize$#1$}

\begin{pspicture}(0,-0.2)(10,1)
\psaxes[labelsep=2pt,yAxis=false,
  labelsep=3.25mm,ticksize=0 3mm,subticks=10,
  subticksize=0.5,tickcolor=black,
  subtickcolor=black!60,tickwidth=1pt,subtickwidth=0.5pt](35.01,0)
\multido{\nA=0+1}{14}{%
    \psline(\nA in,0)(\nA in,-3mm)%
    \uput{3pt}[-90](\nA in,-3mm){\scriptsize\nA}}
\uput[0](35,2mm){cm}
\multido{\rA=0.0+0.1}{138}{%
  \psline[linecolor=black!60](\rA in,0)(\rA in,-1.5mm)}
\uput[0](35,-2mm){inch}
\end{pspicture}


\end{document}


Herbert



More information about the PSTricks mailing list