code: def dpt_groups_pseudotime(adata, color_map=None, palette=None, show=None, save=None):
      
      pl.figure()
      pl.subplot(211)
      timeseries_subplot(adata.obs['dpt_groups'].cat.codes,
                         time=adata.obs['dpt_order'].values,
                         color=np.asarray(adata.obs['dpt_groups']),
                         highlightsX=adata.uns['dpt_changepoints'],
                         ylabel='dpt groups',
                         yticks=(np.arange(len(adata.obs['dpt_groups'].cat.categories), dtype=int)
                                       if len(adata.obs['dpt_groups'].cat.categories) < 5 else None),
                         palette=palette)
      pl.subplot(212)
      timeseries_subplot(adata.obs['dpt_pseudotime'].values,
                         time=adata.obs['dpt_order'].values,
                         color=adata.obs['dpt_pseudotime'].values,
                         xlabel='dpt order',
                         highlightsX=adata.uns['dpt_changepoints'],
                         ylabel='pseudotime',
                         yticks=[0, 1],
                         color_map=color_map)
      utils.savefig_or_show('dpt_groups_pseudotime', save=save, show=show)
docs: Plot groups and pseudotime.