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

Fix for exact specification of plot height. #29

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Commits on Jul 1, 2019

  1. Clean up Python code.

    This removes a handful of unnecessary uses of `abs`, `float`, and `int` and also puts in a check to ensure that the maximum value for the plot is greater than the minimum value. No functionality is changed here.
    neighthan committed Jul 1, 2019
    Configuration menu
    Copy the full SHA
    3be1dff View commit details
    Browse the repository at this point in the history
  2. Fix for exact specification of plot height.

    This changes a bit of the logic for making the plot, some of which wasn't really necessary but made it easier / less confusing for me to work on it. `ratio` is the reciprocal of what it was before (it's now the change in y when you move up one row in the plot). The plot is stored in reverse order compared to before when in list form (e.g. `result[0]` is now the bottom row of the plot instead of the top one; I reverse the rows before joining them into the final plot string to make up for this). The actual change is a rework to how we convert from the data space to the row space of the plot which makes it (IMHO) less complex (removes `max2` and `min2`) and easy to guarantee exactly what the height is. Admittedly, I'm not sure what the thought process was behind the old method, so there may be some drawback that I haven't considered.
    neighthan committed Jul 1, 2019
    Configuration menu
    Copy the full SHA
    3069095 View commit details
    Browse the repository at this point in the history