Reputation: 369
I've just installed the latest version of Anaconda.
I am having a basic problem with Bokeh, from this example.
from bokeh.plotting import *
f = figure()
f.line(x, y)
AttributeError: 'NoneType' object has no attribute 'line'
I can plot by saying line(x,y), but it looks like the above method would provide more flexibility if it worked.
Upvotes: 4
Views: 4670
Reputation: 94605
The example (and even the user guide) contradict the documentation for bokeh.plotting.figure()
, which explicitly says it returns None
, which explains the error you observe.
Using line()
directly therefore seems to be the way to go.
However, this holds for bokeh versions before 0.7: version 0.7 deprecated implicit plotting. This means that figure().line()
should work with bokeh 0.7+. The documentation for figure()
has apparently not yet been updated.
Upvotes: 8