<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">%% 
%%  The LaTeX Graphics Companion, 2ed (first printing May 2007)
%% 
%%  Example 6-1-36 on page 329.
%% 
%%  Copyright (C) 2007 Michel Goossens, Frank Mittelbach, Denis Roegel, Sebastian Rahtz, Herbert Vo\ss 
%% 
%%  It may be distributed and/or modified under the conditions
%%  of the LaTeX Project Public License, either version 1.3
%%  of this license or (at your option) any later version.
%% 
%%  See http://www.latex-project.org/lppl.txt for details.
%% 

\documentclass{ttctexa}
\pagestyle{empty}
\setcounter{page}{6}
\setlength\textwidth{159.83385pt}

\makeatletter
\def\pserrorLine{\pst@object{pserrorLine}}
\def\pserrorLine@i(#1)#2#3{\begingroup
  \use@par \pst@getcoor{#1}\pst@tempA
  \def\ps@errorMin{#2}\def\ps@errorMax{#3}%
  \psline{|-|}(! /yDot \pst@tempA exch pop \pst@number\psyunit div def
                 /xDot \pst@tempA pop \pst@number\psxunit div def
                 xDot yDot \ps@errorMin\space add )
              (! /yDot \pst@tempA exch pop \pst@number\psyunit div def
                 /xDot \pst@tempA pop \pst@number\psxunit div def
                 xDot yDot \ps@errorMax\space add)
  \endgroup}
\def\GetCoordinates#1{\expandafter\GetCoordinates@i#1}
\def\GetCoordinates@i#1{\GetCoordinates@ii#1}
\def\GetCoordinates@ii D #1 D #2 D #3 D #4 {%
  \DoCoordinate{#1}{#2}%
  \pserrorLine[linecolor=blue, linewidth=1.5pt](#1,#2){#3}{#4}%
  \@ifnextchar D{\GetCoordinates@ii}{}}
\makeatother
\StartShownPreambleCommands
\usepackage{pstricks,pst-plot} \SpecialCoor
% \GetCoordinates definition as above
\newcommand*\DoCoordinate[2]{\psdot(#1,#2)}
\StopShownPreambleCommands
\begin{document}
\readdata{\Data}{pstricks/dataError.dat}
\psset{dotscale=2,unit=0.75}
\begin{pspicture}(-1,-2)(5,5.5)
  \psaxes(0,0)(-1,-2)(5,5)
  \GetCoordinates{\Data}
\end{pspicture}
\end{document}
</pre></body></html>