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

Matplotlib compatibility issues #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
12 changes: 8 additions & 4 deletions confusion_matrix_pretty_print.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,13 +160,17 @@ def pretty_plot_confusion_matrix(df_cm, annot=True, cmap="Oranges", fmt='.2f', f
ax.set_xticklabels(ax.get_xticklabels(), rotation = 45, fontsize = 10)
ax.set_yticklabels(ax.get_yticklabels(), rotation = 25, fontsize = 10)

# axis settings: avoiding cutting off edges
bottom, top = ax.get_ylim()
ax.set_ylim(bottom + 0.5, top - 0.5)

# Turn off all the ticks
for t in ax.xaxis.get_major_ticks():
t.tick1On = False
t.tick2On = False
t.tick1line.set_visible = False
t.tick2line.set_visible = False
for t in ax.yaxis.get_major_ticks():
t.tick1On = False
t.tick2On = False
t.tick1line.set_visible = False
t.tick2line.set_visible = False

#face colors list
quadmesh = ax.findobj(QuadMesh)[0]
Expand Down