<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-35 on page 327.
%% 
%%  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{135.83385pt}
\StartShownPreambleCommands
\usepackage{pstricks,pst-plot}
\makeatletter
\newcommand\plotValues[1]{\pscustom{\code{%
     /xOffset 5 def /yOffset -2 def
     /Helvetica findfont 10 scalefont setfont
     /Varray [ #1 ] def  /cnt 0 def
     Varray length 2 div cvi {
       /x Varray cnt get def  /y Varray cnt 1 add get def
       x \pst@number\psxunit mul xOffset add
       y \pst@number\psyunit mul yOffset add
       moveto x 10 string cvs show
       /cnt cnt 2 add def } repeat}}}
\makeatother
\StopShownPreambleCommands
\begin{document}
\begin{pspicture}(3.5,0.5)(8,-5)
  \psaxes[Ox=4]{-&gt;}(4,0)(8,-5)
  \newcommand*\dataV{ 6.8 -1 5.9 -2 5.4 -3 5.7 -4 6.2 -5 }
  \listplot[plotstyle=curve,showpoints=true,
    linecolor=blue]{\dataV}
  \plotValues{\dataV}
\end{pspicture}
\end{document}
</pre></body></html>