Skip to content

Instantly share code, notes, and snippets.

@DalyaG
Created May 9, 2020 20:38
Show Gist options
  • Save DalyaG/5b6faf3a523963ccaee3744a814f0846 to your computer and use it in GitHub Desktop.
Save DalyaG/5b6faf3a523963ccaee3744a814f0846 to your computer and use it in GitHub Desktop.
Show stacked bars by pet color
ax = df_grouped_color.plot.bar(stacked=True, color=['brown', 'black'])
ax.set_xticklabels(labels=df_grouped_color.index, rotation=70, rotation_mode="anchor", ha="right")
ax.set_xlabel('')
ax.set_ylabel('n_pets');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment