Hi gurus,
I have a plot of a small moving average and large moving average over a scatter plot of the values. The data also contains a signal column indicating when the moving averages cross, either up or down (1 or -1, with 0 filling in the rest).
p.scatter(x, signals.temp, legend=‘Temperature’)
p.line(x, signals[‘smavg’], line_color=‘Blue’, line_width=0.5, legend=‘Smavg’ )
p.line(x, signals[‘lmavg’], line_color=‘Red’, line_width=0.5, legend=‘Lmavg’ )
I would like to plot a triangle glyph for the up signal (1) and an inverted triangle on the down signal (-1) by doing:
p.triangle(x, signals.loc[signals[‘mavgS’] == 1][‘temp’], size=[10], color="#99D594", line_width=0.5)
p.inverted_triangle(x, signals.loc[signals[‘mavgS’] == -1][‘temp’], size=[10], color="#DE2D26", line_width=0.5)
but I’m running in to this problem:
ColumnDataSource column lengths are not all the same: ColumnDataSource, ViewModel:ColumnDataSource
Any advice for a struggling noob?
J.