From: Benjamin M. Schwartz Date: Sat, 31 May 2014 06:20:37 +0000 (-0700) Subject: Add titles to the heatmaps X-Git-Url: https://projects.mako.cc/source/matplotlib-cdsw/commitdiff_plain/49ab9e13efd5d347d82436888ca3c1a44f635559 Add titles to the heatmaps --- diff --git a/hist2d.py b/hist2d.py index e49be7c..119a30a 100644 --- a/hist2d.py +++ b/hist2d.py @@ -15,6 +15,7 @@ axes1 = figure.add_subplot(1,2,1) h1 = axes1.hist2d(firstedits_male, birth_years_male, range=[[min_firstedit, max_firstedit], [1750, 2014]], bins=50) figure.colorbar(h1[3]) axes1.xaxis.set_major_formatter(dates.AutoDateFormatter(dates.AutoDateLocator())) +axes1.set_title('Male') firstedits_female = dates.date2num(wikibios.columns_female['firstedit']) birth_years_female = wikibios.columns_female['birth_year'] @@ -23,5 +24,6 @@ axes2 = figure.add_subplot(1,2,2) h2 = axes2.hist2d(firstedits_female, birth_years_female, range=[[min_firstedit, max_firstedit], [1750, 2014]], bins=50) figure.colorbar(h2[3]) axes2.xaxis.set_major_formatter(dates.AutoDateFormatter(dates.AutoDateLocator())) +axes2.set_title('Female') figure.savefig('hist2d.png')