Skip to content

Commit

Permalink
Resize confusion matrix properly (#3109)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnavgarg1 authored and jeffkinnison committed Feb 17, 2023
1 parent d67feca commit 91f4da3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ludwig/utils/visualization_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,8 +1134,8 @@ def confusion_matrix_plot(
# Dynamically set the size of the plot based on the number of labels
# Use minimum size to prevent plot from being too small
default_width, default_height = plt.rcParams.get("figure.figsize")
width = max(default_width, len(labels) / 2)
height = max(default_height, len(labels) / 2)
width = max(default_width, len(labels))
height = max(default_height, len(labels))
fig, ax = plt.subplots(figsize=(width, height))

ax.invert_yaxis()
Expand Down

0 comments on commit 91f4da3

Please sign in to comment.