v0.4.0
I'm excited to finally release the new version of plot_likert, 0.4.0, with a whole set of improvements that have accumulated over the last few months.
New features & APIs
- #25 - Arbitrary arguments (kwargs) passed to the
plot_likert
function will get passed through to matplotlib - thank you @rnikiforova for the PR and the associated documentation improvements!
For instance, this lets you pass in an Axis object, and then the plot will be drawn on it. See #30 and the user guide for examples. - 683f399 - Allow pandas Series as inputs to
plot_likert
(previously only DataFrames could be inputs) - 6d334d9 - Add option to label each segment of the plot with the number of it represents. To use it, pass
bar_labels=True
toplot_likert
. See the docs for full example. Note that this requires matplotlib version 3.4.0 or higher
Improvements
- 117c0ea - Add built-in "likely" scale
- be59a47 - Add built-in color scheme for scales with 4 items
- a836a35, 7bc2cf8 - Reduce padding in plots
- e65f77f - Add built-in color scheme with a darker neutral color
API changes
#24 - API change for the plot_counts
function. (Note that this is a "secondary"/helper function. Most people probably use the plot_likert
entry point instead and are therefore unaffected.)
1. Deprecate the plot_percentage
parameter with a warning (but keep it around for backwards compatibility)
2. Add new parameter compute_percentages
that converts the count to percentages
Fixes
- ae0f8d0 - Change likert5 color scheme to support transparent background
- 08e19a5 - Ensure at least one tick mark always appears - thanks @rnikiforova!
- 055862f - Internal imports are no longer exposed in module object
- 08e96d5 - Fix bug that sometimes produced a
TypeError
when trying to plot data that hadNA
values