question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Figure legend not merging glyphs on the same data

See original GitHub issue

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:

image

However, my legend ends up looking like this:

image

Seems like a bug with the legend and the circles not being joined with the lines

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:11 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
bryevdvcommented, Sep 22, 2016

@Rubyj Thanks very much for raising this issue, we were about to release 0.12.3 but this is a showstopper. Please do try to always include version information from the start in future bug reports.

0reactions
bryevdvcommented, Sep 22, 2016

I’m inclined to think we should not try to be smart here: we leave legend exactly and only as it was before, and let label be exactly and only for the new convenient way

Read more comments on GitHub >

github_iconTop Results From Across the Web

Figure legend not merging glyphs on the same data - Community ...
So i have a legend created as follows: fig.line(x=“Week of”, y="% Under 14", source=source, ... Figure legend not merging glyphs on the same...
Read more >
14.5 Legend merging and splitting | ggplot2
The figure below shows how this works for points: if both colour and shape are mapped to the same variable, then only a...
Read more >
How to prevent ggplot2 from combining key glyphs? [duplicate]
Possible hacks off the top of my mind: Disguise a shape legend (with horizontal & vertical lines) as a colour legend (pro: less...
Read more >
15 Scales and guides | ggplot2
It does this by combining legends where the same variable is mapped to different aesthetics. The figure below shows how this works for...
Read more >
Legends in python | Andrew Wheeler
I made a simple function combo_legend(ax) to combine items that have the same label in such matplotlib figures. So they do not need...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found