What are bokeh screen blocks?

In Bokeh, what are “screen units”?

The network is not straightforward as to what these creatures are, and I have not been able to extract meaning from them from (0.9.3) the source code

The Bokeh source uses them in its examples, for example, from bokeh / _glyph_functions.py for "rect":

from bokeh.plotting import figure, output_file, show

plot = figure(width=300, height=300)
plot.rect(x=[1, 2, 3], y=[1, 2, 3], width=10, height=20, color="#CAB2D6",
          width_units="screen", height_units="screen")
show(plot)

but I do not see them anywhere. What other options will width_units use?

+4
source share
1 answer

Bokeh allows users to set rendering locations either on-screen units (related to the distance of a pixel from the start of the graph), or data units (which use a converter that is used to calculate graph ranges based on input data)

, , , (, ) ( x = 10)

: https://github.com/bokeh/bokeh/blob/master/bokeh/enums.py#L46

+5

Source: https://habr.com/ru/post/1606634/


All Articles