Skip to content

Fix ROI request color selection having no effect - #1246

Merged
SimonHeybrock merged 1 commit into
mainfrom
roi-color-selection
Aug 21, 2026
Merged

Fix ROI request color selection having no effect#1246
SimonHeybrock merged 1 commit into
mainfrom
roi-color-selection

Conversation

@SimonHeybrock

@SimonHeybrock SimonHeybrock commented Aug 21, 2026

Copy link
Copy Markdown
Member

The color picked for ROI request rectangles and polygons had no effect — the shapes always rendered with a black outline.

hv.Rectangles and hv.Polygons are fillable glyphs, so HoloViews maps a bare color opt to fill_color and leaves line_color at Bokeh's black default. The ROI request shapes are deliberately drawn with fill_alpha=0 so the detector image underneath stays visible, so the configured color only ever reached the invisible fill. Setting line_color instead fixes both geometry types. The readback plotters already did this correctly; the request plotters were the odd one out.

Test plan

Regression test renders both plotters to Bokeh and asserts the glyph's line_color matches the configured color.

  • Draw a rectangle ROI with a non-default color and confirm the outline uses it
  • Same for a polygon ROI

@SimonHeybrock

Copy link
Copy Markdown
Member Author

LGTM

Rectangles and Polygons are fillable glyphs, so HoloViews maps a bare
`color` opt to fill_color. Since the ROI request shapes are drawn with
fill_alpha=0 so the image underneath stays visible, the configured color
only ever reached the invisible fill and the outline stayed at Bokeh's
black default.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@SimonHeybrock
SimonHeybrock merged commit 760944c into main Aug 21, 2026
16 checks passed
@SimonHeybrock
SimonHeybrock deleted the roi-color-selection branch August 21, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant