
(/VERSIONCHECK 2) 

(DEFUN |GRIMAGE;numberCheck| (|nums| $)
  (PROG (#1=#:G675 #2=#:G673 #3=#:G677 |i|)
    (RETURN
     (SEQ
      (EXIT
       (SEQ
        (LETT |i| (SPADCALL |nums| (QREFELT $ 9)) . #4=(|GRIMAGE;numberCheck|))
        (LETT #3# (SPADCALL |nums| (QREFELT $ 10)) . #4#) G190
        (COND ((> |i| #3#) (GO G191)))
        (SEQ
         (EXIT
          (COND
           ((COMPLEXP
             (SPADCALL |nums|
                       (PROG1 (LETT #2# |i| . #4#)
                         (|check-subtype| (> #2# 0) '(|PositiveInteger|) #2#))
                       (QREFELT $ 12)))
            (PROGN
             (LETT #1#
                   (|error|
                    "An unexpected complex number was encountered in the calculations.")
                   . #4#)
             (GO #1#))))))
        (LETT |i| (+ |i| 1) . #4#) (GO G190) G191 (EXIT NIL)))
      #1# (EXIT #1#))))) 

(DEFUN |GRIMAGE;doOptions| (|g| $)
  (PROG (|lu| |lr|)
    (RETURN
     (SEQ
      (LETT |lr|
            (SPADCALL (QVELT |g| 7) (SPADCALL |g| (QREFELT $ 14))
                      (QREFELT $ 17))
            . #1=(|GRIMAGE;doOptions|))
      (COND
       ((< 1 (LENGTH |lr|))
        (QSETVELT |g| 1
                  (LIST
                   (SPADCALL
                    (SPADCALL
                     (SPADCALL (SPADCALL |lr| 1 (QREFELT $ 19)) (QREFELT $ 21))
                     (QREFELT $ 22))
                    (SPADCALL
                     (SPADCALL (SPADCALL |lr| 1 (QREFELT $ 19)) (QREFELT $ 23))
                     (QREFELT $ 22))
                    (QREFELT $ 25))
                   (SPADCALL
                    (SPADCALL
                     (SPADCALL (SPADCALL |lr| 2 (QREFELT $ 19)) (QREFELT $ 21))
                     (QREFELT $ 22))
                    (SPADCALL
                     (SPADCALL (SPADCALL |lr| 2 (QREFELT $ 19)) (QREFELT $ 23))
                     (QREFELT $ 22))
                    (QREFELT $ 25)))))
       (#2='T (QSETVELT |g| 1 NIL)))
      (LETT |lu|
            (SPADCALL (QVELT |g| 7) (SPADCALL |g| (QREFELT $ 27))
                      (QREFELT $ 28))
            . #1#)
      (EXIT
       (COND
        ((< 1 (LENGTH |lu|))
         (QSETVELT |g| 2
                   (LIST
                    (SPADCALL (SPADCALL |lu| 1 (QREFELT $ 29)) (QREFELT $ 22))
                    (SPADCALL (SPADCALL |lu| 2 (QREFELT $ 29))
                              (QREFELT $ 22)))))
        (#2# (QSETVELT |g| 2 NIL)))))))) 

(DEFUN |GRIMAGE;putColorInfo;LLL;3| (|llp| |listOfPalettes| $)
  (PROG (|llp2| |lp2| |p| |d| #1=#:G692 |daShade| |daHue| #2=#:G690 |lp|
         #3=#:G691 |pal|)
    (RETURN
     (SEQ (LETT |llp2| NIL . #4=(|GRIMAGE;putColorInfo;LLL;3|))
          (SEQ (LETT |pal| NIL . #4#) (LETT #3# |listOfPalettes| . #4#)
               (LETT |lp| NIL . #4#) (LETT #2# |llp| . #4#) G190
               (COND
                ((OR (ATOM #2#) (PROGN (LETT |lp| (CAR #2#) . #4#) NIL)
                     (ATOM #3#) (PROGN (LETT |pal| (CAR #3#) . #4#) NIL))
                 #5=(GO G191)))
               (SEQ (LETT |lp2| NIL . #4#)
                    (LETT |daHue|
                          (FLOAT
                           (SPADCALL (SPADCALL |pal| (QREFELT $ 32))
                                     (QREFELT $ 33))
                           MOST-POSITIVE-DOUBLE-FLOAT)
                          . #4#)
                    (LETT |daShade|
                          (FLOAT (SPADCALL |pal| (QREFELT $ 34))
                                 MOST-POSITIVE-DOUBLE-FLOAT)
                          . #4#)
                    (SEQ (LETT |p| NIL . #4#) (LETT #1# |lp| . #4#) G190
                         (COND
                          ((OR (ATOM #1#)
                               (PROGN (LETT |p| (CAR #1#) . #4#) NIL))
                           #5#))
                         (SEQ
                          (SEQ (LETT |d| (SPADCALL |p| (QREFELT $ 36)) . #4#)
                               (EXIT
                                (COND
                                 ((< |d| 3)
                                  (LETT |p|
                                        (SPADCALL |p| (LIST |daHue| |daShade|)
                                                  (QREFELT $ 38))
                                        . #4#))
                                 ('T
                                  (SEQ (SPADCALL |p| 3 |daHue| (QREFELT $ 39))
                                       (EXIT
                                        (COND
                                         ((< |d| 4)
                                          (LETT |p|
                                                (SPADCALL |p| (LIST |daShade|)
                                                          (QREFELT $ 38))
                                                . #4#))
                                         ('T
                                          (SPADCALL |p| 4 |daShade|
                                                    (QREFELT $ 39))))))))))
                          (EXIT (LETT |lp2| (CONS |p| |lp2|) . #4#)))
                         (LETT #1# (CDR #1#) . #4#) #6=(GO G190) G191
                         (EXIT NIL))
                    (EXIT (LETT |llp2| (CONS (NREVERSE |lp2|) |llp2|) . #4#)))
               (LETT #2# (PROG1 (CDR #2#) (LETT #3# (CDR #3#) . #4#)) . #4#)
               #6# G191 (EXIT NIL))
          (EXIT (NREVERSE |llp2|)))))) 

(DEFUN |GRIMAGE;graph| (|demRanges| $)
  (PROG (|demRangesSF|)
    (RETURN
     (SEQ
      (COND ((NULL |demRanges|) (VECTOR 0 NIL NIL NIL NIL NIL NIL NIL))
            ('T
             (SEQ
              (LETT |demRangesSF|
                    (LIST
                     (SPADCALL
                      (SPADCALL
                       (SPADCALL (SPADCALL |demRanges| 1 (QREFELT $ 19))
                                 (QREFELT $ 21))
                       (QREFELT $ 22))
                      (SPADCALL
                       (SPADCALL (SPADCALL |demRanges| 1 (QREFELT $ 19))
                                 (QREFELT $ 23))
                       (QREFELT $ 22))
                      (QREFELT $ 25))
                     (SPADCALL
                      (SPADCALL
                       (SPADCALL (SPADCALL |demRanges| 1 (QREFELT $ 19))
                                 (QREFELT $ 21))
                       (QREFELT $ 22))
                      (SPADCALL
                       (SPADCALL (SPADCALL |demRanges| 1 (QREFELT $ 19))
                                 (QREFELT $ 23))
                       (QREFELT $ 22))
                      (QREFELT $ 25)))
                    |GRIMAGE;graph|)
              (EXIT (VECTOR 0 |demRangesSF| NIL NIL NIL NIL NIL NIL))))))))) 

(DEFUN |GRIMAGE;scaleStep| (|range| $)
  (PROG (|scaleDown| |numerals| |tryStep| |adjust|)
    (RETURN
     (SEQ (LETT |adjust| 0 . #1=(|GRIMAGE;scaleStep|))
          (SEQ G190
               (COND
                ((NULL
                  (< |range|
                     (SPADCALL (SPADCALL 100 0 10 (QREFELT $ 43))
                               (QREFELT $ 44))))
                 (GO G191)))
               (SEQ (LETT |adjust| (+ |adjust| 1) . #1#)
                    (EXIT
                     (LETT |range|
                           (* |range|
                              (SPADCALL (SPADCALL 10 0 10 (QREFELT $ 43))
                                        (QREFELT $ 44)))
                           . #1#)))
               NIL (GO G190) G191 (EXIT NIL))
          (LETT |tryStep|
                (/ |range|
                   (SPADCALL (SPADCALL 10 0 10 (QREFELT $ 43)) (QREFELT $ 44)))
                . #1#)
          (LETT |numerals|
                (STRINGIMAGE
                 (SPADCALL (SPADCALL |tryStep| (QREFELT $ 45)) (QREFELT $ 46)))
                . #1#)
          (LETT |scaleDown|
                (FLOAT (EXPT 10 (- (QCSIZE |numerals|) 1))
                       MOST-POSITIVE-DOUBLE-FLOAT)
                . #1#)
          (EXIT
           (/
            (* |scaleDown|
               (SPADCALL
                (- (/ |tryStep| |scaleDown|)
                   (SPADCALL (SPADCALL 5 -1 10 (QREFELT $ 43)) (QREFELT $ 44)))
                (QREFELT $ 45)))
            (FLOAT (EXPT 10 |adjust|) MOST-POSITIVE-DOUBLE-FLOAT))))))) 

(DEFUN |GRIMAGE;figureUnits;LL;6| (|listOfListsOfPoints| $)
  (PROG (|yMax| |yMin| |xMax| |xMin| |py| |px| #1=#:G709 |p| #2=#:G708 |pL|)
    (RETURN
     (SEQ
      (LETT |xMin|
            (LETT |xMax|
                  (SPADCALL (|SPADfirst| (|SPADfirst| |listOfListsOfPoints|))
                            (QREFELT $ 48))
                  . #3=(|GRIMAGE;figureUnits;LL;6|))
            . #3#)
      (LETT |yMin|
            (LETT |yMax|
                  (SPADCALL (|SPADfirst| (|SPADfirst| |listOfListsOfPoints|))
                            (QREFELT $ 49))
                  . #3#)
            . #3#)
      (COND
       ((NULL (= |xMin| |xMin|))
        (LETT |xMin| MOST-POSITIVE-DOUBLE-FLOAT . #3#)))
      (COND
       ((NULL (= |xMax| |xMax|))
        (LETT |xMax| MOST-NEGATIVE-DOUBLE-FLOAT . #3#)))
      (COND
       ((NULL (= |yMin| |yMin|))
        (LETT |yMin| MOST-POSITIVE-DOUBLE-FLOAT . #3#)))
      (COND
       ((NULL (= |yMax| |yMax|))
        (LETT |yMax| MOST-NEGATIVE-DOUBLE-FLOAT . #3#)))
      (SEQ (LETT |pL| NIL . #3#) (LETT #2# |listOfListsOfPoints| . #3#) G190
           (COND
            ((OR (ATOM #2#) (PROGN (LETT |pL| (CAR #2#) . #3#) NIL))
             #4=(GO G191)))
           (SEQ
            (EXIT
             (SEQ (LETT |p| NIL . #3#) (LETT #1# |pL| . #3#) G190
                  (COND
                   ((OR (ATOM #1#) (PROGN (LETT |p| (CAR #1#) . #3#) NIL))
                    #4#))
                  (SEQ
                   (SEQ (LETT |px| (SPADCALL |p| (QREFELT $ 48)) . #3#)
                        (EXIT
                         (COND ((< |px| |xMin|) (LETT |xMin| |px| . #3#)))))
                   (COND ((< |xMax| |px|) (LETT |xMax| |px| . #3#)))
                   (SEQ (LETT |py| (SPADCALL |p| (QREFELT $ 49)) . #3#)
                        (EXIT
                         (COND ((< |py| |yMin|) (LETT |yMin| |py| . #3#)))))
                   (EXIT (COND ((< |yMax| |py|) (LETT |yMax| |py| . #3#)))))
                  (LETT #1# (CDR #1#) . #3#) #5=(GO G190) G191 (EXIT NIL))))
           (LETT #2# (CDR #2#) . #3#) #5# G191 (EXIT NIL))
      (COND
       ((= |xMin| |xMax|)
        (SEQ
         (LETT |xMin|
               (- |xMin|
                  (SPADCALL (SPADCALL 5 -1 10 (QREFELT $ 43)) (QREFELT $ 22)))
               . #3#)
         (EXIT
          (LETT |xMax|
                (+ |xMax|
                   (SPADCALL (SPADCALL 5 -1 10 (QREFELT $ 43)) (QREFELT $ 22)))
                . #3#)))))
      (COND
       ((= |yMin| |yMax|)
        (SEQ
         (LETT |yMin|
               (- |yMin|
                  (SPADCALL (SPADCALL 5 -1 10 (QREFELT $ 43)) (QREFELT $ 22)))
               . #3#)
         (EXIT
          (LETT |yMax|
                (+ |yMax|
                   (SPADCALL (SPADCALL 5 -1 10 (QREFELT $ 43)) (QREFELT $ 22)))
                . #3#)))))
      (EXIT
       (LIST (|GRIMAGE;scaleStep| (- |xMax| |xMin|) $)
             (|GRIMAGE;scaleStep| (- |yMax| |yMin|) $))))))) 

(DEFUN |GRIMAGE;plotLists|
       (|graf| |listOfListsOfPoints| |listOfPointColors| |listOfLineColors|
        |listOfPointSizes| $)
  (PROG (#1=#:G731 |givenLen| #2=#:G724 #3=#:G717 |len| #4=#:G736 |l|
         #5=#:G735)
    (RETURN
     (SEQ
      (LETT |givenLen| (LENGTH |listOfListsOfPoints|)
            . #6=(|GRIMAGE;plotLists|))
      (LETT |listOfListsOfPoints|
            (PROGN
             (LETT #5# NIL . #6#)
             (SEQ (LETT |l| NIL . #6#) (LETT #4# |listOfListsOfPoints| . #6#)
                  G190
                  (COND
                   ((OR (ATOM #4#) (PROGN (LETT |l| (CAR #4#) . #6#) NIL))
                    (GO G191)))
                  (SEQ
                   (EXIT
                    (COND
                     ((COND ((NULL |l|) 'NIL) (#7='T 'T))
                      (LETT #5# (CONS |l| #5#) . #6#)))))
                  (LETT #4# (CDR #4#) . #6#) (GO G190) G191
                  (EXIT (NREVERSE0 #5#))))
            . #6#)
      (COND
       ((NULL |listOfListsOfPoints|)
        (|error|
         "GraphImage was given a list that contained no valid point lists")))
      (SEQ (LETT |len| (LENGTH |listOfListsOfPoints|) . #6#)
           (EXIT
            (COND
             ((NULL (EQL |len| |givenLen|))
              (|sayBrightly|
               (LIST "   Warning: Ignoring pointless point list"))))))
      (QSETVELT |graf| 3 |listOfListsOfPoints|)
      (SEQ (LETT |givenLen| (LENGTH |listOfPointColors|) . #6#)
           (EXIT
            (COND
             ((< |len| |givenLen|)
              (QSETVELT |graf| 4
                        (SPADCALL |listOfPointColors|
                                  (SPADCALL
                                   (+
                                    (PROG1
                                        (LETT #3# (- |len| |givenLen|) . #6#)
                                      (|check-subtype| (>= #3# 0)
                                                       '(|NonNegativeInteger|)
                                                       #3#))
                                    1)
                                   (SPADCALL (QREFELT $ 52)) (QREFELT $ 54))
                                  (QREFELT $ 55))))
             (#7#
              (QSETVELT |graf| 4
                        (SPADCALL |listOfPointColors| |len|
                                  (QREFELT $ 56)))))))
      (SEQ (LETT |givenLen| (LENGTH |listOfLineColors|) . #6#)
           (EXIT
            (COND
             ((< |len| |givenLen|)
              (QSETVELT |graf| 5
                        (SPADCALL |listOfLineColors|
                                  (SPADCALL
                                   (+
                                    (PROG1
                                        (LETT #2# (- |len| |givenLen|) . #6#)
                                      (|check-subtype| (>= #2# 0)
                                                       '(|NonNegativeInteger|)
                                                       #2#))
                                    1)
                                   (SPADCALL (QREFELT $ 57)) (QREFELT $ 54))
                                  (QREFELT $ 55))))
             (#7#
              (QSETVELT |graf| 5
                        (SPADCALL |listOfLineColors| |len| (QREFELT $ 56)))))))
      (SEQ (LETT |givenLen| (LENGTH |listOfPointSizes|) . #6#)
           (EXIT
            (COND
             ((< |len| |givenLen|)
              (QSETVELT |graf| 6
                        (SPADCALL |listOfPointSizes|
                                  (SPADCALL
                                   (+
                                    (PROG1
                                        (LETT #1# (- |len| |givenLen|) . #6#)
                                      (|check-subtype| (>= #1# 0)
                                                       '(|NonNegativeInteger|)
                                                       #1#))
                                    1)
                                   (SPADCALL (QREFELT $ 58)) (QREFELT $ 60))
                                  (QREFELT $ 61))))
             (#7#
              (QSETVELT |graf| 6
                        (SPADCALL |listOfPointSizes| |len| (QREFELT $ 62)))))))
      (EXIT |graf|))))) 

(DEFUN |GRIMAGE;makeGraph| (|graf| $)
  (PROG (|hueShade| |aPoint| #1=#:G753 |p| #2=#:G749 |aList| #3=#:G750 |pColor|
         #4=#:G751 |lColor| #5=#:G752 |s| |tonto| |transform|)
    (RETURN
     (SEQ (|GRIMAGE;doOptions| |graf| $)
          (LETT |s| (LENGTH (QVELT |graf| 3)) . #6=(|GRIMAGE;makeGraph|))
          (EXIT
           (COND
            ((EQL |s| 0)
             (|error| "You are trying to make a graph with no points"))
            ((NULL (EQL (SPADCALL |graf| (QREFELT $ 63)) 0))
             (|error| "You are trying to draw over an existing graph"))
            ('T
             (SEQ
              (LETT |transform|
                    (SPADCALL (QVELT |graf| 7) (ELT $ 65) (QREFELT $ 67))
                    . #6#)
              (QSETVELT |graf| 3
                        (SPADCALL (QVELT |graf| 3) (QVELT |graf| 4)
                                  (QREFELT $ 42)))
              (COND
               ((NULL (SPADCALL |graf| (QREFELT $ 14)))
                (QSETVELT |graf| 1
                          (SPADCALL (QVELT |graf| 3) (QREFELT $ 70)))))
              (COND
               ((NULL (SPADCALL |graf| (QREFELT $ 27)))
                (QSETVELT |graf| 2
                          (SPADCALL (QVELT |graf| 3) (QREFELT $ 50)))))
              (|sayBrightly|
               (LIST
                "   Graph data being transmitted to the viewport manager..."))
              (|sockSendInt| |$ViewportServer| 2)
              (|sockSendInt| |$ViewportServer| -1)
              (LETT |tonto| (QVELT |graf| 1) . #6#)
              (|sockSendFloat| |$ViewportServer|
                               (SPADCALL (|SPADfirst| |tonto|) (QREFELT $ 71)))
              (|sockSendFloat| |$ViewportServer|
                               (SPADCALL (|SPADfirst| |tonto|) (QREFELT $ 72)))
              (|sockSendFloat| |$ViewportServer|
                               (SPADCALL (SPADCALL |tonto| (QREFELT $ 73))
                                         (QREFELT $ 71)))
              (|sockSendFloat| |$ViewportServer|
                               (SPADCALL (SPADCALL |tonto| (QREFELT $ 73))
                                         (QREFELT $ 72)))
              (|sockSendFloat| |$ViewportServer|
                               (|SPADfirst| (QVELT |graf| 2)))
              (|sockSendFloat| |$ViewportServer|
                               (SPADCALL (QVELT |graf| 2) (QREFELT $ 74)))
              (|sockSendInt| |$ViewportServer| |s|)
              (SEQ (LETT |s| NIL . #6#) (LETT #5# (QVELT |graf| 6) . #6#)
                   (LETT |lColor| NIL . #6#) (LETT #4# (QVELT |graf| 5) . #6#)
                   (LETT |pColor| NIL . #6#) (LETT #3# (QVELT |graf| 4) . #6#)
                   (LETT |aList| NIL . #6#) (LETT #2# (QVELT |graf| 3) . #6#)
                   G190
                   (COND
                    ((OR (ATOM #2#) (PROGN (LETT |aList| (CAR #2#) . #6#) NIL)
                         (ATOM #3#) (PROGN (LETT |pColor| (CAR #3#) . #6#) NIL)
                         (ATOM #4#) (PROGN (LETT |lColor| (CAR #4#) . #6#) NIL)
                         (ATOM #5#) (PROGN (LETT |s| (CAR #5#) . #6#) NIL))
                     #7=(GO G191)))
                   (SEQ (|sockSendInt| |$ViewportServer| (LENGTH |aList|))
                        (SEQ (LETT |p| NIL . #6#) (LETT #1# |aList| . #6#) G190
                             (COND
                              ((OR (ATOM #1#)
                                   (PROGN (LETT |p| (CAR #1#) . #6#) NIL))
                               #7#))
                             (SEQ
                              (LETT |aPoint| (SPADCALL |p| |transform|) . #6#)
                              (|sockSendFloat| |$ViewportServer|
                                               (SPADCALL |aPoint|
                                                         (QREFELT $ 48)))
                              (|sockSendFloat| |$ViewportServer|
                                               (SPADCALL |aPoint|
                                                         (QREFELT $ 49)))
                              (|sockSendFloat| |$ViewportServer|
                                               (SPADCALL |p| (QREFELT $ 75)))
                              (EXIT
                               (|sockSendFloat| |$ViewportServer|
                                                (SPADCALL |p|
                                                          (QREFELT $ 76)))))
                             (LETT #1# (CDR #1#) . #6#) #8=(GO G190) G191
                             (EXIT NIL))
                        (LETT |hueShade|
                              (+
                               (SPADCALL (SPADCALL |pColor| (QREFELT $ 32))
                                         (QREFELT $ 33))
                               (* (SPADCALL |pColor| (QREFELT $ 34))
                                  (SPADCALL (QREFELT $ 77))))
                              . #6#)
                        (|sockSendInt| |$ViewportServer| |hueShade|)
                        (LETT |hueShade|
                              (+
                               (SPADCALL
                                (-
                                 (SPADCALL (SPADCALL |lColor| (QREFELT $ 32))
                                           (QREFELT $ 33))
                                 1)
                                5 (QREFELT $ 79))
                               (SPADCALL |lColor| (QREFELT $ 34)))
                              . #6#)
                        (|sockSendInt| |$ViewportServer| |hueShade|)
                        (EXIT (|sockSendInt| |$ViewportServer| |s|)))
                   (LETT #2#
                         (PROG1 (CDR #2#)
                           (LETT #3#
                                 (PROG1 (CDR #3#)
                                   (LETT #4#
                                         (PROG1 (CDR #4#)
                                           (LETT #5# (CDR #5#) . #6#))
                                         . #6#))
                                 . #6#))
                         . #6#)
                   #8# G191 (EXIT NIL))
              (QSETVELT |graf| 0 (|sockGetInt| |$ViewportServer|))
              (EXIT |graf|))))))))) 

(DEFUN |GRIMAGE;makeGraphImage;2$;9| (|graf| $) (|GRIMAGE;makeGraph| |graf| $)) 

(PUT '|GRIMAGE;key;$I;10| '|SPADreplace| '(XLAM (|graf|) (QVELT |graf| 0))) 

(DEFUN |GRIMAGE;key;$I;10| (|graf| $) (QVELT |graf| 0)) 

(PUT '|GRIMAGE;pointLists;$L;11| '|SPADreplace|
     '(XLAM (|graf|) (QVELT |graf| 3))) 

(DEFUN |GRIMAGE;pointLists;$L;11| (|graf| $) (QVELT |graf| 3)) 

(DEFUN |GRIMAGE;ranges;$L;12| (|graf| $)
  (COND ((NULL (QVELT |graf| 1)) NIL)
        ('T
         (LIST
          (SPADCALL
           (SPADCALL
            (SPADCALL (SPADCALL (QVELT |graf| 1) 1 (QREFELT $ 82))
                      (QREFELT $ 71))
            (QREFELT $ 83))
           (SPADCALL
            (SPADCALL (SPADCALL (QVELT |graf| 1) 1 (QREFELT $ 82))
                      (QREFELT $ 72))
            (QREFELT $ 83))
           (QREFELT $ 84))
          (SPADCALL
           (SPADCALL
            (SPADCALL (SPADCALL (QVELT |graf| 1) 2 (QREFELT $ 82))
                      (QREFELT $ 71))
            (QREFELT $ 83))
           (SPADCALL
            (SPADCALL (SPADCALL (QVELT |graf| 1) 2 (QREFELT $ 82))
                      (QREFELT $ 72))
            (QREFELT $ 83))
           (QREFELT $ 84)))))) 

(DEFUN |GRIMAGE;ranges;$2L;13| (|graf| |rangesList| $)
  (SEQ
   (QSETVELT |graf| 1
             (LIST
              (SPADCALL
               (SPADCALL
                (SPADCALL (SPADCALL |rangesList| 1 (QREFELT $ 19))
                          (QREFELT $ 21))
                (QREFELT $ 22))
               (SPADCALL
                (SPADCALL (SPADCALL |rangesList| 1 (QREFELT $ 19))
                          (QREFELT $ 23))
                (QREFELT $ 22))
               (QREFELT $ 25))
              (SPADCALL
               (SPADCALL
                (SPADCALL (SPADCALL |rangesList| 2 (QREFELT $ 19))
                          (QREFELT $ 21))
                (QREFELT $ 22))
               (SPADCALL
                (SPADCALL (SPADCALL |rangesList| 2 (QREFELT $ 19))
                          (QREFELT $ 23))
                (QREFELT $ 22))
               (QREFELT $ 25))))
   (EXIT |rangesList|))) 

(DEFUN |GRIMAGE;units;$L;14| (|graf| $)
  (COND ((NULL (QVELT |graf| 2)) NIL)
        ('T
         (LIST
          (SPADCALL (SPADCALL (QVELT |graf| 2) 1 (QREFELT $ 86))
                    (QREFELT $ 83))
          (SPADCALL (SPADCALL (QVELT |graf| 2) 2 (QREFELT $ 86))
                    (QREFELT $ 83)))))) 

(DEFUN |GRIMAGE;units;$2L;15| (|graf| |unitsToBe| $)
  (SEQ
   (QSETVELT |graf| 2
             (LIST
              (SPADCALL (SPADCALL |unitsToBe| 1 (QREFELT $ 29)) (QREFELT $ 22))
              (SPADCALL (SPADCALL |unitsToBe| 2 (QREFELT $ 29))
                        (QREFELT $ 22))))
   (EXIT |unitsToBe|))) 

(DEFUN |GRIMAGE;graphImage;$;16| ($) (|GRIMAGE;graph| NIL $)) 

(DEFUN |GRIMAGE;makeGraphImage;L$;17| (|llp| $)
  (PROG (|i| #1=#:G774 #2=#:G773 #3=#:G772 |l| #4=#:G771)
    (RETURN
     (SEQ
      (SPADCALL |llp|
                (PROGN
                 (LETT #4# NIL . #5=(|GRIMAGE;makeGraphImage;L$;17|))
                 (SEQ (LETT |i| 1 . #5#)
                      (LETT #3# (LETT |l| (LENGTH |llp|) . #5#) . #5#) G190
                      (COND ((QSGREATERP |i| #3#) #6=(GO G191)))
                      (SEQ
                       (EXIT
                        (LETT #4# (CONS (SPADCALL (QREFELT $ 52)) #4#) . #5#)))
                      (LETT |i| (QSADD1 |i|) . #5#) #7=(GO G190) G191
                      (EXIT (NREVERSE0 #4#))))
                (PROGN
                 (LETT #2# NIL . #5#)
                 (SEQ (LETT |i| 1 . #5#) G190 (COND ((QSGREATERP |i| |l|) #6#))
                      (SEQ
                       (EXIT
                        (LETT #2# (CONS (SPADCALL (QREFELT $ 57)) #2#) . #5#)))
                      (LETT |i| (QSADD1 |i|) . #5#) #7# G191
                      (EXIT (NREVERSE0 #2#))))
                (PROGN
                 (LETT #1# NIL . #5#)
                 (SEQ (LETT |i| 1 . #5#) G190 (COND ((QSGREATERP |i| |l|) #6#))
                      (SEQ
                       (EXIT
                        (LETT #1# (CONS (SPADCALL (QREFELT $ 58)) #1#) . #5#)))
                      (LETT |i| (QSADD1 |i|) . #5#) #7# G191
                      (EXIT (NREVERSE0 #1#))))
                (QREFELT $ 90)))))) 

(DEFUN |GRIMAGE;makeGraphImage;L2LL$;18| (|llp| |lpc| |llc| |lps| $)
  (SPADCALL |llp| |lpc| |llc| |lps| NIL (QREFELT $ 92))) 

(DEFUN |GRIMAGE;makeGraphImage;L2LLL$;19| (|llp| |lpc| |llc| |lps| |opts| $)
  (PROG (|aPoint| #1=#:G782 |p| #2=#:G781 |aList| |transform| |graf|)
    (RETURN
     (SEQ
      (LETT |graf| (|GRIMAGE;graph| (SPADCALL |opts| NIL (QREFELT $ 17)) $)
            . #3=(|GRIMAGE;makeGraphImage;L2LLL$;19|))
      (QSETVELT |graf| 7 |opts|)
      (LETT |graf| (|GRIMAGE;plotLists| |graf| |llp| |lpc| |llc| |lps| $)
            . #3#)
      (LETT |transform| (SPADCALL (QVELT |graf| 7) (ELT $ 65) (QREFELT $ 67))
            . #3#)
      (SEQ (LETT |aList| NIL . #3#) (LETT #2# (QVELT |graf| 3) . #3#) G190
           (COND
            ((OR (ATOM #2#) (PROGN (LETT |aList| (CAR #2#) . #3#) NIL))
             #4=(GO G191)))
           (SEQ
            (EXIT
             (SEQ (LETT |p| NIL . #3#) (LETT #1# |aList| . #3#) G190
                  (COND
                   ((OR (ATOM #1#) (PROGN (LETT |p| (CAR #1#) . #3#) NIL))
                    #4#))
                  (SEQ (LETT |aPoint| (SPADCALL |p| |transform|) . #3#)
                       (EXIT (|GRIMAGE;numberCheck| |aPoint| $)))
                  (LETT #1# (CDR #1#) . #3#) #5=(GO G190) G191 (EXIT NIL))))
           (LETT #2# (CDR #2#) . #3#) #5# G191 (EXIT NIL))
      (EXIT (|GRIMAGE;makeGraph| |graf| $)))))) 

(DEFUN |GRIMAGE;component;$L2PPiV;20|
       (|graf| |ListOfPoints| |PointColor| |LineColor| |PointSize| $)
  (SEQ (QSETVELT |graf| 3 (APPEND (QVELT |graf| 3) (LIST |ListOfPoints|)))
       (QSETVELT |graf| 4 (APPEND (QVELT |graf| 4) (LIST |PointColor|)))
       (QSETVELT |graf| 5 (APPEND (QVELT |graf| 5) (LIST |LineColor|)))
       (EXIT (QSETVELT |graf| 6 (APPEND (QVELT |graf| 6) (LIST |PointSize|)))))) 

(DEFUN |GRIMAGE;component;$PV;21| (|graf| |aPoint| $)
  (SPADCALL |graf| |aPoint| (SPADCALL (QREFELT $ 52)) (SPADCALL (QREFELT $ 57))
            (SPADCALL (QREFELT $ 58)) (QREFELT $ 96))) 

(DEFUN |GRIMAGE;component;$P2PPiV;22|
       (|graf| |aPoint| |PointColor| |LineColor| |PointSize| $)
  (SPADCALL |graf| (LIST |aPoint|) |PointColor| |LineColor| |PointSize|
            (QREFELT $ 95))) 

(DEFUN |GRIMAGE;appendPoint;$PV;23| (|graf| |aPoint| $)
  (PROG (|num|)
    (RETURN
     (SEQ
      (LETT |num| (- (LENGTH (QVELT |graf| 3)) 1) |GRIMAGE;appendPoint;$PV;23|)
      (EXIT
       (COND ((< |num| 0) (|error| "No point lists to append to!"))
             ('T
              (SPADCALL (QVELT |graf| 3) |num|
                        (APPEND
                         (SPADCALL (QVELT |graf| 3) |num| (QREFELT $ 98))
                         (LIST |aPoint|))
                        (QREFELT $ 99))))))))) 

(DEFUN |GRIMAGE;point;$PPV;24| (|graf| |aPoint| |PointColor| $)
  (SPADCALL |graf| |aPoint| |PointColor| (SPADCALL (QREFELT $ 57))
            (SPADCALL (QREFELT $ 58)) (QREFELT $ 96))) 

(DEFUN |GRIMAGE;coerce;L$;25| (|llp| $)
  (PROG (|i| #1=#:G798 #2=#:G797 #3=#:G796 |l| #4=#:G795)
    (RETURN
     (SEQ
      (SPADCALL |llp|
                (PROGN
                 (LETT #4# NIL . #5=(|GRIMAGE;coerce;L$;25|))
                 (SEQ (LETT |i| 1 . #5#)
                      (LETT #3# (LETT |l| (LENGTH |llp|) . #5#) . #5#) G190
                      (COND ((QSGREATERP |i| #3#) #6=(GO G191)))
                      (SEQ
                       (EXIT
                        (LETT #4# (CONS (SPADCALL (QREFELT $ 52)) #4#) . #5#)))
                      (LETT |i| (QSADD1 |i|) . #5#) #7=(GO G190) G191
                      (EXIT (NREVERSE0 #4#))))
                (PROGN
                 (LETT #2# NIL . #5#)
                 (SEQ (LETT |i| 1 . #5#) G190 (COND ((QSGREATERP |i| |l|) #6#))
                      (SEQ
                       (EXIT
                        (LETT #2# (CONS (SPADCALL (QREFELT $ 57)) #2#) . #5#)))
                      (LETT |i| (QSADD1 |i|) . #5#) #7# G191
                      (EXIT (NREVERSE0 #2#))))
                (PROGN
                 (LETT #1# NIL . #5#)
                 (SEQ (LETT |i| 1 . #5#) G190 (COND ((QSGREATERP |i| |l|) #6#))
                      (SEQ
                       (EXIT
                        (LETT #1# (CONS (SPADCALL (QREFELT $ 58)) #1#) . #5#)))
                      (LETT |i| (QSADD1 |i|) . #5#) #7# G191
                      (EXIT (NREVERSE0 #1#))))
                (QREFELT $ 90)))))) 

(DEFUN |GRIMAGE;coerce;$Of;26| (|graf| $)
  (PROG (|p|)
    (RETURN
     (SPADCALL
      (LIST "Graph with "
            (SPADCALL
             (LETT |p| (LENGTH (SPADCALL |graf| (QREFELT $ 81)))
                   |GRIMAGE;coerce;$Of;26|)
             (QREFELT $ 104))
            (COND ((EQL |p| 1) " point list") ('T " point lists")))
      (QREFELT $ 106))))) 

(DEFUN |GraphImage| #1=()
  (PROG #1#
    (RETURN
     (PROG (#2=#:G801)
       (RETURN
        (COND
         ((LETT #2# (HGET |$ConstructorCache| '|GraphImage|)
                . #3=(|GraphImage|))
          (|CDRwithIncrement| (CDAR #2#)))
         ('T
          (UNWIND-PROTECT
              (PROG1
                  (CDDAR
                   (HPUT |$ConstructorCache| '|GraphImage|
                         (LIST (CONS NIL (CONS 1 (|GraphImage;|))))))
                (LETT #2# T . #3#))
            (COND ((NOT #2#) (HREM |$ConstructorCache| '|GraphImage|))))))))))) 

(DEFUN |GraphImage;| ()
  (PROG (|dv$| $ |pv$|)
    (RETURN
     (PROGN
      (LETT |dv$| '(|GraphImage|) . #1=(|GraphImage|))
      (LETT $ (GETREFV 110) . #1#)
      (QSETREFV $ 0 |dv$|)
      (QSETREFV $ 3 (LETT |pv$| (|buildPredVector| 0 0 NIL) . #1#))
      (|haddProp| |$ConstructorCache| '|GraphImage| NIL (CONS 1 $))
      (|stuffDomainSlots| $)
      (QSETREFV $ 6
                (|Record| (|:| |key| (|Integer|))
                          (|:| |rangesField|
                               (|List| (|Segment| (|DoubleFloat|))))
                          (|:| |unitsField| (|List| (|DoubleFloat|)))
                          (|:| |llPoints|
                               (|List| (|List| (|Point| (|DoubleFloat|)))))
                          (|:| |pointColors| (|List| (|Palette|)))
                          (|:| |lineColors| (|List| (|Palette|)))
                          (|:| |pointSizes| (|List| (|PositiveInteger|)))
                          (|:| |optionsField| (|List| (|DrawOption|)))))
      $)))) 

(MAKEPROP '|GraphImage| '|infovec|
          (LIST
           '#(NIL NIL NIL NIL NIL NIL '|Rep| (|Integer|) (|Point| 11)
              (0 . |minIndex|) (5 . |maxIndex|) (|DoubleFloat|) (10 . |elt|)
              (|List| 18) |GRIMAGE;ranges;$L;12| (|List| (|DrawOption|))
              (|DrawOptionFunctions0|) (16 . |ranges|) (|Segment| 20)
              (22 . |elt|) (|Float|) (28 . |lo|) (33 . |convert|) (38 . |hi|)
              (|Segment| 11) (43 . |segment|) (|List| 20) |GRIMAGE;units;$L;14|
              (49 . |units|) (55 . |elt|) (|Color|) (|Palette|) (61 . |hue|)
              (66 . |hue|) (71 . |shade|) (|PositiveInteger|)
              (76 . |dimension|) (|List| 11) (81 . |extend|) (87 . |setelt|)
              (|List| 94) (|List| 31) |GRIMAGE;putColorInfo;LLL;3|
              (94 . |float|) (101 . |coerce|) (106 . |ceiling|)
              (111 . |retract|) (|PointPackage| 11) (116 . |xCoord|)
              (121 . |yCoord|) |GRIMAGE;figureUnits;LL;6|
              (|ViewDefaultsPackage|) (126 . |pointColorDefault|)
              (|NonNegativeInteger|) (130 . |new|) (136 . |concat|)
              (142 . |first|) (148 . |lineColorDefault|)
              (152 . |pointSizeDefault|) (|List| 35) (156 . |new|)
              (162 . |concat|) (168 . |first|) |GRIMAGE;key;$I;10|
              (|CoordinateSystems| 11) (174 . |cartesian|) (|Mapping| 8 8)
              (179 . |coord|) (|List| 24) (|PlotTools|) (185 . |calcRanges|)
              (190 . |lo|) (195 . |hi|) (200 . |second|) (205 . |second|)
              (210 . |hue|) (215 . |shade|) (220 . |numberOfHues|)
              (|SingleInteger|) (224 . *) |GRIMAGE;makeGraphImage;2$;9|
              |GRIMAGE;pointLists;$L;11| (230 . |elt|) (236 . |convert|)
              (241 . |segment|) |GRIMAGE;ranges;$2L;13| (247 . |elt|)
              (253 . |One|) |GRIMAGE;units;$2L;15| |GRIMAGE;graphImage;$;16|
              |GRIMAGE;makeGraphImage;L2LL$;18| |GRIMAGE;makeGraphImage;L$;17|
              |GRIMAGE;makeGraphImage;L2LLL$;19| (|Void|) (|List| 8)
              |GRIMAGE;component;$L2PPiV;20| |GRIMAGE;component;$P2PPiV;22|
              |GRIMAGE;component;$PV;21| (257 . |elt|) (263 . |setelt|)
              |GRIMAGE;appendPoint;$PV;23| |GRIMAGE;point;$PPV;24|
              |GRIMAGE;coerce;L$;25| (|OutputForm|) (270 . |coerce|) (|List| $)
              (275 . |hconcat|) |GRIMAGE;coerce;$Of;26| (|String|) (|Boolean|))
           '#(~= 280 |units| 286 |ranges| 297 |putColorInfo| 308 |pointLists|
              314 |point| 319 |makeGraphImage| 326 |latex| 353 |key| 358 |hash|
              363 |graphImage| 368 |figureUnits| 372 |component| 377 |coerce|
              401 |appendPoint| 411 = 417)
           'NIL
           (CONS (|makeByteWordVec2| 1 '(0 0 0))
                 (CONS '#(|SetCategory&| |BasicType&| NIL)
                       (CONS
                        '#((|SetCategory|) (|BasicType|) (|CoercibleTo| 103))
                        (|makeByteWordVec2| 109
                                            '(1 8 7 0 9 1 8 7 0 10 2 8 11 0 7
                                              12 2 16 13 15 13 17 2 13 18 0 7
                                              19 1 18 20 0 21 1 20 11 0 22 1 18
                                              20 0 23 2 24 0 11 11 25 2 16 26
                                              15 26 28 2 26 20 0 7 29 1 31 30 0
                                              32 1 30 7 0 33 1 31 7 0 34 1 8 35
                                              0 36 2 8 0 0 37 38 3 8 11 0 7 11
                                              39 3 20 0 7 7 35 43 1 20 11 0 44
                                              1 11 0 0 45 1 11 7 0 46 1 47 11 8
                                              48 1 47 11 8 49 0 51 31 52 2 41 0
                                              53 31 54 2 41 0 0 0 55 2 41 0 0
                                              53 56 0 51 31 57 0 51 35 58 2 59
                                              0 53 35 60 2 59 0 0 0 61 2 59 0 0
                                              53 62 1 64 8 8 65 2 16 66 15 66
                                              67 1 69 68 40 70 1 24 11 0 71 1
                                              24 11 0 72 1 68 24 0 73 1 37 11 0
                                              74 1 47 11 8 75 1 47 11 8 76 0 30
                                              35 77 2 78 0 7 0 79 2 68 24 0 7
                                              82 1 20 0 11 83 2 18 0 20 20 84 2
                                              37 11 0 7 86 0 20 0 87 2 40 94 0
                                              7 98 3 40 94 0 7 94 99 1 53 103 0
                                              104 1 103 0 105 106 2 0 109 0 0 1
                                              2 0 26 0 26 88 1 0 26 0 27 1 0 13
                                              0 14 2 0 13 0 13 85 2 0 40 40 41
                                              42 1 0 40 0 81 3 0 93 0 8 31 101
                                              5 0 0 40 41 41 59 15 92 4 0 0 40
                                              41 41 59 90 1 0 0 0 80 1 0 0 40
                                              91 1 0 108 0 1 1 0 7 0 63 1 0 78
                                              0 1 0 0 0 89 1 0 37 40 50 5 0 93
                                              0 8 31 31 35 96 2 0 93 0 8 97 5 0
                                              93 0 94 31 31 35 95 1 0 0 40 102
                                              1 0 103 0 107 2 0 93 0 8 100 2 0
                                              109 0 0 1)))))
           '|lookupComplete|)) 

(MAKEPROP '|GraphImage| 'NILADIC T) 
