Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bokeh selection colors #1220

Merged
merged 13 commits into from
Mar 23, 2017
Merged

Bokeh selection colors #1220

merged 13 commits into from
Mar 23, 2017

Conversation

philippjfr
Copy link
Member

@philippjfr philippjfr commented Mar 21, 2017

As requested in #1139 this adds full control over selection and unselection glyph styles letting you apply custom colors and alphas. Additionally this also adds control of a new feature in bokeh 0.12.5, which is muting glyphs with an interactive legend, this styling can also be controlled via style option but default to a alpha=0.2. This means all our bokeh legends are now clickable.

  • Update Bokeh_Backend Tutorial unselection glyph styling examples.
  • Tests to check updating all the different glyphs is working correctly.

@jlstevens
Copy link
Contributor

Just curious but what is a muted_alpha?

@jbednar
Copy link
Member

jbednar commented Mar 22, 2017

The amount of alpha to use when something is muted?

@jlstevens
Copy link
Contributor

The amount of alpha to use when something is muted?

Ah, now I get it - maybedeselected_alpha would be a more obvious name, but it is what it is.

@philippjfr
Copy link
Member Author

Ah, now I get it - maybedeselected_alpha would be a more obvious name, but it is what it is.

Right before this I had only added support for unselected_alpha/color because that had seemed like a more sensible name, but it turned out that was really limiting so now I'm just letting the user set selection_color/alpha, unselection_color/alpha and muted_color/alpha, which is what bokeh calls the different concepts and provides full control.

@jbednar
Copy link
Member

jbednar commented Mar 22, 2017

Sounds good. Great stuff!

@@ -45,7 +46,7 @@ class PointPlot(LegendPlot, ColorbarPlot):
Function applied to size values before applying scaling,
to remove values lower than zero.""")

style_opts = (['cmap', 'palette', 'marker', 'size', 's', 'alpha', 'color',
style_opts = (['cmap', 'palette', 'marker', 'size', 's', 'color',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel style_opts should be a set - something for 2.0 perhaps? I am assuming 'alpha' was being duplicated...

@@ -170,7 +148,7 @@ class VectorFieldPlot(ColorbarPlot):
Whether the lengths will be rescaled to take into account the
smallest non-zero distance between two vectors.""")

style_opts = ['color'] + line_properties
style_opts = line_properties
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good to see this simplified.

@jlstevens
Copy link
Contributor

Looks good! I'll merge once the tests pass.

@jlstevens
Copy link
Contributor

Tests are passing. Merging.

@jlstevens jlstevens merged commit 21ff24e into master Mar 23, 2017
@philippjfr philippjfr deleted the bokeh_selection_colors branch April 11, 2017 12:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants