☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Figure legend not merging glyphs on the same data

Community Support
Reuben_Jacobs
Reuben_Jacobs

So i have a legend created as follows:

fig.line(x=“Week of”, y="% Under 14", source=source, line_width=2, legend="% Under 14 Days", line_color=“blue”)

fig.circle(x=“Week of”, y="% Under 14", source=source, fill_color=“white”, size=8, legend="% Under 14 Days", line_color=“blue”)

fig.line(x=“Week of”, y="% Under 21", source=source, line_width=2, line_color=“red”, legend="% Under 21 Days")

fig.circle(x=“Week of”, y="% Under 21", source=source, fill_color=“white”, size=8, legend="% Under 21 Days", line_color=“red”)

``

Like in the example at legend.py — Bokeh 2.4.2 Documentation I would expect my legend to look something like

However, my legend ends up looking like this:

Is this a bug with the legend?

Thanks,

Reuben

⌁   Link to post
Bryan
Bryan

Seems like a bug, please file a GH issue.

Thanks,

Bryan

···

On Sep 21, 2016, at 10:16 AM, Reuben Jacobs <reuben.jacobs1@gmail.com> wrote:

So i have a legend created as follows:

    fig.line(x="Week of", y="% Under 14", source=source, line_width=2, legend="% Under 14 Days", line_color="blue")
    fig.circle(x="Week of", y="% Under 14", source=source, fill_color="white", size=8, legend="% Under 14 Days", line_color="blue")
    fig.line(x="Week of", y="% Under 21", source=source, line_width=2, line_color="red", legend="% Under 21 Days")
    fig.circle(x="Week of", y="% Under 21", source=source, fill_color="white", size=8, legend="% Under 21 Days", line_color="red")

Like in the example at http://bokeh.pydata.org/en/latest/docs/gallery/legend.html I would expect my legend to look something like

However, my legend ends up looking like this:

Is this a bug with the legend?

Thanks,
Reuben

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ebde425f-99a5-458b-a66a-f1112185183b%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post
Reuben_Jacobs
Reuben_Jacobs

I turned this post into a GH issue here: Figure legend not merging glyphs on the same data · Issue #5202 · bokeh/bokeh · GitHub

···

On Wednesday, September 21, 2016 at 11:47:39 AM UTC-4, Bryan Van de ven wrote:

Seems like a bug, please file a GH issue.

Thanks,

Bryan

On Sep 21, 2016, at 10:16 AM, Reuben Jacobs reuben....@gmail.com wrote:

So i have a legend created as follows:

fig.line(x="Week of", y="% Under 14", source=source, line_width=2, legend="% Under 14 Days", line_color="blue")
fig.circle(x="Week of", y="% Under 14", source=source, fill_color="white", size=8, legend="% Under 14 Days", line_color="blue")  
fig.line(x="Week of", y="% Under 21", source=source, line_width=2, line_color="red", legend="% Under 21 Days")
fig.circle(x="Week of", y="% Under 21", source=source, fill_color="white", size=8, legend="% Under 21 Days", line_color="red")  

Like in the example at http://bokeh.pydata.org/en/latest/docs/gallery/legend.html I would expect my legend to look something like

However, my legend ends up looking like this:

Is this a bug with the legend?

Thanks,

Reuben

–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.

To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+un...@continuum.io.

To post to this group, send email to bo...@continuum.io.

To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/ebde425f-99a5-458b-a66a-f1112185183b%40continuum.io.

For more options, visit https://groups.google.com/a/continuum.io/d/optout.

⌁   Link to post

End of archived discussion · Replies are disabled