Python英语-Issue09
内容目录
重要的是行动起来1、本期单词
2、英文阅读
declarative
英 [dɪˈklærətɪv] 美 [dɪˈklɛrətɪv,-ˈklær-]
adj. 宣言的,公布的;
scenegraph
场景图
widget
英 [ˈwɪdʒɪt] 美 [ˈwɪdʒɪt]
n. 小器具,装饰品,窗口小部件;
serialize
英 [ˈsɪəriəlaɪz] 美 [ˈsɪriəlaɪz]
vt. 连载,连播(故事);
看完上述单词后,大家不妨阅读下面的内容:
bokeh.models
Bokehis actually composed of two library components.
The first component is a JavaScript library, BokehJS, that runs in the browser.This library is responsible for all of the rendering and user interaction. Its input is a collection of declarative JSON objects that comprise a “scenegraph”.The objects in this scenegraph describe everything that BokehJS should handle:what plots and widgets are presentand in what arrangement, what tools and renderers and axes the plots will have,etc. These JSON objects are converted into BokehJS Models in the browser, and are rendered by corresponding BokehJS Views.
The second component is a library in Python (or other languages) that can generate the JSON described above. In the Python Bokeh library, this is accomplished atthe lowest level by exposing a set of “model” classes that exactly mirror theset of BokehJS Models that are created in the browser. These python model classes know how to validate their content and attributes, and also how to serialize themselves to JSON. All of these low level models live in the low-level bokeh.models interface. Most of the models are very simple, usually consisting of a few property attributes andno methods. Model attributes can either be configured when the model is created, or later by setting attribute values on the model object. Here are some examples for a Rect glyph object
Python英语往期回顾
Issue08 | Issue07 | Issue06 | Issue05
Issue04 | Issue03 | Issue02 | Issue01