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
It is related to the inability to have multiple-columns in a bokeh legend (#4529).
The Suggestion
I've seen that Overlay has a multiple_legends parameter that I was unable to use properly. I think that a good utilization of this property that also applies to the above issue is to allow different legends for "underlying" overlays to be separate when this option is applied. For example, to allow something like the following:
overlay_1= (hv.Curve([1, 2, 3], label='A') *hv.Curve([3, 2, 1], label='B')).opts(legend_position='bottom_right')
overlay_2= (hv.Curve([1, 3, 2], label='C') *hv.Curve([2, 3, 1], label='D')).opts(legend_position='top_left')
overlay= (overlay_1*overlay_2).opts(multiple_legends=True)
# ----> A plot with 4 graphs and two legends - ['A', 'B'] @ the bottom-right point, and ['C', 'D'] @ the top-left point.
Going into the legend-creation code in bokeh/element.py, it seems that the infrastructure is already there - at least for the case when both legends are placed alongside each other.
Also, in the case when legend_cols=int (as in the above issue), the LegendItems of the original legend could be split equally into the number of columns, and placed alongside eachother - similar to the suggested multiple_legends option.
The text was updated successfully, but these errors were encountered:
Related Issues
It is related to the inability to have multiple-columns in a bokeh legend (#4529).
The Suggestion
I've seen that
Overlay
has amultiple_legends
parameter that I was unable to use properly. I think that a good utilization of this property that also applies to the above issue is to allow different legends for "underlying" overlays to be separate when this option is applied. For example, to allow something like the following:Going into the legend-creation code in
bokeh/element.py
, it seems that the infrastructure is already there - at least for the case when both legends are placed alongside each other.Also, in the case when
legend_cols=int
(as in the above issue), theLegendItem
s of the original legend could be split equally into the number of columns, and placed alongside eachother - similar to the suggestedmultiple_legends
option.The text was updated successfully, but these errors were encountered: