Skip to content

Instantly share code, notes, and snippets.

@trevismd
Last active July 21, 2021 15:20
Show Gist options
  • Save trevismd/3529fa0b35e220aa87c9952ef9c287fb to your computer and use it in GitHub Desktop.
Save trevismd/3529fa0b35e220aa87c9952ef9c287fb to your computer and use it in GitHub Desktop.
Making Plot 4
# Switching hue and x
hue_plot_params = {
'data': rfs,
'x': 'State',
'y': 'Goal',
"order": states_order,
"hue": "Subcategory",
"hue_order": subcat_order,
"palette": subcat_palette
}
with sns.plotting_context("notebook", font_scale = 1.4):
# Create new plot
ax = get_log_ax()
# Plot with seaborn
ax = sns.boxplot(ax=ax, **hue_plot_params)
# Label and show
add_legend(ax)
label_plot_for_states(ax)
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment