'Negative histogram y-values in Racket
Solution 1:[1]
discrete-histogram has one required argument cat-vals, so you should use '((A 1.2) (B 0.2) (C -0.4)) or (if you already have list of X values and list of Y values) (map list '(A B C) '(1.2 0.2 -0.4)):
#lang racket
(require plot)
(plot (discrete-histogram
(map list '(A B C) '(1.2 0.2 -0.4))
#:y-min -0.5))
In both cases, I see this result:
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Martin Půda |


