☰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

Legend order

Community Support
Sarah_Bird2
Sarah_Bird2

Hi all,

I have a plot with 7 patches on it. They were added individually so I could specify a legend for each.

In the legend box, the items are not appearing in the same order the patches were added. I see this is also the same here: http://bokeh.pydata.org/docs/gallery/legend.html - the legend order is: [3sin, sin, 2sin] but the lines were added [sin, 2sin, 3sin].

Is there any way to specify the order of the legend or to force it to render in the same order that plotting functions are added?

Many thanks,

Sarah Bird

⌁   Link to post
Sarah_Bird2
Sarah_Bird2

Never mind, I see this is a known bug: Legends don't appear on a plot in the order they're given · Issue #926 · bokeh/bokeh · GitHub

···

On Wednesday, 6 August 2014 10:04:16 UTC-7, Sarah Bird wrote:

Hi all,

I have a plot with 7 patches on it. They were added individually so I could specify a legend for each.

In the legend box, the items are not appearing in the same order the patches were added. I see this is also the same here: http://bokeh.pydata.org/docs/gallery/legend.html - the legend order is: [3sin, sin, 2sin] but the lines were added [sin, 2sin, 3sin].

Is there any way to specify the order of the legend or to force it to render in the same order that plotting functions are added?

Many thanks,

Sarah Bird

⌁   Link to post
Damian_Avila
Damian_Avila

Yes, I was writing you about the already open issue… we will try to come up with a fix soon.

···

On Wed, Aug 6, 2014 at 2:18 PM, Sarah Bird sarah@aptivate.org wrote:

Never mind, I see this is a known bug: https://github.com/ContinuumIO/bokeh/issues/926

On Wednesday, 6 August 2014 10:04:16 UTC-7, Sarah Bird wrote:

Hi all,

I have a plot with 7 patches on it. They were added individually so I could specify a legend for each.

In the legend box, the items are not appearing in the same order the patches were added. I see this is also the same here: http://bokeh.pydata.org/docs/gallery/legend.html - the legend order is: [3sin, sin, 2sin] but the lines were added [sin, 2sin, 3sin].

Is there any way to specify the order of the legend or to force it to render in the same order that plotting functions are added?

Many thanks,

Sarah Bird

–

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/93e8336f-ba7a-493a-942f-271bafcea990%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