<?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" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Bokeh on Medium]]></title>
        <description><![CDATA[Stories by Bokeh on Medium]]></description>
        <link>https://medium.com/@bokeh?source=rss-7aa258e704a5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*hYgXkcU-IzRzAGrw4kN5lQ.png</url>
            <title>Stories by Bokeh on Medium</title>
            <link>https://medium.com/@bokeh?source=rss-7aa258e704a5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 11:55:13 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bokeh/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introducing Bokeh 3.10]]></title>
            <link>https://blog.bokeh.org/introducing-bokeh-3-10-929483b928c5?source=rss-7aa258e704a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/929483b928c5</guid>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Bokeh]]></dc:creator>
            <pubDate>Tue, 18 Aug 2026 19:45:54 GMT</pubDate>
            <atom:updated>2026-08-18T19:45:54.868Z</atom:updated>
            <content:encoded><![CDATA[<p>Bokeh 3.10 is available. This significant release brings Bokeh server applications to ASGI, adds WebGL rendering for filled polygons, and cuts the initial cost of large tabbed layouts. It also improves DataTable, adds Playwright-based PNG and SVG export, and fixes client-side leaks that could accumulate in long-running applications.</p><p>The main changes are:</p><ul><li>A framework-neutral ASGI adapter for FastAPI, Starlette, Django, Streamlit, and standalone ASGI deployments</li><li>WebGL rendering for Patch and Patches glyphs</li><li>Faster initial loading for applications with many tabs and plots</li><li>Better column sizing and more reliable updates in DataTable</li><li><a href="https://playwright.dev/python/">Playwright</a> as an export backend for PNG and SVG output</li></ul><p>Bokeh 3.10 requires Python 3.12 or newer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dPzsT8CgemCgG4nO220F0A.png" /><figcaption><em>The </em><a href="https://demo.bokeh.org/#demos)"><em>Bokeh demo gallery</em></a><em> has twelve new stateful Python applications running through the new ASGI adapter. Every demo includes its source code.</em></figcaption></figure><h4>Python callbacks, now on ASGI</h4><p>The largest addition in 3.10 is BokehASGI, a framework-neutral ASGI 3 application. You can serve a Bokeh application directly with an ASGI server such as Uvicorn or Hypercorn, or mount it inside an existing FastAPI, Starlette, or Django site. No tornado or separate process required.</p><p>The adapter handles Bokeh documents, static resources, sessions, autoload requests, authentication, and WebSockets. Synchronous application code and callbacks now always run in a bounded worker executor, so expensive Python work in one session does not block unrelated HTTP and WebSocket traffic on the event loop. All of this also works happily with Python free-threading builds (the new demo site runs on3.14t).</p><p>An ASGI host can also use BokehASGI.update_sessions() to send new data safely to every active local session, and locked_callback to safely and easily pass Bokeh callbacks to external event handlers.</p><p>Here is the core of a <a href="https://fastapi.tiangolo.com/">FastAPI</a> integration:</p><pre>from contextlib import asynccontextmanager<br>from pathlib import Path<br>from fastapi import FastAPI<br>from bokeh.server.asgi import BokehASGI<br><br>bokeh_app = BokehASGI({&quot;/&quot;: Path(&quot;bkapp.py&quot;)})<br><br>@asynccontextmanager<br>async def lifespan(site):<br>  # FastAPI does not forward lifespan events to mounted applications.<br>  await bokeh_app.core.start()<br>  try:<br>    yield<br>  finally:<br>    await bokeh_app.core.stop()<br><br>site = FastAPI(lifespan=lifespan)<br>site.mount(&quot;/bokeh&quot;, bokeh_app)</pre><p>BokehASGI is the new route for applications that want to join an ASGI stack directly. Here, the Bokeh application in bkapp.py can be the same script or directory application you would use previously with bokeh serve. It is also possible to pass modules with a modify_document function directly.</p><figure><img alt="Animated terrain contour demo switching among modeled landforms while the plot and statistics update" src="https://cdn-images-1.medium.com/max/960/1*Cud5-4yi7vqqO1AYr96bhA.gif" /><figcaption><em>In the </em><a href="https://demo.bokeh.org/terrain-contours"><em>terrain contour explorer</em></a><em>, each selection runs a Python callback and updates the contours, cross-section, and summary values in the active ASGI session.</em></figcaption></figure><p>The gallery goes beyond small integration examples. It includes linked selection, streaming OHLC data, image processing, scientific simulations, maps, and network graphs. The <a href="https://demo.bokeh.org/image-processing">Hubble image-processing demo</a>, for example, sends an editable crop through Xarray and a Numba-compiled filter before updating the processed view.</p><figure><img alt="A Hubble image in an editable crop view beside a filtered detection results" src="https://cdn-images-1.medium.com/max/960/1*ix7UIXMFwSppu60jna3OGQ.gif" /><figcaption><em>A stateful Python callback updates the processed image after the crop or filter changes. The example uses the NASA Hubble Deep Field image distributed with scikit-image.</em></figcaption></figure><p>See the <a href="https://docs.bokeh.org/en/3.10.0/docs/user_guide/server/library.html#asgi-applications">ASGI user guide</a> and the <a href="https://github.com/bokeh/bokeh/tree/branch-3.10/examples/server/api/asgi">complete framework examples</a> for direct ASGI, FastAPI, Starlette, and Django deployments.</p><h4>Bokeh with Streamlit</h4><p>One new option is especially worth pointing out. <a href="https://streamlit.io/">Streamlit</a> 1.57 runs on an ASGI stack and exposes st.App, so a Bokeh server application can live inside the same process as Streamlit application code. This is a great for when you want to integrate advanced Bokeh features and interactions such as CustomJS and WebGL rendering into your Streamlit pages.</p><p>In the example shown below Streamlit controls drive a 50,000-particle simulation. Python sends new float32 arrays when the simulation resets. CustomJS advances the particles in the browser, and Bokeh renders each frame with WebGL. Each viewer retains independent controls and simulation state.</p><figure><img alt="Animated demo showing Streamlit controls above a Bokeh particle plot. The user adjusts simulation parameters, switches between vortex-flow and curl-noise scenarios, drags the colored centers, and watches 50,000 particles respond to the changes." src="https://cdn-images-1.medium.com/max/640/1*aUQBcC8C9JK2jaIE5PdfJw.gif" /><figcaption>Streamlit controls a Bokeh WebGL particle simulation, with updates applied instantly in the browser.</figcaption></figure><p>The examples require Streamlit 1.57 or newer.</p><h4>WebGL rendering for filled polygons</h4><p>Patch and Patches can now use Bokeh’s WebGL output backend. That brings GPU-accelerated rendering to datasets made from many filled polygons, with support for fills, strokes, hatch patterns, dashed lines, and polygons with holes.</p><p>Existing plotting code only needs the WebGL backend enabled:</p><pre>from bokeh.plotting import figure<br><br>p = figure(output_backend=&quot;webgl&quot;)<br>p.patches(xs=&quot;xs&quot;, ys=&quot;ys&quot;, source=source, fill_color=&quot;color&quot;)</pre><figure><img alt="A Sierpinski triangle made from 19,683 colored patches rendered by Bokeh’s WebGL backend" src="https://cdn-images-1.medium.com/max/900/1*dJOa8mk2kRMIexVa3eThMw.png" /><figcaption><em>A Sierpinski triangle built from 19,683 </em><em>Patches. Bokeh 3.10 renders the geometry with WebGL. The release also fixes polygon topology, nested rings, streaming updates, property overrides, and invalid dash patterns in the WebGL path.</em></figcaption></figure><p>The new backend is especially useful for dense region maps, simulation meshes, and other polygon-heavy views where Canvas rendering becomes the bottleneck. See the <a href="https://github.com/bokeh/bokeh/pull/14853">Patch and </a><a href="https://github.com/bokeh/bokeh/pull/14853">Patches implementation PR</a> and the <a href="https://github.com/bokeh/bokeh/tree/branch-3.10/examples/output/webgl">WebGL examples</a>.</p><h4>Faster tabs and fewer browser-side leaks.</h4><p>Tabbed dashboards no longer need to build every inactive panel during their initial render. With the default Tabs(link_layouts=False), BokehJS now builds the active tab first and creates other tab views as they are visited. Once created, those views are retained, so plots, widgets, server updates, and client-side state survive tab switches.</p><p>The application that motivated this work loaded more than ten times faster after the change, dropping below one second in the reported test case. Most applications get the new behavior without any code changes. Applications that set link_layouts=True keep the eager behavior needed to link plot layouts across tabs.</p><p>Bokeh 3.10 also fixes some client-side lifecycle leaks. Removed models and replaced child views are now released promptly, and views clean up listeners attached to long-lived browser objects. This matters for server applications that replace plots, menus, or widgets over many hours: memory and resize work should no longer grow with every replacement.</p><h4>DataTable that fits the data</h4><p>DataTable has two better options for content-based sizing:</p><pre>DataTable(source=source, columns=columns, autosize_mode=&quot;fit_viewport&quot;)<br>DataTable(source=source, columns=columns, autosize_mode=&quot;ignore_viewport&quot;)</pre><p>fit_viewport now sizes individual columns from their contents and adjusts the table viewport. ignore_viewport also computes widths from cell contents, but it does not force those columns into the available width. Narrow content can leave open space, while wide content gets a horizontal scrollbar instead of being squeezed until it is unreadable.</p><p>The release also fixes initial row rendering, ColumnDataSource updates, synchronized selection, dynamically added or hidden columns, and fitted columns that previously became too narrow to read.</p><h4>PNG and SVG export with Playwright</h4><p>Bokeh can now use <a href="https://playwright.dev/python/">Playwright</a> instead of Selenium to export plots and layouts. Playwright manages its own compatible browser binary, so you do not need to match a separate browser driver to the browser installed on the machine.</p><p>Install Playwright and Chromium:</p><pre>python -m pip install playwright<br>playwright install chromium</pre><p>Then choose it for an export call:</p><pre>from bokeh.io import export_png<br><br>export_png(plot, filename=&quot;plot.png&quot;, backend=&quot;playwright&quot;)</pre><p>You can also set BOKEH_EXPORT_BACKEND=playwright or update settings.export_backend. The WebGL image above was exported from the 3.10 branch with this backend.</p><p>The Playwright backend will become the default in upcoming Bokeh 4.0.</p><h4>Also in 3.10</h4><ul><li>Reference guide is re-organized into friendlier one-class-per-page structure.</li><li><a href="https://github.com/bokeh/bokeh/pull/14978">CustomJS.from_template()</a> for Python 3.14 template strings.</li><li>Optional dependency groups such as <a href="https://github.com/bokeh/bokeh/pull/14924">pip install bokeh[all]</a>.</li><li><a href="https://github.com/bokeh/bokeh/pull/14874">Server.from_settings()</a> for constructing servers from global Bokeh settings.</li><li>Notebook output now supports passing a sequence of models to <a href="https://github.com/bokeh/bokeh/pull/15112">show()</a>, making it easier to display several Bokeh objects in one cell.</li><li>Step glyphs have more accurate hover and selection behavior, along with faster hit testing and panning.</li></ul><h4>Updating</h4><p>Install Bokeh 3.10 with pip:</p><pre>python -m pip install --upgrade &quot;bokeh==3.10.*&quot;</pre><p>or conda:</p><pre>conda install &quot;bokeh=3.10&quot;</pre><p>For the complete list of changes, see the<a href="https://docs.bokeh.org/en/3.10.0/docs/releases.html#release-3-10-0"> Bokeh 3.10 release notes</a>. You can try the new server stack at <a href="https://demo.bokeh.org/#demos">demo.bokeh.org</a>, report problems on <a href="https://github.com/bokeh/bokeh/issues">GitHub</a>, or discuss the release with the community on <a href="https://discourse.bokeh.org/">Bokeh Discourse</a>.</p><p>Thank you to everyone who contributed code, tests, documentation, review, and issue reports for this release.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=929483b928c5" width="1" height="1" alt=""><hr><p><a href="https://blog.bokeh.org/introducing-bokeh-3-10-929483b928c5">Introducing Bokeh 3.10</a> was originally published in <a href="https://blog.bokeh.org/">bokeh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bokeh 3.8.2: Patching incomplete origin validation in Bokeh Server applications]]></title>
            <link>https://blog.bokeh.org/bokeh-3-8-2-patching-incomplete-origin-validation-in-bokeh-server-applications-abd53528f0fb?source=rss-7aa258e704a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/abd53528f0fb</guid>
            <category><![CDATA[bokeh-python]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Bokeh]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 16:40:35 GMT</pubDate>
            <atom:updated>2026-01-28T16:40:35.405Z</atom:updated>
            <content:encoded><![CDATA[<p>Bokeh version 3.8.2, released in early-January 2026, includes a fix for a low-severity security vulnerability: <a href="https://github.com/bokeh/bokeh/security/advisories/GHSA-793v-589g-574v">Incomplete Origin Validation in WebSockets in Bokeh server applications (</a><a href="https://aydinnyunus.github.io/2026/01/24/bokeh-websocket-hijacking-cve-2026-21883/">CVE-2026–21883</a><a href="https://github.com/bokeh/bokeh/security/advisories/GHSA-793v-589g-574v">)</a>. This is Bokeh’s first CVE in over 10 years.</p><figure><img alt="Image grid of bokeh plots" src="https://cdn-images-1.medium.com/max/1024/0*QlKooASzefFhsC-8.jpg" /></figure><h3>Who is affected?</h3><p>This issue <strong>only</strong> affects certain publicly deployed Bokeh server instances.</p><p>If a Bokeh server is configured with a host allowlist (for instance, <em>dashboard.corp</em>), an attacker can register a domain like <em>dashboard.corp.attacker.com</em> and lure victims to a site on this malicious domain. The malicious site can then initiate a WebSocket connection to the vulnerable Bokeh server. Once connected, the attacker can interact with the Bokeh server on behalf of the victim, potentially accessing sensitive data, or modifying visualizations.</p><p>This issue <strong>does not impact:</strong></p><ul><li>Static HTML outputs</li><li>Standalone embedded plots</li><li>Plots within Jupyter notebooks</li><li>Bokeh servers that have authentication hooks setup</li><li>Bokeh servers deployed on private/internal networks</li></ul><p>In summary, this vulnerability impacts <em>where</em> a Bokeh server application can be viewed from, but it cannot be used to circumvent any firewalls or authentication steps.</p><h3>Upgrade to fix</h3><p>If your Bokeh server application is affected by this issue, upgrade to Bokeh version 3.8.2 immediately:</p><pre>conda update bokeh<br><br># or<br><br>pip install --upgrade bokeh</pre><h3>Acknowledgements</h3><p>We thank <a href="https://github.com/aydinnyunus">Yunus Aydın</a> for reporting this issue through Tidelift, and <a href="https://github.com/katzj">Jeremy Katz</a> on the Tidelift team for coordinating with us and guiding us through the process of verifying, fixing, and publishing the advisory. Learn more about the details of this issue in Yunus’ blog post: <a href="https://aydinnyunus.github.io/2026/01/24/bokeh-websocket-hijacking-cve-2026-21883/">Cross-Site WebSocket Hijacking in Bokeh: CVE-2026–21883</a>.</p><p>We also heartily thank Bokeh core team members for the quick resolution of this issue: <a href="https://github.com/bryevdv">Bryan Van de Ven</a> for coordinating and verifying the report, working on the fix, and publishing Bokeh 3.8.2 with the patch, and <a href="https://github.com/mattpap">Mateusz Paprocki </a>for supporting with reviews.</p><p>You can read the <a href="https://github.com/bokeh/bokeh/security/advisories/GHSA-793v-589g-574v">full security advisory on GitHub</a>, and learn more about <a href="https://docs.bokeh.org/en/latest/docs/user_guide/server/deploy.html#websocket-origin">Bokeh Server WebSocket origin in the documentation</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=abd53528f0fb" width="1" height="1" alt=""><hr><p><a href="https://blog.bokeh.org/bokeh-3-8-2-patching-incomplete-origin-validation-in-bokeh-server-applications-abd53528f0fb">Bokeh 3.8.2: Patching incomplete origin validation in Bokeh Server applications</a> was originally published in <a href="https://blog.bokeh.org/">bokeh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Bokeh 3.8]]></title>
            <link>https://blog.bokeh.org/introducing-bokeh-3-8-84093b1689a6?source=rss-7aa258e704a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/84093b1689a6</guid>
            <category><![CDATA[bokeh-python]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Bokeh]]></dc:creator>
            <pubDate>Wed, 05 Nov 2025 15:13:16 GMT</pubDate>
            <atom:updated>2025-11-05T15:14:50.155Z</atom:updated>
            <content:encoded><![CDATA[<p>We are excited to announce the release of Bokeh 3.8! This release includes several useful updates including support for filters, sorters, and limits in HoverTool, automatic session reconnect and notifications, new SizeBarannotation and preliminary support for theming using CSS variables.</p><p>As a minor release, Bokeh 3.8 includes various large but non-breaking changes and new features. This post spotlights some improvements that we think will be useful for most users.</p><h4>Filters, sorters, and limits in HoverTool</h4><p>By default, HoverTool displays a tooltip for every data point in your plot. Bokeh 3.8 adds a filters property where you can provide a CustomJSfunction to control and specify which data points should display tooltips.</p><p>Additionally, when the active hover area contains several data points, you can now use the:</p><ul><li>sort_by property to sort the entries in ascending or decreasing order based on any field(s)</li><li>limit property to specify the maximum number of entries displayed</li></ul><p>For example, the following example shows filtering for x &lt; 50values, sorting by $index in descending order, and limiting results to 2 entries:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/635/1*7_R91bbXub5AWe7eq1aAhg.gif" /><figcaption>Scatter plot with HoverTool (filter, sorting, and limits)</figcaption></figure><p>Learn more in the <a href="https://docs.bokeh.org/en/latest/docs/user_guide/interaction/tools.html#filtering-sorting-and-limits">HoverTool documentation</a>.</p><h4>Automatic session reconnect, notifications, and Document configuration</h4><p>If your Bokeh application loses connection to the server, Bokeh will now attempt to re-connect automatically and restore the session. It will also display relevant notifications when the connection is lost, while re-establish connection, and more, with an option to re-connect manually.</p><p>This release also adds preliminary support for configuring Documents, through the <a href="https://docs.bokeh.org/en/latest/docs/reference/document.html#bokeh.document.Document.config">Document.config</a> attribute. You can enable/disable the automatic re-connect and notification features with it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5fnP7XV1MNK-wwYksaxqSA.png" /><figcaption>Re-connect notification</figcaption></figure><h4>New annotation: SizeBar</h4><p>This release adds a new <strong>SizeBar</strong> annotation, a visual indicator for the size of radial glyphs (Circle and n-sided polygons). This allows you to represent another dimension of your data in the plot. You can customize SizeBar’s location, orientation, title, and more. Learn to use it and check out an example in the <a href="https://docs.bokeh.org/en/latest/docs/user_guide/basic/annotations.html#size-bars">Annotations documentation</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0LPW0GOOc4kaipR0DP710w.png" /><figcaption>Scatter plot with a SizeBar component</figcaption></figure><h4>Compression of buffers to the serialization protocol</h4><p>Data that’s transmitted as a base64 buffer, like RGBA images, are now compressed to save space. You can adjust it by setting the compression_level.</p><h4>Refreshed icons and replaced remaining PNG icons with SVG</h4><p>All plot tools icons now use the SVG format and several tools have a new look, for an overall nicer user experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*ydhSyZpESAQbKlMtcD-OzQ.png" /><figcaption>Grid of icons</figcaption></figure><h4>Preliminary migration to CSS variable based theming</h4><p>Common CSS variables related to colors, backgrounds, icons, animations, etc. were extracted and organized in this release. This is a background, non-user-facing improvement, but it’s the first step to eventually support variable-based theming.</p><h4>Updating to Bokeh 3.8</h4><p>Bokeh 3.8 is available through all regular channels, you can install it with either conda install bokeh or pip install bokeh .</p><p>To make sure you get the most recent available version of Bokeh, you can install from the <a href="https://anaconda.org/bokeh/bokeh">Bokeh channel</a> at anaconda.org directly, using: conda install -c bokeh bokeh.</p><p>For more information about installing Bokeh, see the <a href="https://docs.bokeh.org/en/dev-3.0/docs/first_steps/installation.html">section <em>Installation details</em> in the Bokeh User guide</a>.</p><h4>Next Steps</h4><p>If you have questions, we encourage you to visit the <a href="https://discourse.bokeh.org/">Bokeh Discourse</a>! Friendly project maintainers and a community of Bokeh users are there to help you navigate any issues that arise.</p><p>If you are a developer interested in getting involved, visit the <a href="https://docs.bokeh.org/en/latest/docs/dev_guide.html">Contribute section</a> of the User Guide for guidance on best practices and technical considerations.</p><p>As always, we appreciate the thoughtful feedback from users and especially the work of our contributor community to make Bokeh better!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=84093b1689a6" width="1" height="1" alt=""><hr><p><a href="https://blog.bokeh.org/introducing-bokeh-3-8-84093b1689a6">Introducing Bokeh 3.8</a> was originally published in <a href="https://blog.bokeh.org/">bokeh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Bokeh 3.7]]></title>
            <link>https://blog.bokeh.org/introducing-bokeh-3-7-66b7021cc023?source=rss-7aa258e704a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/66b7021cc023</guid>
            <category><![CDATA[data-visualisation]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Bokeh]]></dc:creator>
            <pubDate>Wed, 12 Mar 2025 21:16:04 GMT</pubDate>
            <atom:updated>2025-03-12T21:16:04.369Z</atom:updated>
            <content:encoded><![CDATA[<p>We are excited to announce the release of Bokeh 3.7! This release includes several significant updates:</p><ul><li>a better experience in IDEs</li><li>user-defined custom scatter markers</li><li>DOM text on the canvas for legends</li><li>context menus and improvements for tools</li><li>windowed auto-ranging</li><li>support for more DataFrame types</li><li>new UI components</li></ul><h3>Bokeh 3.7 Highlights</h3><p>Below we highlight some of the improvements that we feel will be most impactful.</p><h4>Improved IDE type hint support</h4><p>In order to help automate cross-runtime communication between Python and JavaScript, Bokeh developed its own typed “properties” system very early on. This system handles validation, serialization, and documentation and is incredibly valuable! However, its development predates the widespread use of Python’s type hints by several years, and so was not developed with those in mind. As a result, the experience in modern IDEs has recently suffered substantially, until now.</p><p>In this release, all of Bokeh’s models and properties in bokeh.models as well as all the APIs in bokeh.plotting have had type stubs for <em>Python </em>type hints added. This results in a much better experience in IDEs:</p><figure><img alt="IDE with Bokeh code loaded in the editor and a pop-up window showing all the type information for a LinearColorMapper class." src="https://cdn-images-1.medium.com/max/1024/1*c8DwErkWGo6IsL09xYvQZg.png" /></figure><p>This work is ongoing, and improvements and refinements will continue in future releases.</p><h4><strong>More DataFrame types accepted</strong></h4><p>Bokeh 3.7 adds <a href="https://narwhals-dev.github.io/narwhals/">Narwhals</a> as a dependency, so that more DataFrame types can be used transparently. In addition to Pandas, now it is possible to use <a href="https://pola.rs/">Polars</a>, <a href="https://arrow.apache.org/docs/python/index.html">PyArrow</a>, or any other eager DataFrame types handled by Narwhals as data for a ColumnDataSource.</p><pre>data = dict(a=[1, 2], b=[2, 3], index=[4, 5])<br>df = pl.DataFrame(data)<br>source = ColumnDataSource(data=df)</pre><h4>Initial support for DOM text on the canvas</h4><p>There is work underway to improve Bokeh’s accessibility features, funded by an <a href="https://chanzuckerberg.com/eoss/">EOSS grant</a> from the <a href="https://chanzuckerberg.com/">Chan Zuckerberg Initiative</a>. In this release, canvas rendering was redesigned to support DOM text on canvas, starting with legends. This makes the information more usable by accessibility tools. More support, including for titles, will come in the next release.</p><figure><img alt="ABokeh scatter plot with a legend where the text labels in the legend are selectable." src="https://cdn-images-1.medium.com/max/692/0*z5NjV-1najRsB2u7" /></figure><p>You can also read about other developments with this grant in our recent <a href="https://blog.bokeh.org/bokeh-for-bioscience-1e8ec629dd5a">Bokeh for Bioscience blog post</a>.</p><h4>Auto-activation for wheel zoom</h4><p>To avoid interfering with page scrolling, WheelZoomTool has always been disabled by default. In Bokeh 3.6 it became possible to automatically enable the tool when configured with key modifiers. In this release, the tool cam be automatically activated whenever the associated plot is in focus. A plot can be focused by interacting with it, e.g. by tapping or panning on it.</p><h4>Custom scatter markers</h4><p>Bokeh has always supported a large set of predefined, built-in marker types. However, users always have needs beyond what we can anticipate. With this release, it is possible for users to define their own custom marker definitions by providing a CustomJS that draws individual instances on the canvas:</p><pre>wheel = CustomJS(code=&quot;&quot;&quot;<br>  export default (args, obj, {ctx, i, r, visuals}) =&gt; {<br>    ctx.arc(0, 0, r, 0, 2*Math.PI, false)<br>    for (let j = 0; j &lt; 4; j++) {<br>      ctx.moveTo(0, r)<br>      ctx.lineTo(0, -r)<br>      ctx.rotate(Math.PI/3)<br>    }<br>    ctx.rotate(-4*Math.PI/3)<br>    visuals.fill.apply(ctx, i)<br>    visuals.hatch.apply(ctx, i)<br>    visuals.line.apply(ctx, i)<br>  }<br>&quot;&quot;&quot;)<br>plot.scatter(…, defs={&quot;@wheel&quot;: wheel})</pre><p>Which results in the new custom marker shown below:</p><figure><img alt="Ten custom “wheel” scatter markers, which are circles with six spokes inside." src="https://cdn-images-1.medium.com/max/188/1*el9I2t7g_6360p7csn-9JQ.png" /></figure><p>See the <a href="https://github.com/bokeh/bokeh/blob/HEAD/examples/basic/scatters/custom_markers.py">custom_markers.py</a> example for more details.</p><h4>Windowed auto-ranging</h4><p>Bokeh has supported auto-ranging since its earliest days, however the auto-ranging has always applied to <em>all</em> the data in the plot, even if it was not visible inside the current viewport. In this release, support for windowed auto-ranging was added, so that, for example, the y-range can be automatically set based only on data visible in the current x-range.</p><p>The OHLC demo has been updated in just this way, and you can see the result below:</p><figure><img alt="A streaming Bokeh plot automatically updating the y-range based on just the data inside the current viewport." src="https://cdn-images-1.medium.com/max/426/0*1WQalqxOFaZMmw7V" /></figure><p>Windowed auto-ranging can be useful in case where data is streamed like above, but also when one range is updated interactively, for example with a RangeTool or a single-axis zoom or pan. Turning on this windowed auto-ranging only requires setting the window_axis property of the plot:</p><pre># use the current x-axis as the window to auto-range the y-range<br>p = figure(..., window_axis=&quot;x&quot;)</pre><h4>Context menus for plot tools</h4><p>Until now it’s only been possible to interactively configure plot tools useing the toolbar. If the toolbar was hidden, then there was <em>no</em> way to activate and deactivate tools, or change modes of operation. In this release, context menus can provide access to all the tools in the toolbar, even if the toolbar isn’t visible.</p><figure><img alt="A Bokeh plot with a context menu for configuring plot tools activated." src="https://cdn-images-1.medium.com/max/1024/0*dShQ4_lePgdlh4nG" /></figure><p>By default, a context menu for tools is added automatically to every plot. The property plot.context_menu can be set to None to disable the default context menu, or set to a ToolMenu instance to add a custom context menu (see the <a href="https://github.com/bokeh/bokeh/blob/HEAD/examples/interaction/tools/tool_context_menu.py">tool_context_menu.py</a> example for details).</p><h4>Progress bars</h4><p>The feature request for a progress bar has been open for a number of years until now. In this release, a new Progress widget has been added that supports either a determinate number of steps to mark progress towards some completion, or an indeterminate number to indicate activity (by spinning continuously).</p><figure><img alt="Bokeh progress bar widgets in determinate, disabled, and indeterminate configurations." src="https://cdn-images-1.medium.com/max/447/1*Ru6QRa1eepyDuziIxENaig.gif" /></figure><p>Progress bars can also be configured in a disabled state, or displayed in a vertical orientation. The code for a determinate progress bar above looks like this:</p><pre>Progress(<br>  value=0, min=0, max=179, <br>  label=&quot;Processing item @{index} of @{total} (@{percent}%)&quot;<br>)</pre><p>Note that the label can refer to the current index, the total number of steps, or the completed percentage. See the <a href="https://github.com/bokeh/bokeh/blob/HEAD/examples/interaction/widgets/progress.py">progress.py</a> example for more details.</p><h4>Drawer component</h4><p>Bokeh 3.7 also adds a new collapsable Drawer UI component. It can be configured with any abitrary Bokeh layout that users can hide or show by dragging on the handle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/629/1*4zOtHX_u3HOwI_FFec3QQw.gif" /></figure><p>In this case an Examiner widget has been added:</p><pre>examiner = Examiner(target=plot)<br>drawer = Drawer(location=&quot;right&quot;, resizable=True, elements=[examiner])<br></pre><p>See the <a href="https://github.com/bokeh/bokeh/blob/HEAD/examples/basic/ui/viewport_drawer.py">viewport_drawer.py</a> and <a href="https://github.com/bokeh/bokeh/blob/HEAD/examples/basic/ui/component_drawer.py">component_drawer.py</a> examples for more details.</p><h3>Updating to Bokeh 3.7</h3><p>Bokeh 3.7 will be available on PyPI immediate after release and can be installed by running pip install bokeh.</p><p>Bokeh 3.7 will also be immediately available from the <a href="https://anaconda.org/bokeh/bokeh">Bokeh channel</a> at <a href="https://anaconda.org/">anaconda.org</a> and can be installed from there by running conda install -c bokeh bokeh (Bokeh will also typically show up on the defaults channel and conda-forge within a few days of release).</p><p>For more information about installing Bokeh, see the section Installation details in the Bokeh <a href="https://docs.bokeh.org/en/dev-3.0/docs/first_steps/installation.html">User Guide</a>.</p><h3>Next Steps</h3><p>If you have questions, we encourage you to visit the <a href="https://discourse.bokeh.org/">Bokeh Discourse</a>! Friendly project maintainers and a community of Bokeh users are there to help you navigate any issues that arise.</p><p>Developers interested in getting involved can visit the <a href="https://docs.bokeh.org/en/latest/docs/dev_guide.html">Contribute section</a> of the User Guide for guidance on best practices and technical considerations.</p><p>As always, we appreciate the thoughtful feedback from users and especially the work of our contributor community to make Bokeh better!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66b7021cc023" width="1" height="1" alt=""><hr><p><a href="https://blog.bokeh.org/introducing-bokeh-3-7-66b7021cc023">Introducing Bokeh 3.7</a> was originally published in <a href="https://blog.bokeh.org/">bokeh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Bokeh 3.2]]></title>
            <link>https://blog.bokeh.org/introducing-bokeh-3-2-fc84d1de8042?source=rss-7aa258e704a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc84d1de8042</guid>
            <dc:creator><![CDATA[Bokeh]]></dc:creator>
            <pubDate>Tue, 18 Jul 2023 16:21:38 GMT</pubDate>
            <atom:updated>2023-07-18T17:02:16.824Z</atom:updated>
            <content:encoded><![CDATA[<p>We are excited to announce the release of Bokeh 3.2! This release includes several useful updates including support for independent zoom on axes, ES module support in CustomJS callbacks, new glyphs and more WebGL support. We also address many regressions and performance issues introduced in earlier Bokeh 3.x releases.</p><h3>Bokeh 3.2 Highlights</h3><p>As a minor release, Bokeh 3.2 includes several large but non-breaking changes and new features. This post spotlights some improvements that we feel will be useful for most users.</p><h3>New “infinite” length span and strip glyphs</h3><p>New HSpan, VSpan, HStrip and VStrip glyphs were added. Those glyphs are “infinite” in one of their dimensions, i.e. they span either horizontal or vertical dimension, generalizing the concept introduced with Span annotation, however allowing for all features provided by glyphs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*1KlCJR8c3miR1oWk" /></figure><h3>Added support for Axis.axis_label_orientation property</h3><p>Previously it wasn’t possible to change the default (parallel) orientation of axis’ labels. With this change, the user can configure axis’ labels the same way as one can configure axis’ major labels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*4i9xbXN3O2MilaLg" /></figure><h3>Added WebGL support to more glyphs</h3><p>Annulus, Wedge and AnnularWedge now support WebGL rendering. This adds to the growing collection of glyphs that can be rendered much more efficiently with WebGL.</p><h3>Added support for ES module to CustomJS callbacks</h3><p>Bokeh 3.2 allows to treat CustomJS callbacks as JavaScript modules. This allows users to use static import and export syntax, besides dynamic imports that were allowed previously. The functionality of a callback is exposed via the default export, which can be a function or an arrow function, with three arguments: args, obj and data. Due to the explicit nature of this setup, no cb_ prefixes are needed anymore, nor are there any implicit variables in the scope of the callback. Caching of compiled function code was improved and support for asynchronous functions was added. BokehJS differentiates old style callbacks from new style by detecting the presence of exports, specifical default export, in the code block. Below is an example of a simple new style callback:</p><pre>code=&quot;&quot;&quot;&quot;<br>export default function({div}, obj, {source, event: {modifiers}}) {<br>const {shift, ctrl, alt} = modifiers<br>const modifiers_repr = `shift = ${shift}, ctrl = ${ctrl}, alt = ${alt}`<br>div.text = `${obj.toString()} modifiers: ${modifiers_repr}`<br>}<br>&quot;&quot;&quot;<br><br>TapTool(callback=CustomJS(<br>args=dict(div=Div()),<br>code=code,<br>)</pre><p>See also <a href="https://github.com/bokeh/bokeh/blob/branch-3.2/examples/advanced/integration/d3-voronoi.py">examples/advanced/integration/d3-voronoi.py</a> for a more advanced example, showing for example how to use third-party imported libraries.</p><h3>Allowed to configure TapTool with key modifiers</h3><p>TapTool now supports configuration of key modifiers. This allows users to create multiple instances of this tool with different modifiers for different functionality. Thus this feature is especially useful when using TapTool with callbacks, like CustomJS. Additionally, TapTool reports key modifiers in callbacks, so that one tool can be used to provide different behaviors depending on what modifier keys were pressed during interaction. Key modifier reporting was also added to all UI events, e.g. Tap event.</p><h3>Added support for zoom of individual axes</h3><p>Bokeh 3.2 adds support for wheel zoom of individual axes. Previously it was possible to zoom on axes, but only on all of them in the given dimension. In this release we improved hit testing of axes, so that tools can work on individual axes. We also added zoom_behavior property to WheelZoomTool, which allows the user to configure which axes will be zoomed during interaction. The behaviors are either the axis being interacted with, or that axis and its cross axis, or all axes in the given dimension (the old behavior). Additionally ZoomInTool and ZoomOutTool can be configured with renderers (by setting renderers property), which are used to determine which ranges (and thus axes) are to be either zoomed in or out.</p><p>Some additional updates include:</p><ul><li>Correctly resolve custom host and port with server resources</li><li>Official support for Python 3.8 was removed</li></ul><h3>Updating to Bokeh 3.2</h3><p>Bokeh 3.2 will be available through all regular channels shortly after release. In most cases, you can run either conda install bokeh or pip install bokeh to install Bokeh 3.2.</p><p>(If you want to make sure you get the most recent available version of Bokeh, you can install from the <a href="https://anaconda.org/bokeh/bokeh">Bokeh channel</a> at anaconda.org directly, using conda install -c bokeh bokeh.)</p><p>For more information about installing Bokeh, see the section Installation details in the Bokeh <a href="https://docs.bokeh.org/en/dev-3.0/docs/first_steps/installation.html">User guide</a>.</p><h3>Next Steps</h3><p>If you have questions, we encourage you to visit the <a href="https://discourse.bokeh.org/">Bokeh Discourse</a>! Friendly project maintainers and a community of Bokeh users are there to help you navigate any issues that arise.</p><p>Developers interested in getting involved can visit the <a href="https://docs.bokeh.org/en/latest/docs/dev_guide.html">Contribute section</a> of the User Guide for guidance on best practices and technical considerations.</p><p>As always, we appreciate the thoughtful feedback from users and especially the work of our contributor community to make Bokeh better!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc84d1de8042" width="1" height="1" alt=""><hr><p><a href="https://blog.bokeh.org/introducing-bokeh-3-2-fc84d1de8042">Introducing Bokeh 3.2</a> was originally published in <a href="https://blog.bokeh.org/">bokeh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Bokeh 3.2]]></title>
            <link>https://medium.com/@bokeh/introducing-bokeh-3-2-92531999622?source=rss-7aa258e704a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/92531999622</guid>
            <dc:creator><![CDATA[Bokeh]]></dc:creator>
            <pubDate>Tue, 11 Jul 2023 16:33:19 GMT</pubDate>
            <atom:updated>2023-07-11T16:33:19.593Z</atom:updated>
            <content:encoded><![CDATA[<p>We are excited to announce the release of Bokeh 3.2! This release includes several useful updates including support for independent zoom on axes, ES module support in CustomJS callbacks, new glyphs and more WebGL support. We also address many regressions and performance issues introduced in earlier Bokeh 3.x releases.</p><h3>Bokeh 3.2 Highlights</h3><p>As a minor release, Bokeh 3.2 includes several large but non-breaking changes and new features. This post spotlights some improvements that we feel will be useful for most users.</p><h4>New “infinite” length span and strip glyphs</h4><p>New HSpan, VSpan, HStrip and VStrip glyphs were added. Those glyphs are “infinite” in one of their dimensions, i.e. they span either horizontal or vertical dimension, generalizing the concept introduced with Span annotation, however allowing for all features provided by glyphs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*3rV3HKQdvEEf_qO0" /></figure><h4>Added support for Axis.axis_label_orientation property</h4><p>Previously it wasn’t possible to change the default (parallel) orientation of axis’ labels. With this change, the user can configure axis’ labels the same way as one can configure axis’ major labels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*eNpuZxf0a7JfiYH2" /></figure><h4>Added WebGL support to more glyphs</h4><p>Annulus, Wedge and AnnularWedge now support WebGL rendering. This adds to the growing collection of glyphs that can be rendered much more efficiently with WebGL.</p><h4>Added support for ES module to CustomJS callbacks</h4><p>Bokeh 3.2 allows to treat CustomJS callbacks as JavaScript modules. This allows users to use static import and export syntax, besides dynamic imports that were allowed previously. The functionality of a callback is exposed via the default export, which can be a function or an arrow function, with three arguments: args, obj and data. Due to the explicit nature of this setup, no cb_ prefixes are needed anymore, nor are there any implicit variables in the scope of the callback. Caching of compiled function code was improved and support for asynchronous functions was added. BokehJS differentiates old style callbacks from new style by detecting the presence of exports, specifical default export, in the code block. Below is an example of a simple new style callback:</p><p>code=”””\</p><p>export default function({div}, obj, {source, event: {modifiers}}) {</p><p>const {shift, ctrl, alt} = modifiers</p><p>const modifiers_repr = `shift = ${shift}, ctrl = ${ctrl}, alt = ${alt}`</p><p>div.text = `${obj.toString()} modifiers: ${modifiers_repr}`</p><p>}</p><p>“””</p><p>TapTool(callback=CustomJS(</p><p>args=dict(div=Div()),</p><p>code=code,</p><p>)</p><p>See also examples/advanced/integration/d3-voronoi.py for a more advanced example, showing for example how to use third-party imported libraries.</p><h4>Allowed to configure TapTool with key modifiers</h4><p>TapTool now supports configuration of key modifiers. This allows users to create multiple instances of this tool with different modifiers for different functionality. Thus this feature is especially useful when using TapTool with callbacks, like CustomJS. Additionally, TapTool reports key modifiers in callbacks, so that one tool can be used to provide different behaviors depending on what modifier keys were pressed during interaction. Key modifier reporting was also added to all UI events, e.g. Tap event.</p><h4>Added support for zoom of individual axes</h4><p>Bokeh 3.2 adds support for wheel zoom of individual axes. Previously it was possible to zoom on axes, but only on all of them in the given dimension. In this release we improved hit testing of axes, so that tools can work on individual axes. We also added zoom_behavior property to WheelZoomTool, which allows the user to configure which axes will be zoomed during interaction. The behaviors are either the axis being interacted with, or that axis and its cross axis, or all axes in the given dimension (the old behavior). Additionally ZoomInTool and ZoomOutTool can be configured with renderers (by setting renderers property), which are used to determine which ranges (and thus axes) are to be either zoomed in or out.</p><p>Some additional updates include:</p><ul><li>Correctly resolve custom host and port with server resources</li><li>Official support for Python 3.8 was removed</li></ul><h3>Updating to Bokeh 3.2</h3><p>Bokeh 3.2 will be available through all regular channels shortly after release. In most cases, you can run either conda install bokeh or pip install bokeh to install Bokeh 3.2.</p><p>(If you want to make sure you get the most recent available version of Bokeh, you can install from the <a href="https://anaconda.org/bokeh/bokeh">Bokeh channel</a> at anaconda.org directly, using conda install -c bokeh bokeh.)</p><p>For more information about installing Bokeh, see the section Installation details in the Bokeh <a href="https://docs.bokeh.org/en/dev-3.0/docs/first_steps/installation.html">User guide</a>.</p><h3>Next Steps</h3><p>If you have questions, we encourage you to visit the <a href="https://discourse.bokeh.org/">Bokeh Discourse</a>! Friendly project maintainers and a community of Bokeh users are there to help you navigate any issues that arise.</p><p>Developers interested in getting involved can visit the <a href="https://docs.bokeh.org/en/latest/docs/dev_guide.html">Contribute section</a> of the User Guide for guidance on best practices and technical considerations.</p><p>As always, we appreciate the thoughtful feedback from users and especially the work of our contributor community to make Bokeh better!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=92531999622" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Highlights from the Bokeh Gallery]]></title>
            <link>https://blog.bokeh.org/highlights-from-the-bokeh-gallery-5b4f0b7fbecf?source=rss-7aa258e704a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5b4f0b7fbecf</guid>
            <category><![CDATA[scipy]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Bokeh]]></dc:creator>
            <pubDate>Wed, 14 Jun 2023 15:36:26 GMT</pubDate>
            <atom:updated>2023-06-14T15:36:26.435Z</atom:updated>
            <content:encoded><![CDATA[<p>We thought it would be fun to do a quick highlight of a few of our favorite <a href="https://docs.bokeh.org/en/latest/docs/gallery.html">Bokeh gallery</a> examples. Let’s get to it!</p><p><strong>The hex tile</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UQi_QDOPZVwyuti8ThNADw.png" /></figure><p>This plot has been featured in several Bokeh presentations and marketing collateral. It’s a favorite due to a combination of visual appeal and seamless presentation of a large dataset (in this case 50,000 points).</p><p>This manual hexbin plot uses randomly selected points. The points, from a normal distribution, are binned into hexagonal tiles using the Bokeh hexbin utility function. The tiles are then colormapped linearly according to their bin counts.</p><pre>import numpy as np<br><br>from bokeh.plotting import figure, show<br>from bokeh.transform import linear_cmap<br>from bokeh.util.hex import hexbin<br><br>n = 50000<br>x = np.random.standard_normal(n)<br>y = np.random.standard_normal(n)<br><br>bins = hexbin(x, y, 0.1)<br><br>p = figure(title=&quot;Manual hex bin for 50000 points&quot;, tools=&quot;wheel_zoom,pan,reset&quot;,<br>           match_aspect=True, background_fill_color=&#39;#440154&#39;)<br>p.grid.visible = False<br><br>p.hex_tile(q=&quot;q&quot;, r=&quot;r&quot;, size=0.1, line_color=None, source=bins,<br>           fill_color=linear_cmap(&#39;counts&#39;, &#39;Viridis256&#39;, 0, max(bins.counts)))<br><br>show(p)<br></pre><p><strong>The LaTeX black body radiation</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Uot7wuYL5GcUv3wwioQoHA.png" /></figure><p>This plot was created alongside the release of Bokeh 2.4 to showcase support for LaTeX in plots. It demonstrates the spectral radiance predicted by Planck’s Law for ideal black body objects at varying temperatures. This example spotlights the use of math text on axes and in Div and Paragraph objects/widgets (a benefit of adding LaTeX and MathML support to Bokeh).</p><p>Since this plot is about black body radiation, we used a dark theme to display it.</p><pre>import numpy as np<br><br>from bokeh.io import curdoc<br>from bokeh.layouts import column<br>from bokeh.models import Div<br>from bokeh.palettes import Spectral<br>from bokeh.plotting import figure, show<br><br>p = figure(<br>    width=700, height=500, toolbar_location=None,<br>    title=&quot;Black body spectral radiance as a function of frequency&quot;)<br><br>def spectral_radiance(nu, T):<br>    h = 6.626e-34   # Planck constant (Js)<br>    k = 1.3806e-23  # Boltzmann constant (J/K)<br>    c = 2.9979e8    # Speed of light in vacuum (m/s)<br>    return (2*h*nu**3/c**2) / (np.exp(h*nu/(k*T)) - 1.0)<br><br>Ts = np.arange(2000, 6001, 500)  # Temperature (K)<br>palette = Spectral[len(Ts)]<br>nu = np.linspace(0.1, 1e15, 500)  # Frequency (1/s)<br><br>for i, T in enumerate(Ts):<br>    B_nu = spectral_radiance(nu, T)<br>    p.line(nu/1e15, B_nu/1e-9, line_width=2,<br>             legend_label=f&quot;T = {T} K&quot;, line_color=palette[i])<br>p.legend.items = list(reversed(p.legend.items))<br><br># Peak radiance line.<br>Ts = np.linspace(1900, 6101, 50)<br>peak_freqs = Ts*5.879e10<br>peak_radiance = spectral_radiance(peak_freqs, Ts)<br>p.line(peak_freqs/1e15, peak_radiance/1e-9, line_color=&quot;silver&quot;,<br>         line_dash=&quot;dashed&quot;, line_width=2, legend_label=&quot;Peak radiance&quot;)<br><br>curdoc().theme = &#39;dark_minimal&#39;<br>p.y_range.start = 0<br>p.xaxis.axis_label = r&quot;$$\nu \:(10^{15}\ \text{Hz})$$&quot;<br>p.yaxis.axis_label = r&quot;$$B_\nu(\nu, T) \quad\left(10^{-9}\ \text{W} / (\text{m}^2 \cdot \text{sr} \cdot \text{Hz})\right)$$&quot;<br><br>div = Div(text=r&quot;&quot;&quot;<br>A plot of the spectral radiance, defined as a function of the frequency $$\nu$$, is given by the formula<br>&lt;p \&gt;<br>$$<br>\qquad B_\nu(\nu, T) = \frac{2h\nu^3}{c^2} \frac{1}{\exp(h\nu/kT)-1}\ .<br>$$<br>&quot;&quot;&quot;)<br>show(column(p, div))</pre><p><strong>The contour</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*l4XTtKeQoLQQM_7F6cPYvQ.png" /></figure><p>This plot consists of lines at each contour level and filled polygons between each pair of contour levels.</p><p>Contour plots come in handy when users need to calculate and render lines of constant value in two-dimensional quadrilateral grids. The lines and filled regions between lines can be rendered with a single function call. Given the color variations possible, these plots often produce visually engaging results.</p><pre>import numpy as np<br><br>from bokeh.palettes import OrRd<br>from bokeh.plotting import curdoc, figure, show<br><br>x, y = np.meshgrid(np.linspace(0, 4, 33), np.linspace(0, 3, 25))<br>z = np.sin(np.pi*x) + np.cos(np.pi*y)<br>levels = np.linspace(-2.0, 2.0, 9)<br><br>fig = figure(width=600, height=500, toolbar_location=None, x_range=(0, 4), y_range=(0, 3),<br>             title=r&#39;$$\text{Contour plot of } z = \sin(\pi x) + \cos(\pi y)$$&#39;)<br><br>contour_renderer = fig.contour(<br>    x, y, z, levels, fill_color=OrRd,<br>    line_color=[&#39;white&#39;]*4 + [&#39;black&#39;]*5, line_dash=[&#39;solid&#39;]*5 + [&#39;dashed&#39;]*4, line_width=2,<br>)<br><br>colorbar = contour_renderer.construct_color_bar()<br>fig.add_layout(colorbar, &#39;right&#39;)<br><br>curdoc().theme = &#39;dark_minimal&#39;<br><br>show(fig)</pre><p><strong>The color scatter</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*OCmvUccNn3nwUee2oTpXAA.png" /></figure><p>Bokeh includes a large variety of markers for creating scatter plots such as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*fwglM2dNhS9156YasMTCWQ.png" /></figure><p>We like this simple plot because it showcases the power of selecting the right kinds of color palettes when visualizing large amounts of data. It also highlights the value of interactive plots, with elements such as tooltips that help users drill down into specific data points.</p><pre>import numpy as np<br><br>from bokeh.plotting import figure, show<br><br>N = 4000<br>x = np.random.random(size=N) * 100<br>y = np.random.random(size=N) * 100<br>radii = np.random.random(size=N) * 1.5<br>colors = np.array([(r, g, 150) for r, g in zip(50+2*x, 30+2*y)], dtype=&quot;uint8&quot;)<br><br>TOOLS=&quot;hover,crosshair,pan,wheel_zoom,zoom_in,zoom_out,box_zoom,undo,redo,reset,tap,save,box_select,poly_select,lasso_select,examine,help&quot;<br><br>p = figure(tools=TOOLS)<br><br>p.scatter(x, y, radius=radii,<br>          fill_color=colors, fill_alpha=0.6,<br>          line_color=None)<br><br>show(p)</pre><p><strong>Next Steps</strong></p><p>If you have questions, we encourage you to visit the <a href="https://discourse.bokeh.org/">Bokeh Discourse</a>! Friendly project maintainers and a community of Bokeh users are there to help you navigate any issues that arise.</p><p>Developers interested in getting involved can visit the <a href="https://docs.bokeh.org/en/latest/docs/dev_guide.html">contributor’s guide</a> for guidance on best practices, technical considerations, and how to get started.</p><p>As always, we appreciate the thoughtful feedback from users and especially the work of our contributor community to make Bokeh better!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5b4f0b7fbecf" width="1" height="1" alt=""><hr><p><a href="https://blog.bokeh.org/highlights-from-the-bokeh-gallery-5b4f0b7fbecf">Highlights from the Bokeh Gallery</a> was originally published in <a href="https://blog.bokeh.org/">bokeh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Bokeh 3.1 Released]]></title>
            <link>https://blog.bokeh.org/bokeh-3-1-released-428e1537050c?source=rss-7aa258e704a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/428e1537050c</guid>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Bokeh]]></dc:creator>
            <pubDate>Fri, 10 Mar 2023 15:56:17 GMT</pubDate>
            <atom:updated>2023-03-10T15:56:17.421Z</atom:updated>
            <content:encoded><![CDATA[<p>We are excited to announce the release of Bokeh 3.1! This release includes several important updates including improved document events, persistent selection overlays, new date, datetime and time pickers, and richer visuals for Text glyph.</p><p>This post outlines the updates that we think will be especially useful for most users (see the <a href="https://github.com/bokeh/bokeh/blob/main/docs/CHANGELOG">changelog</a> and <a href="https://docs.bokeh.org/en/latest/docs/releases.html">release notes</a> for all details).</p><h4>Document events</h4><p>A long-requested feature has been the ability to define JavaScript callbacks for document events such as <em>“ready”</em> or <em>“connection lost”</em>. Previously, only the <em>“ready”</em> event existed, and it only supported Python callbacks. Now, all document events—including a new <em>“connection lost”</em> event—support both Python and Javascript callbacks:</p><ul><li>DocumentReady — emitted when BokehJS has finished initialization for a given document</li><li>ConnectionLost — emitted when the websocket connection to a Bokeh server was lost</li></ul><p>For example, the following snippet will display a modal alert if a Bokeh server application loses its connection:</p><pre>curdoc().js_on_event(&quot;connection_lost&quot;, CustomJS(code=&quot;&quot;&quot;<br>    alert(&quot;Connection lost!&quot;)<br>&quot;&quot;&quot;)</pre><figure><img alt="A modal alert dialog displaying “Connection lost!” over a Bokeh app page." src="https://cdn-images-1.medium.com/max/1024/0*e923D6fCH6ykF-W8" /></figure><h4>CSS Styling Improvements</h4><p>CSS styles can now be applied programmatically, with a new Styles object:</p><pre>style = Styles(<br>    display=&quot;grid&quot;,<br>    grid_template_columns=&quot;auto auto&quot;,<br>    column_gap=&quot;10px&quot;,<br>)<br>grid = Div(style=style)</pre><p>and one of four new stylesheet objects:</p><pre>from bokeh.models import InlineStyleSheet<br><br>stylesheet = InlineStyleSheet(<br>    css=&quot;.bk-slider-title { background-color: lightgray; }&quot;<br>)<br><br>slider = Slider(<br>    value=10, start=0, end=100, step=0.5, stylesheets=[stylesheet]<br>)</pre><p>For full details see the new <a href="https://docs.bokeh.org/en/latest/docs/user_guide/styling/dom.html">Styling DOM elements</a> section of the user’s guide.</p><h4>Persistent Selection Overlays</h4><p>Bokeh now supports persistent box, poly and lasso selection overlays. These can be enabled by setting the persistent property on the respective select tools. This feature allows users to interact with selected overlays after the initial selection is completed, by moving it around or changing its shape and size. Users can refine selections as needed, without having to start from scratch. Selection overlays persist between tool changes, so that users can make a selection, pan around or zoom in, and then continue to refine the same selection.</p><h4>Visual Improvements to Text glyph</h4><p>The existing Text glyph was limited to plain text, so users have had to switch to annotations such as LabelSet or compose multiple glyphs to have richer text visuals. Now, users can configure background and border visuals, border radius, padding and anchoring for Text glyph.</p><figure><img alt="Plot of a graph where each node is a multi-line text label with rounded corners and a different background color." src="https://cdn-images-1.medium.com/max/606/0*F6pRJzkx1whaDapa" /></figure><p>In the future, the Text glyph will become the primary tool used for labels and text annotations.</p><h4>Rounded corners</h4><p>All rectangular glyphs (Rect, Block, Quad, HBar and VBar) as well as BoxAnnotation gained support for a new border_radius property. This property affords rounded corners for all the glyphs, and works for all three backends:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kn2sDe9a8zBuBQ5abNSQkg.png" /></figure><h4>Legends</h4><p>Previously, legends supported single row or column layouts, depending on their orientation. In Bokeh 3.1, it is possible to create gridded legends by using the nrows and ncols properties.</p><figure><img alt="Multiple sine curves plotted with different scatter markers, and a 3x2 gridded legend to define each curve." src="https://cdn-images-1.medium.com/max/302/0*vl6bVK6kcpsTtgaZ" /></figure><p>Legend titles can be positioned on either side of a legend, and support multi-line text. Finally, there are also new properties for configuring legend item backgrounds.</p><h4>Date, datetime and time widgets</h4><p>Bokeh already had aDatePicker, which allowed for selecting a single date value. This release adds support for picking multiple dates and date ranges. Support was also added for times and datetimes:</p><ul><li>DatetimePicker</li><li>DatetimeRangePicker</li><li>MultipleDatetimePicker</li><li>DateRangePicker</li><li>MultipleDatePicker</li><li>TimePicker</li></ul><p>For example, the new DateRangePicker looks like:</p><figure><img alt="New Bokeh DatePicker widget displaying a range of dates selected in September, 2019" src="https://cdn-images-1.medium.com/max/1024/1*S-9nI-LDJs13s42-Y6J1DQ.png" /></figure><p>All the new widgets support custom date and time formatting.</p><h4>Fill areas in Slope annotation</h4><p>The Slope annotation now supports configuring fill areas above and below the sloping line defined by the annotation:</p><figure><img alt="A 2x2 grid plot showing various slope annotation orientation, with a red hatched fill pattern below the slope, and a yellow solid fill pattern above." src="https://cdn-images-1.medium.com/max/410/0*dpptuTcqS24LMPYd" /></figure><h4>Color mapped image stacks</h4><p>This release also includes support for color-mapped image stacks. Each image in the stack has its own color and the stack is rendered using a weighted average of those individual colors:</p><figure><img alt="Colormapped 3d image array with red, green, and blue areas" src="https://cdn-images-1.medium.com/max/980/1*yXX7kJXifFT654_Nm5_kIQ.png" /></figure><p>Future releases will build on this work to add new interactions, e.g. color mapping levels of image stacks individually, so that the entire stack can be interactively scrubbed through.</p><h4>Colorbars</h4><p>The convenience method construct_color_bar that was recently added to contour renderers was so nice, we decided to add it to all glyph renderers. The method will look for a color mapper defined for any known color property, and return an appropriately configured color bar:</p><pre># use the field name of the column source<br>cmap = linear_cmap(&#39;counts&#39;, palette=&quot;Spectral6&quot;, low=min(y), high=max(y))<br><br>r = p.scatter(x=&#39;x&#39;, y=&#39;y&#39;, color=cmap, size=15, source=source)<br><br># automatically create a color bar from the scatter glyph renderer<br>color_bar = r.construct_color_bar(width=10)</pre><h3>Updating to Bokeh 3.1</h3><p>Bokeh 3.1 will be available through all regular channels shortly after release. In most cases, you can run either conda install bokeh or pip install bokeh.</p><p>If you want to make sure you get the most recent available version immediately, you can also install directly from the <a href="https://anaconda.org/bokeh/bokeh">Bokeh channel</a> at <a href="https://anaconda.org/">anaconda.org</a>, using conda install -c bokeh bokeh.</p><p>For more information about installing Bokeh, see the section<a href="https://docs.bokeh.org/en/latest/docs/first_steps/installation.html"> Installation details</a> section in the <a href="https://docs.bokeh.org/en/latest/index.html">Bokeh documentation</a>.</p><h3>Next Steps</h3><p>If you have questions, we encourage you to visit by the <a href="https://discourse.bokeh.org/">Bokeh Discourse</a>! Friendly project maintainers and a community of Bokeh users are there to help you navigate any issues that arise.</p><p>Developers interested in getting involved can visit the <a href="https://docs.bokeh.org/en/latest/docs/dev_guide.html">contributor’s guide</a> for guidance on best practices, technical considerations, and how to get started.</p><p>As always, we appreciate the thoughtful feedback from users and especially the work of our contributor community to make Bokeh better!</p><figure><img alt="Bokeh “shutter” logo with multi-colored petals." src="https://cdn-images-1.medium.com/max/160/1*colsyTtW6yn81fWD5-1zLQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=428e1537050c" width="1" height="1" alt=""><hr><p><a href="https://blog.bokeh.org/bokeh-3-1-released-428e1537050c">Bokeh 3.1 Released</a> was originally published in <a href="https://blog.bokeh.org/">bokeh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Announcing CZI funding for Bokeh for Bioscience!]]></title>
            <link>https://blog.bokeh.org/announcing-czi-funding-for-bokeh-for-bioscience-5f74426c011a?source=rss-7aa258e704a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f74426c011a</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[imaging-technology]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[scientific-research]]></category>
            <dc:creator><![CDATA[Bokeh]]></dc:creator>
            <pubDate>Thu, 10 Nov 2022 19:17:35 GMT</pubDate>
            <atom:updated>2022-11-10T19:50:54.509Z</atom:updated>
            <content:encoded><![CDATA[<p><a href="https://bokeh.org/">Bokeh</a>, <a href="https://numfocus.org/">NumFocus</a>, and <a href="https://www.anaconda.com/">Anaconda</a> are very pleased to announce <a href="https://chanzuckerberg.com/eoss/proposals/bokeh-raster-image-and-time-series-improvements-for-biomedical-applications/">two years of funding from the Chan Zuckerberg Initiative</a> to improve support for visualizing gridded bioscience data using Bokeh.</p><p>Regularly sampled (gridded) data is ubiquitous in biomedical and bioscience experiments, including microscopic imaging and voltage or current measurement:</p><figure><img alt="Images part of a microscopic imaging workflow from github.com/DeniseCaiLab" src="https://cdn-images-1.medium.com/max/1024/0*V4Fd7lVDhV_H6OSU" /><figcaption><em>Example microscopic imaging workflow, from </em><a href="https://github.com/DeniseCaiLab/minian"><em>github.com/DeniseCaiLab</em></a></figcaption></figure><figure><img alt="A series of voltage sampling visualizations from frontiersin.org/articles/10.3389/fncir.2012.00105" src="https://cdn-images-1.medium.com/max/744/0*asY8iQgQ4u--Pbkt" /><figcaption><em>Example voltage sampling visualization, from </em><a href="https://www.frontiersin.org/articles/10.3389/fncir.2012.00105/full"><em>frontiersin.org/articles/10.3389/fncir.2012.00105</em></a></figcaption></figure><p>Displaying high-volume and/or real-time imaging and time series data typically requires proprietary or operating-system-specific tools that make building shareable and reproducible open-source (OS) workflows much more difficult.</p><p>Bokeh is one of the most popular Python tools for visualizing data. It provides open, OS-agnostic, browser-based visualization, with high-performance binary data transport between Python and the browser that can support live data display and analysis. However, Bokeh has not previously been optimized for these applications, which have specific needs not yet addressed. In this project, we plan to:</p><ul><li>Set up representative bioscience imaging and time series data workflows and test cases, working with Bokeh directly or using higher-level Bokeh-based tools like <a href="https://holoviews.org/">HoloViews</a>, <a href="https://hvplot.holoviz.org/">hvPlot</a>, and <a href="https://panel.holoviz.org/">Panel</a></li><li>Optimize viewing large images and large image stacks in the web browser, such as those from electron and fluorescent microscopy</li><li>Improve image and time series annotation and selection tools to make it simpler for researchers to denote areas of interest and flag them for further study or analysis</li><li>Make it easier to align multiple subplots of time series data (e.g. multi-electrode recordings sharing a time axis and with a shared scale bar for y axes)</li><li>Support streaming (oscilloscope-style) time series data playback, including optimizing performance, adding decimation and aggregation options, and improving the user interface (pausing, zooming, and returning to live data streams or data playback streams)</li><li>Provide documentation, examples, and outreach, including local usage, client-server usage, and guides for migrating from proprietary tools</li></ul><p>Our goal for this project is to make it possible for bioscience and biomedical researchers to develop fully open, reproducible, OS-independent, browser-based workflows and processes that they can share fully with geographically dispersed colleagues and co-workers.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f74426c011a" width="1" height="1" alt=""><hr><p><a href="https://blog.bokeh.org/announcing-czi-funding-for-bokeh-for-bioscience-5f74426c011a">Announcing CZI funding for Bokeh for Bioscience!</a> was originally published in <a href="https://blog.bokeh.org/">bokeh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Bokeh 3.0]]></title>
            <link>https://blog.bokeh.org/introducing-bokeh-3-0-914b8f67d0b?source=rss-7aa258e704a5------2</link>
            <guid isPermaLink="false">https://medium.com/p/914b8f67d0b</guid>
            <category><![CDATA[python]]></category>
            <category><![CDATA[jupyter-notebook]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[data-visualization]]></category>
            <dc:creator><![CDATA[Bokeh]]></dc:creator>
            <pubDate>Mon, 31 Oct 2022 15:08:13 GMT</pubDate>
            <atom:updated>2022-11-01T14:00:50.219Z</atom:updated>
            <content:encoded><![CDATA[<p>Bokeh 3.0 brings several major updates and improvements that we are very excited about, including new contour plots, a restructured user guide and gallery, and an overhaul of how Bokeh creates layouts and interacts with CSS and HTML.</p><h3>Bokeh 3.0 Highlights</h3><p>As a major release, Bokeh 3.0 bundles several breaking changes necessary to future-proof the code base and make sure that Bokeh can be well maintained. This new version also includes important updates and several new features (see the <a href="https://github.com/bokeh/bokeh/blob/main/docs/CHANGELOG">changelog</a> and <a href="https://docs.bokeh.org/en/latest/docs/releases.html">release notes</a> for all details). This post outlines the updates that we think will be especially useful for most users.</p><h4>New Built-In Contour Plots</h4><p>Bokeh now supports contour plots. This has been a long-requested feature. Bokeh’s new <a href="https://docs.bokeh.org/en/latest/docs/user_guide/topics/contour.html">contour plot feature</a> allows you to create contour lines and filled polygons in a single function call, and automatically configure a colorbar with another:</p><pre>contour_renderer = fig.contour(<br>    x, y, z, levels, fill_color=OrRd, line_width=2,<br>    line_color=[&#39;white&#39;]*4 + [&#39;black&#39;]*5, <br>    line_dash=[&#39;solid&#39;]*5 + [&#39;dashed&#39;]*4, <br>)</pre><pre>colorbar = contour_renderer.construct_color_bar()</pre><figure><img alt="Screenshot of a contour plot made with Bokeh" src="https://cdn-images-1.medium.com/max/899/1*zZY7KFeGdMkA8HONUmC3AA.png" /></figure><p>Contour plots can range from simple 2D contour plots to complex plots combining lines with fill and hatch properties. Interactive animations are also possible by simply updating the data on the contour renderer:</p><pre>from bokeh.plotting.contour import contour_data</pre><pre>new_contour_data = contour_data(x, y, z, levels)<br>contour_renderer.set_data(new_contour_data)</pre><figure><img alt="Animation of a contour plot made with Bokeh" src="https://cdn-images-1.medium.com/max/470/1*54o7PX5pt54Dg6JmJ7LPTQ.gif" /></figure><p>We are <a href="https://github.com/bokeh/bokeh/discussions/12234">planning to add more contour plot features</a> in future releases.</p><h4>Restructured User Guide</h4><p>The <a href="https://docs.bokeh.org/en/latest/docs/user_guide.html">user guide at docs.bokeh.org</a> is completely restructured and has several new sections. Our new user guide makes it easier to find the right information quickly. The new structure also adds much-needed flexibility for future additions and updates to the user guide.</p><p>In particular, the user guide contains a new <a href="https://docs.bokeh.org/en/latest/docs/user_guide/topics.html">“Topics guides” chapter</a> providing guidance for specific use cases. Some of the new sections include:</p><ul><li><a href="https://docs.bokeh.org/en/latest/docs/user_guide/topics/images.html">Images and raster data</a></li><li><a href="https://docs.bokeh.org/en/latest/docs/user_guide/topics/hierarchical.html">Hierarchical data</a></li><li><a href="https://docs.bokeh.org/en/latest/docs/user_guide/topics/geo.html">Geographical data</a></li><li><a href="https://docs.bokeh.org/en/latest/docs/user_guide/topics/graph.html">Network graphs</a></li><li><a href="https://docs.bokeh.org/en/latest/docs/user_guide/topics/timeseries.html">Timeseries plots</a></li><li><a href="https://docs.bokeh.org/en/latest/docs/user_guide/topics/stats.html">Statistical plots</a></li></ul><p>These topical guides are just getting started, and there is plenty of room to grow. Adding new guidance and examples is a great avenue for <a href="https://docs.bokeh.org/en/latest/docs/dev_guide.html">new contributors</a> to get involved and share their expertise!</p><h4>Expanded Gallery</h4><p>We have more than doubled the size of the Bokeh gallery. The new <a href="https://docs.bokeh.org/en/latest/docs/gallery.html">gallery</a> features tabs for quicker browsing, and most of the examples have additional metadata and links to the relevant user guide and reference guide sections. The <a href="https://docs.bokeh.org/en/latest/docs/reference/sampledata.html">sampledata index</a> now contains links to all examples based on each of the listed data sets.</p><figure><img alt="A collage of all the thumbnails of many plot types from the Bokeh gallery." src="https://cdn-images-1.medium.com/max/1024/1*CfI3Mxk-oDDB0zagtohe8g.png" /></figure><h4>Improved Layouts</h4><p>Internally, Bokeh used to rely on a custom layout engine for handling layout-related functionality in the browser. This custom implementation wasn’t a good fit for working with modern Web APIs. We have redesigned how Bokeh handles layouts and interacts with DOM/CSS to rely on native functionalities that already exist in modern web browsers, making styling UI components much easier and richer.</p><p>As part of this update, absolute positioning of UI components was replaced with “natural” CSS positioning. Bokeh’s new layout system also makes it possible to use media queries when styling Bokeh layouts, making it much easier to build truly responsive layouts.</p><p>This change also brings significant performance improvements for many use cases compared to previous versions. Layouts with a large number of UI components render more quickly, and updates to layouts don’t require re-rendering entire dashboards or apps. This makes the overall user experience more refined and predictable (no loss of element focus, for example).</p><h4>Improved Widgets and Tools</h4><p>Bokeh 3.0 includes several new and updated interactive widgets and UI components, such as the <a href="https://docs.bokeh.org/en/latest/docs/user_guide/interaction/widgets.html#switch">on/off </a><a href="https://docs.bokeh.org/en/latest/docs/user_guide/interaction/widgets.html#switch">Switch widget</a> or an updated <a href="https://docs.bokeh.org/en/latest/docs/user_guide/interaction/widgets.html#passwordinput">PasswordInput</a> that now includes a button for displaying the entered password in clear text.</p><figure><img alt="A screenshot of the updated Bokeh password entry widget." src="https://cdn-images-1.medium.com/max/195/0*2KlNxFANLeMguFeH" /></figure><p>The new <a href="https://docs.bokeh.org/en/latest/docs/reference/models/layouts.html#bokeh.models.GroupBox">GroupBox</a> layout adds new options to combine UI elements. For example, to group a TextInput widget with additional suffix and prefix fields to create a UI element for configuring a 3D printer’s head offset:</p><figure><img alt="A screenshot of three text entry widgets inside a new GroupBox" src="https://cdn-images-1.medium.com/max/341/0*blAj4uxNpva3AYy8" /></figure><p>The Bokeh toolbar now includes updated save and copy tools that are able to handle multiple plots arranged in a grid plot layout (in addition to copying and exporting single plots). Along with other buttons, we have also refreshed and modernized the buttons used in the toolbar. These buttons are now also using SVG which allows for smooth scaling (for example when using very large toolbar buttons).</p><p>Finally, there is a new ExamineTool that can be used to introspect all the property values on live Bokeh objects in the browser:</p><figure><img alt="Screenshot of Bokeh ExamineTool inspecting a scatter plot." src="https://cdn-images-1.medium.com/max/1024/1*OUJp7kIrU70BIvcNSOjcVQ.png" /></figure><p>Currently, this tool can be accessed by adding it to a toolbar, but in the future, it will be accessible on any object via a context menu.</p><p>See the sections <a href="https://docs.bokeh.org/en/latest/docs/user_guide/interaction/widgets.html">“Widgets and DOM elements”</a> and <a href="https://docs.bokeh.org/en/latest/docs/user_guide/interaction/tools.html">“Plot tools”</a> in the Bokeh user guide for details.</p><h4>Enhanced WebGL Support</h4><p>Bokeh 3.0 includes several <a href="https://github.com/bokeh/bokeh/pulls?q=is%3Apr+milestone%3A3.0+label%3A%22tag%3A+webgl%22+is%3Aclosed">fixes and enhancements</a> to the WebGL rendering backend. This can improve Bokeh’s performance when visualizing larger data sets, for example. See <a href="https://docs.bokeh.org/en/latest/docs/user_guide/output/webgl.html">“WebGL acceleration” in the Bokeh user guide</a> for more information.</p><h4>More Color Palettes</h4><p>Bokeh’s built-in color palettes now include <a href="https://docs.bokeh.org/en/latest/docs/reference/palettes.html#accessible-palettes">new options for improved accessibility</a>, adapted from <a href="https://personal.sron.nl/~pault/">Paul Tol’s notes on color schemes</a>. Four of the new palettes are shown below:</p><figure><img alt="Four accessible palettes called “Bright”, “Muted”, “TolPRGn”, and “BuRd” from https://personal.sron.nl/~pault/" src="https://cdn-images-1.medium.com/max/940/1*1xssAT6LxUXHXwbd_wLeEA.png" /></figure><h4>New Tooltip Feature</h4><p>You can use Bokeh’s new tooltip feature to add custom tooltips to a wide range of UI elements, such as plots or widgets. See <a href="https://docs.bokeh.org/en/latest/docs/user_guide/interaction/tooltips.html">“Tooltips” in the Bokeh user guide</a> for details.</p><figure><img alt="Screenshot of a tooltip adding more information to a MultiChoice widget" src="https://cdn-images-1.medium.com/max/607/1*zH9ZYuuve72TmIwTDc-QDw.png" /></figure><h4>More Flexible Datetime Axes</h4><p>Datetime axes now support multi-level <a href="https://github.com/bokeh/bokeh/pull/12197">context formatters</a>. This allows for fine-grained customizations of dates on axes. For instance, additional context such as month or year can be displayed for every tick label, or for only selected tick labels.</p><figure><img alt="Screenshot of two plots with datetime context formatters, one with context only on the first tick, and another with contexts on every tick." src="https://cdn-images-1.medium.com/max/1024/1*Zt1j32JmSLW_MgLaTvagVQ.png" /></figure><p>Context formatters display any user-supplied datetime formats, but Bokeh also provides some built-in context formatters for common cases:</p><pre>p.xaxis.formatter.context = RELATIVE_DATETIME_CONTEXT()</pre><p>Lastly, it is possible to add an arbitrary number of context formatters in case multiple levels of context are required. See <a href="https://docs.bokeh.org/en/latest/docs/user_guide/styling/plots.html#datetime-tick-context">“Datetime tick context” in the Bokeh user guide</a> for examples.</p><h4>Support for Unix-Sockets</h4><p>The Bokeh server now has the option to use Unix-sockets instead of websockets . This can be useful when running a Bokeh server behind a proxy. See <a href="https://docs.bokeh.org/en/latest/docs/user_guide/server/deploy.html#unix-sockets-with-proxies">“Unix sockets with proxies” in the Bokeh user guide for more information</a>.</p><h4>New Block Glyph</h4><p>Bokeh 3.0 introduces the new block glyph. This new glyph can be useful for building <a href="https://docs.bokeh.org/en/latest/docs/examples/topics/hierarchical/treemap.html">treemaps</a>, for example. See <a href="https://docs.bokeh.org/en/latest/docs/user_guide/topics/hierarchical.html#treemaps">“Treemaps” in the Bokeh user guide for details</a>.</p><figure><img alt="Screenshot of a treemap built with Bokeh" src="https://cdn-images-1.medium.com/max/1024/0*tQ-YcVAYuhbPPUua" /></figure><h4>Better Information in IDEs</h4><p>All built-in Bokeh models now have valid init signatures which makes it easier for most modern IDEs to dynamically display parameters and their default values while developing with Bokeh.</p><figure><img alt="Screenshot of improved help for Bokeh options in IDEs." src="https://cdn-images-1.medium.com/max/1024/1*vtW5eQj21bpI_NXKniWqoA.png" /></figure><h3>Updating to Bokeh 3.0</h3><p>Bokeh 3.0 will be available through all regular channels shortly after release. In most cases, you can run either conda install bokeh or pip install bokeh to install Bokeh 3.0.</p><p>(If you want to make sure you immediately get the most recent available version of Bokeh using conda, you can install from the <a href="https://anaconda.org/bokeh/bokeh">Bokeh channel</a> at anaconda.org directly, using conda install -c bokeh bokeh.)</p><p>For more information about installing Bokeh, see the <a href="https://docs.bokeh.org/en/latest/docs/first_steps/installation.html">“Installation details” in the Bokeh user guide</a>.</p><p>With Bokeh 3.0, the <a href="https://docs.bokeh.org/en/latest/docs/dev_guide/python.html#source-code-organization">folder structure</a> of the Bokeh repository has changed fundamentally. In case you are using a local development environment for contributing to Bokeh or if you are building Bokeh locally, please review the updated <a href="https://docs.bokeh.org/en/latest/docs/dev_guide.html">contributor guide</a> or completely remove and reinstall your local version of Bokeh.</p><h3>Next Steps</h3><p>If you have questions, we encourage you to stop by the <a href="https://discourse.bokeh.org/">Bokeh Discourse</a>! Friendly project maintainers and a community of Bokeh users are there to help you navigate any issues that arise.</p><p>Developers interested in getting involved can visit the <a href="https://docs.bokeh.org/en/latest/docs/dev_guide.html">Contributor Guide</a> for guidance on best practices and technical considerations.</p><p>As always, we appreciate the thoughtful feedback from users and especially the work of our contributor community to make Bokeh better!</p><figure><img alt="Colorful Bokeh pinwheel logo" src="https://cdn-images-1.medium.com/max/200/1*2GldLYr6z9zSY8k8-6a3Yg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=914b8f67d0b" width="1" height="1" alt=""><hr><p><a href="https://blog.bokeh.org/introducing-bokeh-3-0-914b8f67d0b">Introducing Bokeh 3.0</a> was originally published in <a href="https://blog.bokeh.org/">bokeh</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>