Function: calc-graph-set-range
calc-graph-set-range is a byte-compiled function defined in
calc-graph.el.gz.
Signature
(calc-graph-set-range CMD RANGE)
Source Code
;; Defined in /usr/src/emacs/lisp/calc/calc-graph.el.gz
(defun calc-graph-set-range (cmd range)
(if (equal range "$")
(calc-wrapper
(let ((val (calc-top-n 1)))
(if (and (eq (car-safe val) 'intv) (math-constp val))
(setq range (concat
(math-format-number (math-float (nth 2 val))) ":"
(math-format-number (math-float (nth 3 val)))))
(if (and (eq (car-safe val) 'vec)
(= (length val) 3))
(setq range (concat
(math-format-number (math-float (nth 1 val))) ":"
(math-format-number (math-float (nth 2 val)))))
(error "Range specification must be an interval or 2-vector")))
(calc-pop-stack 1))))
(if (string-match "\\[.+\\]" range)
(setq range (substring range 1 -1)))
(if (and (not (string-search ":" range))
(or (string-match "," range)
(string-match " " range)))
(aset range (match-beginning 0) ?\:))
(calc-graph-set-command cmd (if (not (equal range ""))
(concat "[" range "]"))))