Function: chart-translate-ypos
chart-translate-ypos is a byte-compiled function defined in
chart.el.gz.
Signature
(chart-translate-ypos ARG &rest ARGS)
Implementations
(chart-translate-ypos (C chart) Y) in `chart.el'.
Translate in chart C the coordinate Y into a screen row.
Source Code
;; Defined in /usr/src/emacs/lisp/emacs-lisp/chart.el.gz
(cl-defmethod chart-translate-ypos ((c chart) y)
"Translate in chart C the coordinate Y into a screen row."
(let ((range (oref (oref c y-axis) bounds)))
(+ (oref c x-margin)
(- (oref c y-width)
(round (* (float (- y (car range)))
(/ (float (oref c y-width))
(float (- (cdr range) (car range)))))))))
)