Legend-ordering issue

Hi, I’ve run into the issue that my legend re-orders randomly. See the legend in the top-right of my plot below.

I see that this was a github issue that was solved by passing a list, but I tried that and got an error, and I don’t see much information in the documentation.
What’s the best way to modify my code to fix the ordering issue? Please let me know, thank you!

p.scatter(x_axis,
          y_axis,
          source=source,
          fill_color={'field': 'sector_revised', 'transform': color_mapper},
          line_color=None,
          legend={'field': 'sector_revised'},
          )

Hi,

The "auto legend from field" is a nice recent feature, but it probably needs some additional development to make the legend order stable across updates (or to provide a hook for the items to be sorted as desired). This would be a good feature to add. Can you make a GitHub feature request issue with this information?

Thanks,

Bryan

···

On Mar 13, 2017, at 12:40, [email protected] wrote:

Hi, I've run into the issue that my legend re-orders randomly. See the legend in the top-right of my plot below.

I see that this was a github issue that was solved by passing a list, but I tried that and got an error, and I don't see much information in the documentation.
What's the best way to modify my code to fix the ordering issue? Please let me know, thank you!

p.scatter(x_axis,
          y_axis,
          source=source,
          fill_color={'field': 'sector_revised', 'transform': color_mapper},
          line_color=None,
          legend={'field': 'sector_revised'},
          )

--
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 [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/0d1e8de3-82d2-4fd9-87fa-e756f0f3e09b%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.