Bokeh plotting: NoneType has no 'line' attribute

I just installed the latest version of Anaconda.

I have a main 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 build by saying the string (x, y), but it looks like the above method would provide more flexibility if that worked.

+4
source share
1 answer

The example (and even the user manual ) contradicts the documentation for bokeh.plotting.figure()which explicitly says that it returns None, which explains the error you are observing.

Using line()directly, therefore, seems like a way.

bokeh 0,7: 0.7, . , figure().line() bokeh 0.7+. figure(), -, .

+8

All Articles