☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Cannot run HeatMap example in latest bokeh

Community Support
josepablog
josepablog

I’m trying to recreate the HeatMap example from Using High-level Charts — Bokeh 0.9.3 documentation

rom bokeh.charts import HeatMap, output_file, show

import pandas as pd

output_file('heatmap.html')

df = pd.DataFrame(
        dict(
            apples=[4, 5, 8],
            bananas=[1, 2, 4],
            pears=[6, 5, 4],
        ),
        index=['2012', '2013', '2014']
    )

p = HeatMap(df, title='Fruits')

show(p)

Unfortunately, it doesn’t plot correctly on 0.14.3

How can I use a dataframe on bokeh?

Thanks,

Jose

⌁   Link to post
Bryan
Bryan

Hi,

Please examine the URL you are looking at. You are looking at *very* old documentation. The bokeh.charts interface underwent significant changes about a year ago. Please always try to make sure you are looking at the correct documentation for the version you have installed.

As it happens, the new version of HeatMap has not made it into the documentation site yet. This is regrettable but the core team is very over-committed at present (any help and contribution is appreciated). However, the examples are always kept up to date, and you can see one here:

  https://github.com/bokeh/bokeh/blob/master/examples/charts/file/heatmap.py

Thanks,

Bryan

···

On Nov 4, 2016, at 3:56 PM, josepablog@gmail.com wrote:

I'm trying to recreate the HeatMap example from Using High-level Charts — Bokeh 0.9.3 documentation

rom bokeh.charts import HeatMap, output_file, show

import pandas as pd

output_file('heatmap.html')

df = pd.DataFrame(

dict(

apples=[4, 5, 8],

bananas=[1, 2, 4],

pears=[6, 5, 4],

),

index=['2012', '2013', '2014']

)

p = HeatMap(df, title='Fruits')

show(p)

Unfortunately, it doesn't plot correctly on 0.14.3

How can I use a dataframe on bokeh?

Thanks,
Jose

--
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/512520cf-5d15-4e75-b8b4-08ec5e260ab8%40continuum.io\.
For more options, visit https://groups.google.com/a/continuum.io/d/optout\.

⌁   Link to post

End of archived discussion · Replies are disabled