import matplotlib.pyplot as plt
import seaborn as sns
hue_colors = {"col3_val1":"#808080","col3_val2":"#00FF00"}
sns.scatterplot(x="col1", y="col2", data=df,
hue="col3", # Subgroup according to color
hue_order=["col3_val2","col3_val1"], # Show legend in this order
palette=hue_colors)
# Alternative approach (Awesome customization)
sns.relplot(x="col1", y="col2", data=df, kind="scatter",
size= "col5", hue= "col6", style= "col7", alpha=0.4,
col="col3", col_wrap=2, # subgroup into columns, each column containing 2 plots max
col_order=["val1", "val2", "val3", "val4"]. # Legend order
row = "col4", # subgroup into rows
row_order=["valx", "valy"]) # Legend order
plt.show()