Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Use set_xticks(ticks, labels) instead of a separate set_xticklabels()#20636
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -88,14 +88,12 @@ def plot_student_results(student, scores, cohort_size): | ||
# Set the right-hand Y-axis ticks and labels | ||
ax2 = ax1.twinx() | ||
# Set the tick locations and labels | ||
ax2.set_yticks( | ||
pos, labels=[format_score(scores[k].score, k) for k in test_names]) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. not sure if wrapping format_score in a funcformatter would be helpful here or there's already too much going on in this example There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. There are some more cleanups to be done in that example. I've made a note to have a look at it later. For simplicity, I'll keep this PR as is. | ||
# Set equal limits on both yaxis so that the ticks line up | ||
ax2.set_ylim(ax1.get_ylim()) | ||
ax2.set_ylabel('Test Scores') | ||
xlabel = ('Percentile Ranking Across {grade} Grade {gender}s\n' | ||