<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Bokeh实战]]></title><description><![CDATA[<p dir="auto">1.安装<br />
pip install bokeh<br />
2.基本概念<br />
Annotation　注解　像标题　图例　标签<br />
Visual aids that make reading the plot easier. This includes titles, legends, labels, or bands, for example.</p>
<p dir="auto">Application　一个应用<br />
A Bokeh application is a recipe for generating Bokeh documents. Typically, this is Python code run by a Bokeh server whenever a new sessions is created.</p>
<p dir="auto">BokehJS　Bokeh的JS框架　可以直接用这个js库进行开发<br />
The JavaScript client library that actually renders the visuals and handles the UI interactions for Bokeh plots and widgets in the browser. In most cases, Bokeh handles all interactions with BokehJS automatically (“We write the JavaScript, so you don’t have to”).</p>
<p dir="auto">Document 文档　其实就是最终的html<br />
An organizing data structure for Bokeh applications. Documents contain all the Bokeh models and data needed to render an interactive visualization or application in the browser.</p>
<p dir="auto">Embedding 把bokeh嵌入到应用中的方法<br />
Various methods that help with including Bokeh plots and widgets in web apps, web pages, or Jupyter notebooks.</p>
<p dir="auto">Glyph 基础图形元素<br />
API objects that draw vectorized graphics to represent data. Glyphs are the basic visual building blocks of Bokeh plots. This includes elements such as lines, rectangles, squares, wedges, or the circles of a scatter plot. The The bokeh.plotting interface interface provides a convenient way to create plots centered around glyphs.</p>
<p dir="auto">Layout 布局<br />
A collection of Bokeh objects. This can be several plots and widgets, arranged in nested rows and columns.</p>
<p dir="auto">Model　内部的最底层模型<br />
The lowest-level objects that Bokeh visualizations consist of. Bokeh’s models are part of the The bokeh.models interface interface. Most users will not use this level of interface to assemble plots directly. However, ultimately all Bokeh plots consist of collections of models. It is helpful to understand them enough to configure their attributes and properties.</p>
<p dir="auto">Plot　一个组件<br />
Containers that hold all the various objects (such as renderers, glyphs, or annotations) of a visualization. The The bokeh.plotting interface interface provides the figure() function to help with assembling all the necessary objects.</p>
<p dir="auto">Renderer 渲染器<br />
General term for any method or function that draws elements of the plot. Examples of elements that are generated by renderers are glyphs or annotations.</p>
<p dir="auto">Server　后台服务器　用于分享和发布应用　基于流的大量数据处理<br />
The Bokeh server is an optional component. You can use the Bokeh server to share and publish Bokeh plots and apps, to handle streaming of large data sets, or to enable complex user interactions based on widgets and selections.</p>
<p dir="auto">Widget　控件　对图形进行控制和调整<br />
User interface elements that are not directly part of a Bokeh plot, such as sliders, drop-down menus, or buttons. You can use events and data from widgets in your Python code, or you can use input from widgets to update you Bokeh plot itself. You can use widgets in standalone applications or with the Bokeh server.</p>
<p dir="auto">3.前后端组成<br />
BokeH实际上是一种后端渲染的模式　和之前Java　MVC模式类似。<br />
<img src="/assets/uploads/files/1629378163556-570f6e85-0583-45fb-84b7-edf2a033bd0c-image.png" alt="570f6e85-0583-45fb-84b7-edf2a033bd0c-image.png" class=" img-responsive img-markdown" /><br />
<strong>BokehJS,</strong> the JavaScript library<br />
BokehJS runs in the browser. This library handles rendering and user interactions. It takes a collection of declarative JSON objects as its input and uses them as instructions on how to handle the various aspects of your visualization in a browser. For example:</p>
<p dir="auto">plots and widgets</p>
<p dir="auto">layouts and arrangements</p>
<p dir="auto">tools and renderers</p>
<p dir="auto">plot axes</p>
<p dir="auto">In the browser, BokehJS converts these JSON objects into BokehJS models and renders them according to corresponding BokehJS views.</p>
<p dir="auto"><strong>Bokeh, the Python library</strong><br />
The Python library generates the JSON objects that BokehJS uses to render your visualization in a browser.</p>
<p dir="auto">At its lowest level, the Python library uses a set of model classes that exactly mirror the set of models that BokehJS creates in a browser.</p>
<p dir="auto">These Python model classes are able to validate their content and attributes and serialize themselves to JSON. Most of the models are very simple and usually consist of only a few property attributes and no methods. You can configure the attributes of those models either by setting them when creating a model or later by setting attribute values on the model object.</p>
]]></description><link>http://an.forum.genostack.com/topic/393/bokeh实战</link><generator>RSS for Node</generator><lastBuildDate>Sat, 13 Jun 2026 09:22:19 GMT</lastBuildDate><atom:link href="http://an.forum.genostack.com/topic/393.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 20 Aug 2021 04:34:57 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Bokeh实战 on Mon, 30 Aug 2021 03:21:10 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1630293560205-d7d9f810-234e-491c-ae88-6d1b56146129-image.png" alt="d7d9f810-234e-491c-ae88-6d1b56146129-image.png" class=" img-responsive img-markdown" /></p>
]]></description><link>http://an.forum.genostack.com/post/809</link><guid isPermaLink="true">http://an.forum.genostack.com/post/809</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Mon, 30 Aug 2021 03:21:10 GMT</pubDate></item><item><title><![CDATA[Reply to Bokeh实战 on Mon, 30 Aug 2021 03:18:53 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1630293531661-7a355f8c-b1f6-463d-888d-7b926ecd25da-image.png" alt="7a355f8c-b1f6-463d-888d-7b926ecd25da-image.png" class=" img-responsive img-markdown" /></p>
]]></description><link>http://an.forum.genostack.com/post/808</link><guid isPermaLink="true">http://an.forum.genostack.com/post/808</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Mon, 30 Aug 2021 03:18:53 GMT</pubDate></item><item><title><![CDATA[Reply to Bokeh实战 on Sat, 28 Aug 2021 12:33:39 GMT]]></title><description><![CDATA[<p dir="auto"><img src="/assets/uploads/files/1630154006242-70174ed5-afcb-4d25-8d9f-b5ef02efbc80-image.png" alt="70174ed5-afcb-4d25-8d9f-b5ef02efbc80-image.png" class=" img-responsive img-markdown" /><br />
bokeh、flask的数据交互</p>
]]></description><link>http://an.forum.genostack.com/post/807</link><guid isPermaLink="true">http://an.forum.genostack.com/post/807</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Sat, 28 Aug 2021 12:33:39 GMT</pubDate></item><item><title><![CDATA[Reply to Bokeh实战 on Sat, 28 Aug 2021 09:40:14 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://github.com/theislab/interactive_plotting/tree/master/interactive_plotting/experimental" rel="nofollow ugc">https://github.com/theislab/interactive_plotting/tree/master/interactive_plotting/experimental</a></p>
<p dir="auto">Bokeh的扩展机制：使用typescript进行扩展　以上面的为例<br />
bokeh init<br />
bokeh build</p>
<p dir="auto">//注意 npm 安装有问题的话　可以先下载仓库　本地安装　<br />
git clone <a href="https://github.com.cnpmjs.org/bokeh/bokeh.git" rel="nofollow ugc">https://github.com.cnpmjs.org/bokeh/bokeh.git</a><br />
npm install ./bokeh/bokehjs</p>
<p dir="auto">这个例子一直编译有问题　直接在__init__.py中把experimental的导出删除</p>
]]></description><link>http://an.forum.genostack.com/post/806</link><guid isPermaLink="true">http://an.forum.genostack.com/post/806</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Sat, 28 Aug 2021 09:40:14 GMT</pubDate></item><item><title><![CDATA[Reply to Bokeh实战 on Sat, 21 Aug 2021 10:03:42 GMT]]></title><description><![CDATA[<p dir="auto"><a href="https://dmolina.github.io/en/post/rest_bokeh/" rel="nofollow ugc">https://dmolina.github.io/en/post/rest_bokeh/</a><br />
bokeh restfule模式</p>
<h1>Example</h1>
<p dir="auto">class Figure(Resource):<br />
def get(self):<br />
plot = get_plot()<br />
div, js = components(plot)<br />
js, tags = autoload_static(plot, CDN, "fig/")<br />
return {'js': js, 'tags': tags}</p>
<p dir="auto">api.add_resource(Figure, '/fig')</p>
<p dir="auto">if <strong>name</strong> == '<strong>main</strong>':<br />
app.run()</p>
]]></description><link>http://an.forum.genostack.com/post/779</link><guid isPermaLink="true">http://an.forum.genostack.com/post/779</guid><dc:creator><![CDATA[anneng]]></dc:creator><pubDate>Sat, 21 Aug 2021 10:03:42 GMT</pubDate></item></channel></rss>