axs[1].legend(frameon=False, loc=params["legendloc"])
// row categories / experimental groups in ddata
if "rowcat" in ddata:
if params["rowcat"] == "":
// simply take a random key
rowcat = list(ddata["rowcat"].keys())[0]
After Change
axs[1].legend(frameon=False, loc=params["legendloc"])
// sample annotation in adata
if len(adata.smp_keys()) > 0:
if params["smp"] == "":
smp = adata.smp_keys()[0]
sett.m(0, "coloring according to", smp)