From 28f82345e280b5c728cec1cdfa65977768f30ca1 Mon Sep 17 00:00:00 2001 From: Xinhai Wang Date: Mon, 20 Nov 2017 18:28:13 +0800 Subject: [PATCH 1/2] Update coding mistake in getting_data.py --- code/getting_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code/getting_data.py b/code/getting_data.py index 0c2224c8..9c985ce6 100644 --- a/code/getting_data.py +++ b/code/getting_data.py @@ -69,7 +69,7 @@ def plot_years(plt, books): if get_year(book) <= 2014) years = sorted(year_counts) - book_counts = [year_counts[year] for year in x] + book_counts = [year_counts[year] for year in years] plt.bar([x - 0.5 for x in years], book_counts) plt.xlabel("year") plt.ylabel("# of data books") From 42782e24a98662a90cea52aea740611a27c2a9ce Mon Sep 17 00:00:00 2001 From: Xinhai Wang Date: Mon, 20 Nov 2017 18:29:12 +0800 Subject: [PATCH 2/2] Update coding mistake in getting_data.py --- code-python3/getting_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/code-python3/getting_data.py b/code-python3/getting_data.py index 775513ec..2c83ad77 100644 --- a/code-python3/getting_data.py +++ b/code-python3/getting_data.py @@ -68,7 +68,7 @@ def plot_years(plt, books): if get_year(book) <= 2014) years = sorted(year_counts) - book_counts = [year_counts[year] for year in x] + book_counts = [year_counts[year] for year in years] plt.bar([x - 0.5 for x in years], book_counts) plt.xlabel("year") plt.ylabel("# of data books")