`qiime.plot_taxa_summary.make_legend` works really well, suggest using it in this case; either in this or in a separate pull request as @jrrideout suggests.