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

x axis labels sometimes overlapping and misaligned #7

Closed nmalkin closed 3 years ago

nmalkin commented 4 years ago

I think this might only affect percentage graphs, and it only happens in certain data arrangements. I'll need to dig more to understand exactly when it happens.

Here's a specific test case:

d = {'Strongly disagree': {'q1': 10.0, 'q2': 20.0, 'q3': 0.0},
 'Disagree': {'q1': 10.0, 'q2': 20.0, 'q3': 100.0},
 'Neither agree nor disagree': {'q1': 70.0, 'q2': 10.0, 'q3': 0.0},
 'Agree': {'q1': 0.0, 'q2': 10.0, 'q3': 0.0},
 'Strongly agree': {'q1': 10.0, 'q2': 40.0, 'q3': 0.0}}
plot_likert.plot_counts(pd.DataFrame(d), plot_likert.scales.agree, plot_percentage=True);

Screen Shot 2020-07-14 at 15 31 16

nmalkin commented 3 years ago

I can no longer reproduce this issue (likely due to the new interval calculation algorithm in #11). Also, none of the randomly-generated sample graphs seem to display it, which is promising. So I'll keep an eye out for any problems, but I'll close this issue for now.