Last active
July 21, 2021 15:20
-
-
Save trevismd/3529fa0b35e220aa87c9952ef9c287fb to your computer and use it in GitHub Desktop.
Making Plot 4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 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