Add titles to the heatmaps
authorBenjamin M. Schwartz <bens@alum.mit.edu>
Sat, 31 May 2014 06:20:37 +0000 (23:20 -0700)
committerBenjamin M. Schwartz <bens@alum.mit.edu>
Sat, 31 May 2014 06:20:37 +0000 (23:20 -0700)
hist2d.py

index e49be7c..119a30a 100644 (file)
--- 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')

Benjamin Mako Hill || Want to submit a patch?