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

Add support for BoxAnnotation.inverted #13810

Merged
merged 2 commits into from
Apr 9, 2024

Conversation

mattpap
Copy link
Contributor

@mattpap mattpap commented Apr 5, 2024

Screencast.from.05.04.2024.23.49.22.webm
Code
import numpy as np

from bokeh.plotting import figure, show

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 = np.array([(r, g, 150) for r, g in zip(50+2*x, 30+2*y)], dtype="uint8")

TOOLS="hover,crosshair,pan,wheel_zoom,zoom_in,zoom_out,box_zoom,undo,redo,reset,tap,save,poly_select,lasso_select,examine,help"

p = figure(tools=TOOLS, width=400, height=400)

from bokeh.models import BoxSelectTool
box_select = BoxSelectTool(persistent=True)
box_select.overlay.inverted = True
box_select.overlay.border_radius = 20
p.add_tools(box_select)

p.circle(x, y, radius=radii, fill_color=colors, fill_alpha=0.6, line_color=None)

show(p)

addresses #13646

Copy link

codecov bot commented Apr 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.64%. Comparing base (69bddb5) to head (dc2ef81).
Report is 1 commits behind head on branch-3.5.

❗ Current head dc2ef81 differs from pull request most recent head d49459d. Consider uploading reports for the commit d49459d to get more accurate results

Additional details and impacted files
@@              Coverage Diff               @@
##           branch-3.5   #13810      +/-   ##
==============================================
- Coverage       92.65%   92.64%   -0.01%     
==============================================
  Files             326      326              
  Lines           20736    20735       -1     
==============================================
- Hits            19212    19209       -3     
- Misses           1524     1526       +2     

@mattpap mattpap force-pushed the mattpap/13646_BoxAnnotation_inverted branch from dc2ef81 to 027daeb Compare April 8, 2024 21:15
@mattpap mattpap merged commit e61219b into branch-3.5 Apr 9, 2024
25 checks passed
@mattpap mattpap deleted the mattpap/13646_BoxAnnotation_inverted branch April 9, 2024 23:49
@droumis droumis added the grant: CZI R5 Funded by CZI Round 5 grant label Apr 30, 2024
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.

None yet

3 participants