Skip to content

[BUG] BoxAnnotation doesn't respect fill_color=None #9877

Description

@lucius-messerer

ALL software version info (bokeh, python, notebook, OS, browser, any other relevant packages)

Bokeh 2.0.0 | Python 3.7 | Firefox 74.0 | Windows 10 build 16299.1747

Description of expected behavior and the observed behavior

Expected behavior: Glyphs generally support turning off fill by supplying a fill_color value of None. Would expect the same from BoxAnnotation.

Observed behavior: BoxAnnotation (and maybe others? haven't tested) instead appears to have a white fill with a low (but nonzero) alpha under these conditions. Setting fill_alpha to zero has the desired effect, but this is not my standard usage pattern for turning off fill, and it should probably be consistent anyway.

Complete, minimal, self-contained example code that reproduces the issue

import bokeh.plotting
import bokeh.models

bokeh.plotting.output_file("box_annotation_test.html")

fig = bokeh.plotting.figure(width=500, height=500, x_range=[0, 3], y_range=[0,3])

fig.circle(x=[1, 1, 2, 2], y=[1, 2, 1, 2], size=100, line_color=None, fill_color="Red")

ba = bokeh.models.BoxAnnotation(bottom=1, top=2, left=1, right=2, line_color="Blue",
                                line_dash="dotted", fill_color=None)
fig.add_layout(ba)

bokeh.plotting.save(fig)

Screenshots or screencasts of the bug in action

bokeh_plot

The BoxAnnotation is drawn between the centers of the red circles. Notice the "notches" of paler red where the box intersects them.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions