nmalkin/plot-likert

Scale is not centered when zeros are included.

Closed this issue · 4 comments

In this case, the middle option is on the right.

Example attached.
Screenshot from 2021-11-23 20-42-07

PS: is it possible to create custom names for the legend (even though the answers are in the format (1-7)?

Thank you for reporting this bug! I tracked down the issue and made a fix in commit 433a224.

Here's your sample code with the fix applied:

If you have other test cases you've been working with, can you verify that the fix works for them too? (You can pip install git+https://github.com/nmalkin/plot-likert.git to get the patched version.) Assuming it works, I'd like to cut a new release.

PS: is it possible to create custom names for the legend (even though the answers are in the format (1-7)?

Yep, this should be possible using the legend method on the axes object

2

Unfortunately, there's a little bit of funkiness because there are some invisible elements in the plot that get labeled if you just pass in the names directly. In this screenshot, I hid them by passing in special '_' values, but that produces the warnings you see above the graph. If you (or anyone reading) can figure out a way to do this more cleanly, please let me know; we can incorporate it into the user guide!

Released 0.3.7. Thanks again for reporting this!

Many thanks for the quick fix and the help regarding the legend!