☰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

Difference between charts, plotting and models

Community Support
A.S
A.S

I understand that charts is a high level interface, plotting is intermediate and models being a low level interface. Does that mean you can build the same graphs with models as you would build with charts and plotting, but with more code?

Would it be advisable to focus only on models and use that to build all your graphs?

⌁   Link to post
Bryan
Bryan

I understand that charts is a high level interface, plotting is intermediate and models being a low level interface. Does that mean you can build the same graphs with models as you would build with charts and plotting, but with more code?

That's absolutely correct. At the bottom level, a Bokeh document is just a collection (object graph) of bokeh.models objects. The higher level interfaces are conveniences that help assembled the models in common or meaningful or correct ways, with less code. There is a more extensive discussion here:

  http://bokeh.pydata.org/en/latest/docs/user_guide/concepts.html#userguide-concepts

Would it be advisable to focus only on models and use that to build all your graphs?

It's really up to personal preference. If a bokeh.charts BoxPlot gives you everything you need, then it would be alot more work to do it "from scratch", for no benefit. But if you have more sophisticated requirements or needs than using bokeh.models directly gives you the most control. Note that there is nothing preventing anyone from using more than one of the interfaces at the same time, or together. At the end of the day it's all down to bokeh.models anyway.

Bryan

···

On Nov 4, 2015, at 9:02 AM, arditsulce@gmail.com wrote:

⌁   Link to post
A.S
A.S

Thanks for the great answer.

···

On Wednesday, November 4, 2015 at 4:51:46 PM UTC+1, Bryan Van de ven wrote:

On Nov 4, 2015, at 9:02 AM, ardit...@gmail.com wrote:

I understand that charts is a high level interface, plotting is intermediate and models being a low level interface. Does that mean you can build the same graphs with models as you would build with charts and plotting, but with more code?

That’s absolutely correct. At the bottom level, a Bokeh document is just a collection (object graph) of bokeh.models objects. The higher level interfaces are conveniences that help assembled the models in common or meaningful or correct ways, with less code. There is a more extensive discussion here:

    [http://bokeh.pydata.org/en/latest/docs/user_guide/concepts.html#userguide-concepts](http://bokeh.pydata.org/en/latest/docs/user_guide/concepts.html#userguide-concepts)

Would it be advisable to focus only on models and use that to build all your graphs?

It’s really up to personal preference. If a bokeh.charts BoxPlot gives you everything you need, then it would be alot more work to do it “from scratch”, for no benefit. But if you have more sophisticated requirements or needs than using bokeh.models directly gives you the most control. Note that there is nothing preventing anyone from using more than one of the interfaces at the same time, or together. At the end of the day it’s all down to bokeh.models anyway.

Bryan

⌁   Link to post

End of archived discussion · Replies are disabled