☰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

"previously" drawn polygon should be deleted

Community Support
ahmettemiz88
ahmettemiz88

Hi,
I draw polygon dynamically as related part of the code:

p1=p.add_glyph(source_patch, glyph)

draw_tool_p1 = PolyDrawTool(renderers=[p1])
p.add_tools(draw_tool_p1)

I want, when I draw one polygon , “previously” drawn polygon is deleted from the plot.
how can I do that?
regards

⌁   Link to post
Bryan
Bryan

Edit tools work by updating a ColumnDataSouce that drives the glyph (in this case, a polygon). So you would update the plot the same way as with any other glyph, i.e. update the data stored in the data source.

⌁   Link to post

End of archived discussion · Replies are disabled