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

Conversation

Projects
None yet
3 participants
@philippjfr
Member

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

This comment has been minimized.

Member

jlstevens commented Mar 22, 2017

Just curious but what is a muted_alpha?

@jbednar

This comment has been minimized.

Member

jbednar commented Mar 22, 2017

The amount of alpha to use when something is muted?

@jlstevens

This comment has been minimized.

Member

jlstevens commented Mar 22, 2017

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

This comment has been minimized.

Member

philippjfr commented Mar 22, 2017

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

This comment has been minimized.

Member

jbednar commented Mar 22, 2017

Sounds good. Great stuff!

philippjfr added some commits Mar 22, 2017

@philippjfr philippjfr added the ready label Mar 23, 2017

@@ -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',

This comment has been minimized.

@jlstevens

jlstevens Mar 23, 2017

Member

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

This comment has been minimized.

@jlstevens

jlstevens Mar 23, 2017

Member

Good to see this simplified.

@jlstevens

This comment has been minimized.

Member

jlstevens commented Mar 23, 2017

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

@jlstevens

This comment has been minimized.

Member

jlstevens commented Mar 23, 2017

Tests are passing. Merging.

@jlstevens jlstevens merged commit 21ff24e into master Mar 23, 2017

3 of 4 checks passed

s3-reference-data-cache Test data not cached, see details to rebuild.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
coverage/coveralls Coverage increased (+0.005%) to 77.511%
Details

@philippjfr philippjfr deleted the bokeh_selection_colors branch Apr 11, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment