allow auto for non/selection glyphs #5698

merged 1 commit into from Jan 11, 2017


None yet

1 participant

bryevdv commented Jan 10, 2017 edited

issues: fixes #2414

Makes it possible to specify selection_glyph=None to mean no policy (i.e. use regular glyph)

Default behaviors are unchanged.

bryevdv commented Jan 10, 2017 edited

E.g. makes this possible:

import numpy as np

from bokeh.plotting import figure, show, output_file

N = 4000
x = np.random.random(size=N) * 100
y = np.random.random(size=N) * 100
radii = np.random.random(size=N) * 1.5
colors = [
    "#%02x%02x%02x" % (int(r), int(g), 150) for r, g in zip(50+2*x, 30+2*y)

p = figure(tools="box_select")

r = p.scatter(x, y, radius=radii,
          fill_color=colors, fill_alpha=0.6,
          line_color=None, selection_color="red")

r.nonselection_glyph = None

output_file("color_scatter.html", title=" example")

show(p)  # open a browser

screen shot 2017-01-10 at 5 38 14 pm

before, setting to None gave the "auto" non-selection glyph.

bryevdv commented Jan 10, 2017

Ping @mattpap seems ok? Not super important but its irritated me for ages, this seem more consistent and correct.

bryevdv commented Jan 11, 2017

This seems fairly un-controversial, so I will merge it. If there are any objections later it is easy enough to revert.

@bryevdv bryevdv merged commit fbe1fa8 into master Jan 11, 2017

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
@bryevdv bryevdv deleted the bryan/2414_selection_glyph_auto branch Jan 11, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment