From 59f3eb105ce152076e1926c01bfb3e47f7f96346 Mon Sep 17 00:00:00 2001 From: Matthew Deakos Date: Fri, 17 Nov 2017 17:01:12 -0500 Subject: [PATCH] visuals.py now runs in both python 2 and 3 --- projects/finding_donors/visuals.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/projects/finding_donors/visuals.py b/projects/finding_donors/visuals.py index 7c4c6f3446..16335206f8 100644 --- a/projects/finding_donors/visuals.py +++ b/projects/finding_donors/visuals.py @@ -72,11 +72,11 @@ def evaluate(results, accuracy, f1): for i in np.arange(3): # Creative plot code - ax[j/3, j%3].bar(i+k*bar_width, results[learner][i][metric], width = bar_width, color = colors[k]) - ax[j/3, j%3].set_xticks([0.45, 1.45, 2.45]) - ax[j/3, j%3].set_xticklabels(["1%", "10%", "100%"]) - ax[j/3, j%3].set_xlabel("Training Set Size") - ax[j/3, j%3].set_xlim((-0.1, 3.0)) + ax[j//3, j%3].bar(i+k*bar_width, results[learner][i][metric], width = bar_width, color = colors[k]) + ax[j//3, j%3].set_xticks([0.45, 1.45, 2.45]) + ax[j//3, j%3].set_xticklabels(["1%", "10%", "100%"]) + ax[j//3, j%3].set_xlabel("Training Set Size") + ax[j//3, j%3].set_xlim((-0.1, 3.0)) # Add unique y-labels ax[0, 0].set_ylabel("Time (in seconds)")