%% 
%%  A DANTE-Edition example
%% 
%%  Example 15-04-4 on page 215.
%% 
%%  Copyright (C) 2011 Herbert Voss
%% 
%%  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.
%% 
%% 
%% ==== 
% Show page(s) 1
%% 
\documentclass[]{article}
\pagestyle{empty}
\setlength\textwidth{177.70511pt}
\setlength\parindent{0pt}
\begin{filecontents*}{bubble.data}
100 1 200 5 300 18 400 2 500 4 600 4
700 5 800 6 900 8 1000 10 1100 13 1200 14 1300 20 1400 19
1500 21 1600 22 1700 25 1800 29 1900 32 2000 34 2100 38 2200 42
2300 46 2400 50 2500 57 2600 57 2700 62 2800 67 2900 72 3000 76
3100 81 3200 91 3300 94 3400 98 3500 103 3600 110 3700 120
3800 122 3900 128 4000 134 4100 146 4200 150 4300 158 4400 167
4500 170 4600 180 4700 192 4800 193 4900 206 5000 209 5100 218
5200 232 5300 235 5400 249 5500 265 5600 296 5700 285 5800 283
5900 335 6000 310 6100 493 6200 338 6300 359 6400 358 6500 385
6600 593 6700 386 6800 409 6900 421 7000 627 7100 591 7200 435
7300 449 7400 457 7500 473 7600 482 7700 498 7800 508 7900 524
8000 535 8100 547 8200 559 8300 578 8400 592 8500 605 8600 617
8700 630 8800 650 8900 661 9000 672 9100 694 9200 703 9300 722
9400 733 9500 752 9600 772 9700 784 9800 799 9900 819 10000 831
\end{filecontents*}
\begin{filecontents*}{select.data}
100 0 200 2 300 4 400 8 500 12 600 18
700 2 800 2 900 4 1000 4 1100 4 1200 6 1300 6 1400 8
1500 8 1600 9 1700 12 1800 12 1900 16 2000 15 2100 18 2200 18 2300 21 2400 22
2500 27 2600 30 2700 28 2800 30 2900 32 3000 35 3100 44 3200 43 3300 48
3400 48 3500 50 3600 53 3700 52 3800 55 3900 59 4000 63 4100 64 4200 84
4300 72 4400 74 4500 85 4600 80 4700 92 4800 98 4900 99 5000 95 5100 106
5200 107 5300 122 5400 113 5500 122 5600 126 5700 132 5800 136 5900 136
6000 150 6100 150 6200 153 6300 158 6400 168 6500 164 6600 173 6700 190
6800 183 6900 198 7000 197 7100 202 7200 216 7300 211 7400 225 7500 223
7600 242 7700 235 7800 248 7900 248 8000 268 8100 255 8200 273 8300 272
8400 292 8500 289 8600 295 8700 306 8800 307 8900 323 9000 316 9100 335
9200 346 9300 359 9400 348 9500 367 9600 374 9700 375 9800 383 9900 404
\end{filecontents*}


\usepackage{pstricks,pst-plot}

\begin{document}
\psset{xunit=0.0004cm,yunit=0.004cm}
\begin{pspicture}(0,-50)(10000,1050)
 \readdata{\bubble}{bubble.data}
 \readdata{\select}{select.data}
 \psaxes[ticks=none,labels=none]{->}%
   (10000,1000)[elements,-90][time,0]
 \dataplot[plotstyle=line]{\bubble}
 \dataplot[linestyle=dotted,
  plotstyle=line,linewidth=2pt]{\select}
  \rput[l](4500,800){Bubble sort}
  \rput[l](7500,180){Select sort}
\end{pspicture}
\end{document}
