☰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

[bokeh] Using CheckboxButtonGroup to show/hide plot line interactively with Bokeh server

Community Support
Bryan
Bryan

Kasper,

Just double checking? I think this is the same question as your other post? The visual properties of glyphs can be controlled according to:

  Appearance — Bokeh 3.3.2 Documentation

In particular you can set alpha values to zero, or if you want to stop things from being drawn at all, you can set colors to None.

I should also mention that we are currently working on an "interactive legend" that will easily allow people to toggle things on and off by interacting with the legend.

Thanks,

Bryan

···

On Apr 18, 2016, at 3:19 AM, Kasper Pihl Rasmussen <kasperpihl.r@gmail.com> wrote:

Hi all

From trying myself and reading this group, I see that it is difficult to create a Bokeh server plot where you can show and hide different line plot.

This is because, and please correct me if I am wrong:
  • CollumnDataSource(CDS) must keep the same dimensions at all time.
    • Therefore, it cannot become empty when that specific plot should be turned on.
  • CDS and glyphs (i.e., line) cannot be turned on and off by including them in the update function?
    • Because the glyph cannot change and is should only be the data from CDS that changes?
My question is now, can I create a CDS that is controlled by a CheckboxButtonGroup to switch the alpha to 0 when the specific line needs to be hidden?

Best regards,
Kasper

--
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/e5be37fb-a07c-41f2-ae66-70efa42d8520%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled