Closed charliertm closed 2 years ago
Hi! Thank you for identifying this issue and submitting a PR for it. I appreciate your taking the time to improve this library!
Issue
When using _plotcount to plot a graph, _plotpercentages seemed to only just add a percentage sign on to the end of the number of respondents rather than convert the number of responses to percentages.
I think the reason this behavior exists is because _plotcounts is honestly mostly an internal method, and the preferred/main method to use for plotting is _plotlikert, which already does the exact conversion you're suggesting:
That said, since plot_counts
is being exposed, I agree that its behavior is confusing and unexpected, so I think the change you're proposing makes sense.
I'll try out your patch when I have a bit more time, but thanks again for submitting it! I'll try to get around to it soon.
I finally got around to fixing this issue in #24 . Thanks again for raising this and proposing a fix!
Issue
When using _plotcount to plot a graph, _plotpercentages seemed to only just add a percentage sign on to the end of the number of respondents rather than convert the number of responses to percentages.
Soloution
Modified the _likertpercentage function to be able to accept dataframes which are already counted and then added a conditional in _plotcount to modify the dataframe accordingly if _plotpercentages=True.