Difference between charts, plotting and models

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?

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, [email protected] wrote:

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, [email protected] 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