Brewer example cannot be replicated with AttributeError "patches"

Hi all,
I want to use the brewer example found here:
http://bokeh.pydata.org/en/latest/docs/gallery/brewer.html


However, when I copied and pasted the codes directly, I get the error on lines:
p = figure()
p.patches([x2 for a in areas], list(areas.values()), color=colors, alpha=0.8, line_color=None)

AttributeError: 'NoneType' object has no attribute 'patches'

The same happened with I tried modifying the codes for my own data.
There are limited documentation on this and I don't know if this example is outdated.
Any help would be greatly appreciated!

Thanks,
Peggy

Hi Peggy,

If figure is returning None, it makes me think you must be using a somewhat old version of Bokeh. Can you confirm what version of Bokeh you are running? You can run

  python -c "import bokeh; print(bokeh.__version__)"

from the command line to easily get the version.

Just as a reminder, in order to help up support people in the most efficient way, I'd like to encourage everyone to always provide basic information about versions, platform, browsers, etc.

Bryan

ยทยทยท

On Dec 10, 2015, at 1:20 PM, [email protected] wrote:

Hi all,
I want to use the brewer example found here:
http://bokeh.pydata.org/en/latest/docs/gallery/brewer.html

However, when I copied and pasted the codes directly, I get the error on lines:
p = figure()
p.patches([x2 for a in areas], list(areas.values()), color=colors, alpha=0.8, line_color=None)

AttributeError: 'NoneType' object has no attribute 'patches'

The same happened with I tried modifying the codes for my own data.
There are limited documentation on this and I don't know if this example is outdated.
Any help would be greatly appreciated!

Thanks,
Peggy

--
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/60af9adc-c5a4-4881-ae42-c05033c10b2d%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.