]> git.eshelyaron.com Git - emacs.git/commitdiff
(calc-curve-fit): Add "plot" indicator.
authorJay Belanger <jay.p.belanger@gmail.com>
Sat, 4 Aug 2007 04:33:07 +0000 (04:33 +0000)
committerJay Belanger <jay.p.belanger@gmail.com>
Sat, 4 Aug 2007 04:33:07 +0000 (04:33 +0000)
lisp/calc/calcalg3.el

index 611e2d7f45dc9b084a2089ef86707bafc3ed1832..287eb114ac2e1785ccece46191b9cb9aa5e6850d 100644 (file)
                   "P prefix = plot result"
                  "' = alg entry, $ = stack, u = Model1, U = Model2")))
      (while (not calc-curve-model)
-       (message "Fit to model: %s:%s"
-               (nth which msgs)
-               (if homog " h" ""))
+       (message 
+        (if plot
+            "Fit to model (plot): %s:%s"
+            "Fit to model: %s:%s")
+        (nth which msgs)
+        (if homog " h" ""))
        (setq key (read-char))
        (cond ((= key ?\C-g)
              (keyboard-quit))
             ((memq key '(?h ?H))
              (setq homog (not homog)))
              ((= key ?P)
-              (let ((data (calc-top 1)))
-                (if (or
-                     (calc-is-hyperbolic)
-                     (calc-is-inverse)
-                     (not (= (length data) 3)))
-                   (setq plot "Can't plot")
-                  (setq plot data))))
+              (if plot
+                  (setq plot nil)
+                (let ((data (calc-top 1)))
+                  (if (or
+                       (calc-is-hyperbolic)
+                       (calc-is-inverse)
+                       (not (= (length data) 3)))
+                      (setq plot "Can't plot")
+                    (setq plot data)))))
             ((progn
                (if (eq key ?\$)
                    (setq n 1)