Rects with rounded corners

Hi! I would like to use a Rect or Quad glyph, but I’d love to have the corners slightly more rounded to give a smoother visual effect.

I’ve looked through docs at bokeh.models.glyphs.Rect — Bokeh 2.3.2 Documentation and done a few basic web searches but haven’t come up with anything.

Any tips? Is this doable today? If not then would it be a reasonable issue to raise?

There’s not currently anything built-in as of version 2.3.2. I’m also not aware of any previous requests about this, either, so a GitHub Issue is probably the next step.

Presently the only options would be

  • a custom extension glyph
  • drawing patches or multi-polygons with explicit coordinates
  • (BokehJS-only for now) possibly use experimental spline API

For future reference, the github issue is here: Add rounded corners for rect/quad glyphs · Issue #11348 · bokeh/bokeh · GitHub