Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add scaling of the y axis for demographic subgroup plots #28

Merged
merged 4 commits into from
Mar 31, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions analysis/rate_calculations.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@
column_to_plot="rate",
category=None,
y_label=None,
autoscale=False,
vlines=vertical_lines
)

Expand Down
5 changes: 4 additions & 1 deletion analysis/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,7 @@ def plot_measures(
column_to_plot,
category=False,
y_label="Percentage of achievement",
autoscale=True,
vlines=[]
):
"""Produce time series plot from measures table. One line is plotted for each sub
Expand Down Expand Up @@ -314,7 +315,9 @@ def plot_measures(
plt.xticks(rotation="horizontal")

plt.title(title)
plt.ylim(bottom=0, top=1)

plt.autoscale(enable=autoscale)

plt.gca().set_yticklabels(
["{:.0f}%".format(x * 100) for x in plt.gca().get_yticks()]
)
Expand Down