You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A long-requested feature (see e.g. #32) (probably the second most asked-for feature, after built-in webmaps) is the ability to have multiple legends on a single plot. E.g. if a plot uses both hue and scale visual variables, it makes sense to have both a hue and a scale legend. However, currently only a single legend for one or the other is allowed—not both.
What to do if one legend is a colorbar legend and the other a regular legend?
What happens if we add a third visual variable to the plot in the future? How would our handing of legends adapt?
How would this interact with the legend and legend_var parameters?
It appears that legend positions cannot be inferred automatically more than once:
Sometimes it is more clear to split legend entries across multiple legends. Whilst the instinctive approach to doing this might be to call the legend() function multiple times, you will find that only one legend ever exists on the Axes. This has been done so that it is possible to call legend() repeatedly to update the legend to the latest handles on the Axes, so to persist old legend instances, we must add them manually to the Axes:
The text was updated successfully, but these errors were encountered:
A long-requested feature (see e.g. #32) (probably the second most asked-for feature, after built-in webmaps) is the ability to have multiple legends on a single plot. E.g. if a plot uses both
hue
andscale
visual variables, it makes sense to have both ahue
and ascale
legend. However, currently only a single legend for one or the other is allowed—not both.matplotlib
allows creating multiple legends on the same axis, with some reservations. Some trickiness that comes up when considering implementing this feature:What to do if one legend is a colorbar legend and the other a regular legend?
What happens if we add a third visual variable to the plot in the future? How would our handing of legends adapt?
How would this interact with the
legend
andlegend_var
parameters?It appears that legend positions cannot be inferred automatically more than once:
The text was updated successfully, but these errors were encountered: