···
On 2/19/16 2:09 PM,
wrote:
johan.wasserman@gmail.com
Works fine using ray:
p.ray(signals.loc[ signals[‘mavgS’] == 1].index,
signals.loc[signals[‘mavgS’] == 1][‘temp’], length=50,
angle=1.57, color=‘#99D594’, line_width=1)
Other glyphs like x, asterisk or triangle doesn't, they all
throw the ColumnDataSource error.
J.
On Saturday, February 20, 2016 at 8:43:43 AM UTC+11,
wrote:
–
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 bokeh+unsubscribe@continuum.io.
To post to this group, send email to bokeh@continuum.io.
To view this discussion on the web visit [](https://groups.google.com/a/continuum.io/d/msgid/bokeh/ba8ee3eb-fb38-4d5a-8e03-39da9fe7536a%40continuum.io?utm_medium=email&utm_source=footer) .
For more options, visit .
–
Sarah Bird
Developer, Bokeh
[

](http://continuum.io)
johan.w...@gmail.com
Thanks Dennis,
still getting the problem. Here’s the line of code
just in case I’m making some noob mistake;
p.triangle(signals.loc[ signals[‘mavgS’] ==
1].index, signals.loc[signals[‘mavgS’] == 1][‘temp’],
size=[10], color=“#99D594”, line_width=0.5)
I printed x & y and they line up.
Also tried making sure both have the same column just
for fun/confirmation;
p.triangle(signals.loc[ signals[‘mavgS’] ==
1][‘temp’].index, signals.loc[signals[‘mavgS’] ==
1][‘temp’], size=[10], color=“#99D594”,
line_width=0.5)
I'm wondering if it's not because the previous three
plots on the same figure are based on the complete
dataset and the triangle on a subset? That would be a
pain.
Thanks for your response,
J.
On Saturday, February 20, 2016 at 8:15:45 AM UTC+11,
Dennis O’Brien wrote:
Hi Johan
x and y need to be the same length. If x is
also a pandas Series, can you try filtering with
the same .loc logic you are applying to y?
cheers,
Dennis
On Fri, Feb 19, 2016 at 11:44 AM < >
wrote:
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.
–
You received this message because you are
subscribed to the Google Groups "Bokeh Discussion
emails from it, send an email to .
To post to this group, send email to .
To view this discussion on the web visit
johan.w...@gmail.com
bokeh+un...@continuum.io
bo...@continuum.io
https://groups.google.com/a/continuum.io/d/msgid/bokeh/ff22f8e1-c1fc-407f-908e-5681f1c5092d%40continuum.io.
For more options, visit [https://groups.google.com/a/continuum.io/d/optout](https://groups.google.com/a/continuum.io/d/optout).
[https://groups.google.com/a/continuum.io/d/msgid/bokeh/ba8ee3eb-fb38-4d5a-8e03-39da9fe7536a%40continuum.io](https://groups.google.com/a/continuum.io/d/msgid/bokeh/ba8ee3eb-fb38-4d5a-8e03-39da9fe7536a%40continuum.io)
https://groups.google.com/a/continuum.io/d/optout