Add titles to the heatmaps
[matplotlib-cdsw] / hist2d.py
index e49be7c6cdeb208817781950550d24216eb91d01..119a30a75bff9ea9a90fc7381ce48f616d0bdf71 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?