code: def make_figure_hmaps(extractors, what):
      
      import matplotlib.pyplot as plt
      fig = plt.figure()
      ncalcs = len(extractors)
      for i, ex in enumerate(extractors):
          oq = ex.oqparam
          n_poes = len(oq.poes)
          sitecol = ex.get('sitecol')
          hmaps = ex.get(what)
          [imt] = hmaps.imt
          [kind] = hmaps.kind
          for j, poe in enumerate(oq.poes):
              ax = fig.add_subplot(n_poes, ncalcs, j * ncalcs + i + 1)
              ax.grid(True)
              ax.set_xlabel('hmap for IMT=%s, kind=%s, poe=%s\ncalculation %d, '
                            'inv_time=%dy' %
                            (imt, kind, poe, ex.calc_id, oq.investigation_time))
              bmap = basemap('cyl', sitecol)
              bmap.scatter(sitecol['lon'], sitecol['lat'],
                           c=hmaps[kind][:, 0, j], cmap='jet')
      return plt
docs: $ oq plot 'hmaps?kind=mean&imt=PGA'