comparison lisp/calc/calc-graph.el @ 112392:70d7e5c6e611

calc/calc-prog.el calc/calc-graph.el calc/calc-map.el: Change `arglist' to `math-arglist' throughout.
author Jay Belanger <jay.p.belanger@gmail.com>
date Thu, 20 Jan 2011 21:48:26 -0600
parents ef719132ddfa
children
comparison
equal deleted inserted replaced
112391:93209af5dc0b 112392:70d7e5c6e611
573 calc-graph-xvalue (nth 2 calc-graph-xvalue)) 573 calc-graph-xvalue (nth 2 calc-graph-xvalue))
574 (if (math-realp calc-graph-xvalue) 574 (if (math-realp calc-graph-xvalue)
575 (setq calc-graph-xstep 1) 575 (setq calc-graph-xstep 1)
576 (error "%s is not a suitable basis for %s" calc-graph-xname calc-graph-yname))))) 576 (error "%s is not a suitable basis for %s" calc-graph-xname calc-graph-yname)))))
577 (or (math-realp calc-graph-yvalue) 577 (or (math-realp calc-graph-yvalue)
578 (let ((arglist nil)) 578 (let ((math-arglist nil))
579 (setq calc-graph-yvalue (math-evaluate-expr calc-graph-yvalue)) 579 (setq calc-graph-yvalue (math-evaluate-expr calc-graph-yvalue))
580 (calc-default-formula-arglist calc-graph-yvalue) 580 (calc-default-formula-arglist calc-graph-yvalue)
581 (or arglist 581 (or math-arglist
582 (error "%s does not contain any unassigned variables" calc-graph-yname)) 582 (error "%s does not contain any unassigned variables" calc-graph-yname))
583 (and (cdr arglist) 583 (and (cdr math-arglist)
584 (error "%s contains more than one variable: %s" 584 (error "%s contains more than one variable: %s"
585 calc-graph-yname arglist)) 585 calc-graph-yname math-arglist))
586 (setq calc-graph-yvalue (math-expr-subst calc-graph-yvalue 586 (setq calc-graph-yvalue (math-expr-subst calc-graph-yvalue
587 (math-build-var-name (car arglist)) 587 (math-build-var-name (car math-arglist))
588 '(var DUMMY var-DUMMY))))) 588 '(var DUMMY var-DUMMY)))))
589 (setq calc-graph-ycache (assoc calc-graph-yvalue calc-graph-data-cache)) 589 (setq calc-graph-ycache (assoc calc-graph-yvalue calc-graph-data-cache))
590 (delq calc-graph-ycache calc-graph-data-cache) 590 (delq calc-graph-ycache calc-graph-data-cache)
591 (nconc calc-graph-data-cache 591 (nconc calc-graph-data-cache
592 (list (or calc-graph-ycache (setq calc-graph-ycache (list calc-graph-yvalue))))) 592 (list (or calc-graph-ycache (setq calc-graph-ycache (list calc-graph-yvalue)))))
734 (setq calc-graph-xp calc-graph-xvalue 734 (setq calc-graph-xp calc-graph-xvalue
735 calc-graph-yp calc-graph-y3value 735 calc-graph-yp calc-graph-y3value
736 calc-graph-zp calc-graph-yvalue 736 calc-graph-zp calc-graph-yvalue
737 calc-graph-xvec t)) 737 calc-graph-xvec t))
738 (or (math-realp calc-graph-yvalue) 738 (or (math-realp calc-graph-yvalue)
739 (let ((arglist nil)) 739 (let ((math-arglist nil))
740 (setq calc-graph-yvalue (math-evaluate-expr calc-graph-yvalue)) 740 (setq calc-graph-yvalue (math-evaluate-expr calc-graph-yvalue))
741 (calc-default-formula-arglist calc-graph-yvalue) 741 (calc-default-formula-arglist calc-graph-yvalue)
742 (setq arglist (sort arglist 'string-lessp)) 742 (setq math-arglist (sort math-arglist 'string-lessp))
743 (or (cdr arglist) 743 (or (cdr math-arglist)
744 (error "%s does not contain enough unassigned variables" calc-graph-yname)) 744 (error "%s does not contain enough unassigned variables" calc-graph-yname))
745 (and (cdr (cdr arglist)) 745 (and (cdr (cdr math-arglist))
746 (error "%s contains too many variables: %s" calc-graph-yname arglist)) 746 (error "%s contains too many variables: %s" calc-graph-yname math-arglist))
747 (setq calc-graph-yvalue (math-multi-subst calc-graph-yvalue 747 (setq calc-graph-yvalue (math-multi-subst calc-graph-yvalue
748 (mapcar 'math-build-var-name 748 (mapcar 'math-build-var-name
749 arglist) 749 math-arglist)
750 '((var DUMMY var-DUMMY) 750 '((var DUMMY var-DUMMY)
751 (var DUMMY2 var-DUMMY2)))))) 751 (var DUMMY2 var-DUMMY2))))))
752 (if (setq calc-graph-xvec (eq (car-safe calc-graph-xvalue) 'vec)) 752 (if (setq calc-graph-xvec (eq (car-safe calc-graph-xvalue) 'vec))
753 (setq calc-graph-numsteps (1- (length calc-graph-xvalue))) 753 (setq calc-graph-numsteps (1- (length calc-graph-xvalue)))
754 (if (and (eq (car-safe calc-graph-xvalue) 'intv) 754 (if (and (eq (car-safe calc-graph-xvalue) 'intv)