Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] height off-by-one bug? #34

Closed
hartwork opened this issue Nov 5, 2019 · 1 comment
Closed

[Python] height off-by-one bug? #34

hartwork opened this issue Nov 5, 2019 · 1 comment
Assignees

Comments

@hartwork
Copy link

hartwork commented Nov 5, 2019

This looks like an off-by-one bug for height — can you confirm?

In [9]: print(asciichartpy.plot([0, 0, 1, 2], {'height': 1}))
    2.00  ┼  ╭ 
    0.00  ┼──╯ 

In [10]: print(asciichartpy.plot([0, 0, 1, 2], {'height': 2}))
    2.00  ┼  ╭ 
    1.00  ┤ ╭╯ 
    0.00  ┼─╯  

In [11]: print(asciichartpy.plot([0, 0, 1, 2], {'height': 5}))
    2.00  ┼  ╭ 
    1.60  ┤  │ 
    1.20  ┤  │ 
    0.80  ┤ ╭╯ 
    0.40  ┤ │  
    0.00  ┼─╯  
@kroitor kroitor self-assigned this Nov 5, 2019
@kroitor
Copy link
Owner

kroitor commented Nov 5, 2019

@hartwork yep, check this out:

I suggest to move this discussion there )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants