nmalkin / plot-likert

Python library to visualize results from Likert scale survey questions
BSD 3-Clause "New" or "Revised" License
102 stars 25 forks source link

New interval calculation #11

Closed nmalkin closed 3 years ago

nmalkin commented 3 years ago

This PR introduces a new algorithm for laying out the tick marks on the graphs' x-axis. Instead of setting the interval to a value based entirely on the width of the figure (which can result in labels at awkward interval such as 9, 18, 27, etc.), the new code tries to be more flexible and choose more "round" numbers (multiples of 5 or 10).

The PR also includes samples of outputs with the new algorithm.

This issue was first brought up in #4 and a solution was discussed in #5. See those issues for more context.