Skip to content

Commit

Permalink
Add xtick_interval argument to plot_likert function
Browse files Browse the repository at this point in the history
based on discussion in #18

It was previously only available in plot_counts.
  • Loading branch information
nmalkin committed Jun 11, 2021
1 parent 8766d13 commit da88cc4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
10 changes: 9 additions & 1 deletion plot_likert/plot_likert.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,7 @@ def plot_likert(
label_max_width: int = 30,
drop_zeros: bool = False,
figsize=None,
xtick_interval: typing.Optional[int] = None,
) -> matplotlib.axes.Axes:
"""
The purpose of this function is to combine all of the steps into one 'simple' function.
Expand All @@ -215,7 +216,14 @@ def plot_likert(
else:
counts = likert_counts(df_fixed, format_scale, label_max_width, drop_zeros)

return plot_counts(counts, plot_scale, plot_percentage, colors, figsize=figsize)
return plot_counts(
counts,
plot_scale,
plot_percentage,
colors,
figsize=figsize,
xtick_interval=xtick_interval,
)


def raw_scale(df: pd.DataFrame) -> pd.DataFrame:
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="plot-likert",
version="0.3.5",
version="0.3.6",
author="nmalkin",
description="Library to visualize results from Likert-style survey questions",
long_description=long_description,
Expand Down

0 comments on commit da88cc4

Please sign in to comment.