☰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

How to remove legend from the plot?

Community Support
FreeRP
FreeRP

I make legend like that:

    self.__signal_figure.line(x='x', y='y', source=self.__signal_src[name][1],
                            color=kwargs['color'], legend_label=name)
    self.__signal_figure.legend.location = "top_left"
    self.__signal_figure.legend.click_policy = "hide"

I can remove the plot from the figure, but how i can remove the legend from the figure?

⌁   Link to post
Bryan
Bryan

Do you need to remove it, and then later restore it? My guess is that this is not currently supported. But, some things you can try:

  • setting p.legend.items = []

  • deleting the Legend out of p.renderers

In either case you may also need to try doing something else to trigger a re-render.

⌁   Link to post

End of archived discussion · Replies are disabled