☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Any way to set Alpha on BoxEditTool Rects?

Community Support
Terry_Simons
Terry_Simons

I’d like to use the BoxEditTool, but I want to set its alpha value… I don’t see an obvious way to do that.

The BoxEditTool example in the documentation sets alphas on the pre-drawn rectangles, but the BoxEditTool, which uses the same data source, draws opaque rectangles.

Is there any way to set BoxEditTool rectangle’s alpha value? If not an obvious way, is there some way to hack this with JavaScript or something?

Thanks!

  • Terry
⌁   Link to post
Terry_Simons
Terry_Simons

Aha… I figured it out.

IMO this is a bit non-obvious but the empty_value field can be used provided that your source has an ‘alpha’ parameter.

The documentation sort of describes this, but it’s a bit obtuse. Perhaps the example could be expanded to show this a few different ways? (default color, default alpha, etc.).

The one example that does exist sets this value to “1” and it wasn’t at all clear to me that this was why my rectangles were opaque, despite having read the documentation.

Cheers,

  • Terry
···

On Thu, Mar 15, 2018 at 11:34 PM, Terry Simons terry.simons@gmail.com wrote:

I’d like to use the BoxEditTool, but I want to set its alpha value… I don’t see an obvious way to do that.

The BoxEditTool example in the documentation sets alphas on the pre-drawn rectangles, but the BoxEditTool, which uses the same data source, draws opaque rectangles.

Is there any way to set BoxEditTool rectangle’s alpha value? If not an obvious way, is there some way to hack this with JavaScript or something?

Thanks!

  • Terry
⌁   Link to post

End of archived discussion · Replies are disabled