Running S OLD ...
> printer(width=80,length=24)
> prefix("plot.")
> $Random.seed_c(57,0,3,0,0,0,49,16,0,0,0,0)	# to initialize at same spot
> x_rnorm(20); y_rnorm(20)
> plot(x,y,xlab="X-Label",main="A Main Title",sub="Sub Title")
> plot(x,type="h")	#high-density plot


                                    A Main Title

   2.0 ......................................................................
       .
   1.5 .                          *
       .               *                                          *
 p 1.0 .                        *
 l 0.5 .                         * *
 o     .      *              *                        *       *
 t 0.0 .                 *                               *
 .     .                 *     *
 y-0.5 .                              *                       *
  -1.0 .
       .
  -1.5 .    *                 *                *
       .                      *
  -2.0 ......................................................................
      -2            -1            0             1             2             3

                                      X-Label
                                     Sub Title

> plot(abs(x),abs(y),type="b",pch=".",lty=2,log="xy")	# log axes, plotting dots, dotted lines




     3 ......................................................................
       .
       .                                                            .
     2 .                                                        .   .
 p     .                        .                 .             .   .
 l     .                        .                 .             .   .
 o   1 .                        .                 .   .         .   .
 t     .                        .                 .   .         .   .
 .   0 .   .  .   .   .  .   .  .   .  .   .   .  .   .  .   .  .   .  .   .
 x     .          .   .  .   .      .  .   .   .         .             .   .
       .                 .   .             .             .                 .
    -1 .                                   .             .                 .
       .                                   .             .
       .                                   .
    -2 ......................................................................
       1   2  3   4   5  6   7  8   9  10 11  12  13 14  15 16  17 18  19  20




> points(abs(x),abs(y),mark=8)	# overplot with marks
Lines out of bounds X= -2.014244 Y= 0.2016971
Lines out of bounds X= -1.961739 Y= 0.1437261
Lines out of bounds X= -1.961739 Y= 0.259668
> abline(0,1)
> abline(h=1:4)
> series_ts(x,1958,12)
> ser2_ts(y,1957,4)
> plot(series)




  5.00 .... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... ... .
       ......................................................................
       ......................................................................
       ......................................................................
 p     ..                                   ..  ... ....... .........
 l1.00 ......................................................................
 o     .        ..  ... ... ..   ..................................
 t0.50 .        ... ... ... ... ... ... ...... ..  ......  .     ..
 .     .         . ... ... ... ... ... ................... ........
 y     .                                .......................  ..
       .                                ....         .     ......
       .                            ....             .  ..    ...
  0.10 .                         ...                ....
       .                     ....                   ...
  0.05 ......................................................................
     0.01              0.05    0.10              0.50   1.00              5.00

                                       plot.x


> tsplot(series,ser2);logo




     3 ......................................................................
       .
 p     .                                                       *
 l   2 *                                                   *
 o     .                      *               *
 t     .
 .   1 .                                          *
 s     .
 e   0 .   *  *                                         *
 r     .         *  *            *   *     *                      *
 i     .                *  *
 e  -1 .                                                             *
 s     .                                             *
       .                                *
    -2 ......................................................................
      1958      1958     1958      1958      1959      1959     1959      1959
      Jan       Apr       Jul       Oct      Jan       Apr       Jul       Oct



> tspoints(ser2,pch="#")	# overplot
> par(mfrow=c(2,2),oma=c(0,0,2,0))




     3 ......................................................................
       .
       .                                .
     2 .             .                 ..
       .             .      .      .  . .                 #
       .             .      .     ..  . .                 .     .#      #
     1 .             #      .     . . . .               .       . .    .
       #. .#        ..      .. # .  . . .              .    .      ..#.
     0 .              ..    ... ..  . # .              #    .  .
       .     .     .    #...#... ..#... .       #     .      ..
       .      #    .      ...  ..   .. . .     .     .        #
    -1 .        . .            ..   ..  . .       . .
       .         .#            ..    .   # . .     .#
       .                        .         .. #
    -2 ......................................................................
      1957         1958          1959          1960         1961          1962
                                                                          ......
                                                                          ......
                                                                          ..  ..
                                                                          ......
> plot(x,y,pch="o"); abline(rbiwt(x,y))
> plot(x,y,type="l")
> frame;frame	# should skip lower left corner
> plot(x,y,type="b",pch="X")
> mtext("Three different type parameters",outer=TRUE,side=3,line=.5,cex=1.5)
> par mfrow=c(1,1),oma=rep(0,4)	# back to normal

                         Three different type parameters


 p                                       p
 l                                       l
 o     .......o...o.............o....    o    ...............................
 t-2.0 ..oo....%o%ooo...o..oo.%......    %2.0 ...............................
 .                                       .                            .
 y    -2    -1     0    1     2     3    y    -2    -1    0     1     2     3

                   plot.x                                 plot.x



                                         p
                                         l
                                         o    ....X..X%.X%%.X......XX.%X.....
                                         %2.0 ...X......%.......X............
                                         .    -2    -1    0     1     2     3
                                         y
                                                          plot.x


> plot(x,y,type="n");text(x,y,seq(x))	# identifiers for points
> #identify(x,y,encode(seq(x)))	# test to see if identifiers match
> #lines(rd_rdpen(),lty=3)	# draw figure with graphic input
> pie(abs(x),main="A Pie Chart",encode("Slice",seq(x)))




   2.0 ......................................................................
       .
   1.5 .                          16
       .              20                                         18
 p 1.0 .                        5
 l 0.5 .                        19 2
 o     .      15            10                        8       1
 t 0.0 .                 7                              13
 .     .                 6     9
 y-0.5 .                              3                      17
  -1.0 .
       .
  -1.5 .   11                 4                14
       .                     12
  -2.0 ......................................................................
      -2            -1            0             1             2             3

                                       plot.x


> hist(x,angle=45,inside=FALSE)	# shaded histogram


                                  S A Pie Chart
                                % l         7     5
                                 % %        %  6 e 4 3
                                  e %   S  %  % %%ee%2
                                   109..%..l.% %ll%c
                                 S  ... c. SS...S%
                         S        %c ...%..  ....
                          lice 12.. e 1. 8. ....e 1
                                 .....1... .Slic .
                                 ice 13............
                               Sl.   ......S.. Slice 20
                                 .. 14.%  7 lic... Slic
                                ice..e .  1.  e .     e 19
                               Sl   ic.     . ..18
                                   Sl....e....
                                      %  c
                                     %   i
                                     c   l
                                    %    S
                                    S


> plot(density(x),type="l",main="Empirical Density Estimate")	# density plot





     7..                    ........
     6..                    ... .  .
       .                    . ..  ..
     5..                    ..  ....
       .                    . .... .
     4..                    ....  ..
       .                    ..  .. .
     3..             ........ ..  ..
       .             . . .. ..  ....
     2..             ....  .. .... .......             ...............
       .             ..  .. .... ..  . ...             ...... . .. ...
     1................ .. .... ..  ..................... .. .... ..  .
     0.................................................................
       .....................................................................
       -2           -1             0            1             2            3

                                       plot.x


> points(x,x*0,pch="o")	# with 1-dim scatter plot
> qqplot(x,y)


                             Empirical Density Estimate

   1.0 ......................................................................
       .
       .                       .
   0.8 .                      . .
       .                     .   .
   0.6 .                     .    ..
       .                 .  .      .
       .                ..  .      .                         ..
   0.4 .                . ..       .                        . .
       .                . ..       .                   ..   . .
       .  ......      ..  ..       .  .        ..    ..  .  .  .  .
   0.2 .  .    .     .     .        ...       . .    .    . .  . ..
       .  .    .     .               . .     .  .    .    . .   . .
   0.0 . .. o o ...... o %   o%ooooo  o ...... o......o  o .  %   o...
       ......................................................................
      -2            -1            0             1             2             3




> qqnorm(x)




   2.0 ......................................................................
       .
   1.5 .                                                          *
       .                                                      %
 p 1.0 .                                                 *
 l 0.5 .                                       *      *
 o     .                         ***  *
 t 0.0 .                       **
 .     .                      %
 y-0.5 .                 *   *
  -1.0 .
       .
  -1.5 .      *        * *
       .    *
  -2.0 ......................................................................
      -2            -1            0             1             2             3

                                       plot.x


> matplot(cbind(x,rev(x)),y,pch="AB")




     3 ......................................................................
       .
       .                                                                   *
     2 .                                                     *    *
 p     .                                              *  *
 l     .
 o   1 .                                           *
 t     .
 .   0 .                                    *  * *
 x     .                       * *  * * * *
       .                 *  *
    -1 .             *
       .        *
       .*
    -2 ......................................................................
      -2               -1                0                1                 2




> abline(h=y,lty=2)	# each line goes through 2 points!
> pardump("axp","usr")
Axis parameters (axp)   Side1 s e -2 3 5
Axis parameters (axp)   Side2 s e -2 2 8
User co-ords (usr)             -2 3 -2 2
> query("usr","cex","pin")

 $usr
       -2    3   -2    2
 $cex
       1
 $pin
      6.86667  2.30000
> usa(states=FALSE); box(5)




   2.0 ......................................................................
       .
   1.5 . ... ... ... ... ... ...B.A. ... ... ... ... ... ... ... ... ... ...
       . ... ... ... ..A ... ... ... .B. ... ... ... ... ... .B. .A. ... ...
   1.0 ... ... ... ... ... ... .A.B... ... ... ... ... ... ... ... ... ... ..
   0.5 ..........................%.%.........................................
       .....B.A........B.B...A........................A..B....A..............
   0.0 ... ... ... ... ..A ... ... ... ... ... B.. ...B..A ... ... ... ... ..
       .......B..........A....BA.............................................
  -0.5 ... ... ... ... ... ...B... ...A... ... ... ... ... ...A...B... ... ..
  -1.0 .
       .
  -1.5 .....A............B...BA................A..............B..............
       . ... ... ... ... ... .AB ... ... ... ... ... ... ... ... ... ... ...
  -2.0 ......................................................................
      -2            -1            0             1             2             3




> vvv_c(".CE 10","This is a test",
+ ".C 2","of the code for","constructing",".L 1.75",".C 3",".B 5","Vu-Graphs")
> vu(vvv)




       ......................................................................
       .....................................................................
       ....................................................................
       ...................................................................
       ..................................................................
       .....          .       ..                .. ..     ....
       .....          ..                                ...
       .....           ..                               ..
       .....            ..                              ..
       .....             .....                        ..
       ..................................................................
       ...................................................................
       ....................................................................
       .....................................................................
       ......................................................................





> bmat_matrix(runif(20),4,5)
> bmat_apply(bmat,2,"cumsum")	# add up cols to make divided bar heights
> bmat[,2]<- -bmat[,2]	# negate a column
> barplot(bmat,lines=3:6,angle=seq(20,80,20),names=encode(
+ "Bar",1:5),main="Bar graph")



                                 This is a test



                                 of the code for




                                  constructing






                                    %%%%%%%%%




> plclust(hclust(dist(bmat)))	# dendrogram


                                     Bar graph

     8..
       .                         ..........
     6..                         . . . . ..
       .                         . . . . .. ........... ...........
       .                         .......... .. . . . .. .. . . .  .
     4..                         ..  . . .. .. . . . .. ...........
       . ...........             .......... ........... . .  . .  .
     2.. ...........             .. .. .. . .  . . . .. ...........
       . ...........             .......... ........... ..  .  .  .
     0...............................................................
       .             ...........
       .             ...........
    -2..             ..  . . . .
       .             ...........
    -4..
            Bar 1       Bar 2      Bar 3       Bar 4       Bar 5




> barplot(bmat,col=3:6,names=encode("Bar",1:5),main="Filled Bar Graph",
+ legend=encode("Group",1:4))




   4.0 .
       .
   3.5 .                   .............................
       .                   .                           .
   3.0 .                   .                           .
       .                   .                           .
   2.5 .                   .                           .
       .                   .                           .
   2.0 .                   .                           .
       .                   .                           .
   1.5 .                   .                           .
       .             ..............             ...............
   1.0 .             .            .             .             .
       .             3            4             1             2
   0.5 .





> for(i in seq(-8,8,2)) plot(x*10^i,y*10^(i+1))


                                  Filled Bar Graph

     8..                                               .................
       .                         ..........            ...... Group 1  .
     6..                         .        .            ...... Group 2  .
       .                         .        . ..................Group 3  .
       .                         .......... .         ....... Group 4  .
     4..                         .        . .         ..................
       . ...........             .......... ........... .         .
     2.. ...........             .        . .         . ...........
       . ...........             .......... ........... .         .
     0.. ........... ........... .......... ........... ...........
       .             ...........
       .             ...........
    -2..             .         .
       .             ...........
    -4..

            Bar 1       Bar 2      Bar 3       Bar 4       Bar 5







   2.0 ......................................................................
   e-7 .
   1.5 .                          *
   e-7 .               *                                          *
   1.0 .                        *
   %-% .                         * *
   e-8 .      *              *                        *       *
     0 .                 *                               *
    e0 .                 *     *
  -5.0 .                              *                       *
  -%-% .
   e-7 .
  -1.5 .    *                 *                *
   e-7 .                      *
  -2.0 ......................................................................
   e-7-2            -1            0             1             2
      e-8           e-8           e0           e-8           e-8







   2.0 .....................................................................
   e-5 .
   1.5 .                          *
   e-5 .               *                                          *
   1.0 .                        *
   %-% .                         * *
   e-6 .      *              *                        *       *
     0 .                 *                               *
    e0 .                 *     *
  -5.0 .                              *                       *
  -%-% .
   e-5 .
  -1.5 .    *                 *                *
   e-5 .                      *
  -2.0 .....................................................................
   e-5-2            -1            0             1             2
      e-6           e-6           e0           e-6           e-6



Text string: -0.0020
 out of bounds at X= -2.59466e-4 Y= -0.002
Text string: -0.0015
 out of bounds at X= -2.59466e-4 Y= -0.0015
Text string: -0.0010
 out of bounds at X= -2.59466e-4 Y= -0.001
Text string: -0.0005
 out of bounds at X= -2.59466e-4 Y= -0.0005




0.0020 ......................................................................
       .
0.0015 .                          *
       .               *                                          *
0.0010 .                        *
0.0005 .                         * *
       .      *              *                        *       *
   0.0 .                 *                               *
       .                 *     *
       .                              *                       *
       .
       .
       .    *                 *                *
       .                      *
       ......................................................................
    -0.0002       -0.0001        0.0          0.0001       0.0002        0.0003








  0.20 ......................................................................
       .
  0.15 .                          *
       .               *                                          *
  0.10 .                        *
  0.05 .                         * *
       .      *              *                        *       *
   0.0 .                 *                               *
       .                 *     *
 -0.05 .                              *                       *
 -0.10 .
       .
 -0.15 .    *                 *                *
       .                      *
 -0.20 ......................................................................
     -0.02         -0.01         0.0           0.01         0.02








    20 ......................................................................
       .
    15 .                          *
       .               *                                          *
    10 .                        *
     5 .                         * *
       .      *              *                        *       *
     0 .                 *                               *
       .                 *     *
    -5 .                              *                       *
   -10 .
       .
   -15 .    *                 *                *
       .                      *
   -20 ......................................................................
      -2            -1            0             1             2             3








  2000 ......................................................................
       .
  1500 .                          *
       .               *                                          *
  1000 .                        *
   500 .                         * *
       .      *              *                        *       *
     0 .                 *                               *
       .                 *     *
  -500 .                              *                       *
 -1000 .
       .
 -1500 .    *                 *                *
       .                      *
 -2000 ......................................................................
     -200          -100           0            100           200           300




Text string: -200000
 out of bounds at X= -25946.6 Y= -200000
Text string: -150000
 out of bounds at X= -25946.6 Y= -150000
Text string: -100000
 out of bounds at X= -25946.6 Y= -100000




200000 ......................................................................
       .
150000 .                          *
       .               *                                          *
100000 .                        *
 50000 .                         * *
       .      *              *                        *       *
     0 .                 *                               *
       .                 *     *
-50000 .                              *                       *
       .
       .
       .    *                 *                *
       .                      *
       ......................................................................
    -20000        -10000          0           10000         20000         30000








   2.0 ......................................................................
    e7 .
   1.5 .                          *
    e7 .               *                                          *
   1.0 .                        *
   5e% .                         * *
    e6 .      *              *                        *       *
     0 .                 *                               *
    e0 .                 *     *
  -5.0 .                              *                       *
  -1e% .
    e7 .
  -1.5 .    *                 *                *
    e7 .                      *
  -2.0 ......................................................................
    e7-2            -1            0             1             2             3
      e6            e6            e0            e6           e6            e6







   2.0 ......................................................................
    e9 .
   1.5 .                          *
    e9 .               *                                          *
   1.0 .                        *
   5e% .                         * *
    e8 .      *              *                        *       *
     0 .                 *                               *
    e0 .                 *     *
  -5.0 .                              *                       *
  -1e% .
    e9 .
  -1.5 .    *                 *                *
    e9 .                      *
  -2.0 ......................................................................
    e9-2            -1            0             1             2             3
      e8            e8            e0            e8           e8            e8



5.0u 6.4s 14r 	 /usr/s/cmd/RUN.S
