Arrows are not “vectorizable” like glyphs. They only draw one Arrow (with up to two ArrowHeads) at a time. You can set the colors to individual color constants, like “red” or “#ee64ff”. The do not use column names.
On Jun 14, 2018, at 15:52, peng wang [email protected] wrote:
I already know what the reason is , because of NormalHead(line_color=“B2SArrowColors”)
Does it mean we can not customize arrowHead color?
welcome any comments. Thanks a lot
On Thursday, June 14, 2018 at 3:54:07 PM UTC-6, peng wang wrote:
the code below may not work, is it possible to associate source with arrow?
from random import randrange
from bokeh.io import curdoc
from bokeh.plotting import figure
from bokeh.layouts import layout
from bokeh.models import ColumnDataSource, Arrow, NormalHead
plot = figure()
source = ColumnDataSource(data={‘x0’: , ‘y0’: , ‘x1’: , ‘y1’: })
if the plot only contains annotations it screws up range and scrolling
plot.circle(x=0, y=0)
plot.add_layout(
Arrow(end=NormalHead(), x_start=‘x0’, y_start=‘y0’, x_end=‘x1’,
y_end=‘y1’, source=source))
On Thursday, June 14, 2018 at 3:44:11 PM UTC-6, peng wang wrote:
subplot_dict[‘arrow_start_y’] = [10, 10, 10, 10, 10, 10, 15, 15, 15, 15, 15, 15]
subplot_dict[‘arrow_end_y’] = [20, 20, 20, 20, 20, 20, 25, 25, 25, 25, 25, 25]
subplot_source = ColumnDataSource(data=subplot_dict)
subplot = figure(x_range = [0, 80], y_range = [0, 30], plot_width=100, plot_height=50, toolbar_location=None, sizing_mode='scale_width')
subplot_height = 50
subplot_weight = 190
subplot.add_layout(Arrow(end=NormalHead(line_color="B2SArrowColors", line_width=4),
x_start='arrow_start_x', y_start=10, x_end='arrow_end_x', y_end=10, line_width=15, source=subplot_source))
I like to create a group of arrows based on source, but if I run code above, only one arrow is displayed. any comments? thanks a lot
–
You received this message because you are subscribed to the Google Groups “Bokeh Discussion - Public” group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/8c9efe56-0add-4306-ac29-ba95a80a5f26%40continuum.io.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.