textplots-rs
textplots-rs copied to clipboard
Top is missing in Bars
⡁ ⡇ 3.0
⠄ ⡇
⠂ ⡇
⡁ ⡇
⠄ ⡇
⠂ ⡇
⡁ ⡇
⠄ ⡇
⠂ ⡇
⡁ ⡇
⠄ ⡏⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⡇
⠂ ⡇ ⡇
⡁ ⡇ ⡇
⠄ ⡇ ⡇
⠂ ⡇ ⡇
⡁ ⡇ ⡇
⠄ ⡇ ⡇
⠂ ⡇ ⡇
⡁ ⡇ ⡇
⠄ ⡇ ⡇
⠁ ⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠁ 1.0
0.0 3.0
The first bar is missing its roof.
Thanks @ahcm! Could you provide the code you use to draw the bars?
https://github.com/ahcm/hist-cli Test e.g. with:
$ echo 3 2 2 3 3 4 4 4 4 | tr ' ' '\n' | hist -t
Also I would rather have y-axis start at 0. But I don't know how.
@ahcm both seeing the top and having y start at 0 should now be possible with #33 merged
With
Chart::new_with_y_range(width, height, xmin, xmax, 0.0, y_dim)
I get a fixed y-axis. How do I get a roof?
$ echo 3 2 2 3 3 4 4 4 4 | tr ' ' '\n' | ./target/release/hist -t
⡁ 5.0
⠄
⠂
⡁
⠄ ⢸
⠂ ⢸
⡁ ⢸
⠄ ⢸
⠂ ⢸⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⢹
⡁ ⢸ ⢸
⠄ ⢸ ⢸
⠂ ⢸ ⢸
⡁ ⢸ ⢸⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⠉⡇
⠄ ⢸ ⢸ ⡇
⠂ ⢸ ⢸ ⡇
⡁ ⢸ ⢸ ⡇
⠄ ⢸ ⢸ ⡇
⠂ ⢸ ⢸ ⡇
⡁ ⢸ ⢸ ⡇
⠄ ⢸ ⢸ ⡇
⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈⠈⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈⠈⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈ ⠁⠈⠁ 0.0
0.0 3.0
See here https://github.com/loony-bean/textplots-rs/issues/43#issuecomment-1666939995