Feature Request: Colorbar as legend for hue variable
Author: burt-sysbioCreated Jul 27, 2020Updated Jul 10, 2026
Labelswishlist
I often find myself creating a plot with multiple colored lines/dots and adding an additional colorbar as a legend using plt.colorbar(..) as in this SO post https://stackoverflow.com/questions/8342549/matplotlib-add-colorbar-to-a-sequence-of-line-plots . This is easy to do in matplotlib creating a mappable. However, it would be even smoother if one could provide this as a feature to the API, using the min and max of the hue variable to create a mappable object and from this adding a colorbar to the respective axis.
Source: mwaskom/seaborn