diff options
author | Jay Belanger <jay.p.belanger@gmail.com> | 2007-08-04 04:33:07 +0000 |
---|---|---|
committer | Jay Belanger <jay.p.belanger@gmail.com> | 2007-08-04 04:33:07 +0000 |
commit | def4f741fcdc831e203518b042f0f056458a3cf2 (patch) | |
tree | 3210d89e299f843ed5d4ffc79186cb4feb90210e /lisp/calc | |
parent | fa92d805be21e47724999588e3f22eeaebdf280b (diff) | |
download | emacs-def4f741fcdc831e203518b042f0f056458a3cf2.tar.gz |
(calc-curve-fit): Add "plot" indicator.
Diffstat (limited to 'lisp/calc')
-rw-r--r-- | lisp/calc/calcalg3.el | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/lisp/calc/calcalg3.el b/lisp/calc/calcalg3.el index 611e2d7f45d..287eb114ac2 100644 --- a/lisp/calc/calcalg3.el +++ b/lisp/calc/calcalg3.el @@ -134,9 +134,12 @@ "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)) @@ -145,13 +148,15 @@ ((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) |