How can I group the colors shown in the picture below? If I show the legend, I see all the single value color.
ax1=sns.swarmplot(x='y', y='Fos', data=result, color="k", alpha=0.8, hue="y4", palette="Spectral")
plt.title('Y4');
ax1.get_legend().remove() #sns.move_legend(ax, "upper left", bbox_to_anchor=(1, 1))
plt.show()

You could create a new column with ranges of the continuous
huevalues.Here is an example with seaborn's
mpgdataset.