Interactive Data Visualization in the browser, from Python

Bokeh logotype

Bokeh is an interactive visualization library for modern web browsers. It provides elegant, concise construction of versatile graphics, and affords high-performance interactivity over large or streaming datasets. Bokeh can help anyone who would like to quickly and easily make interactive plots, dashboards, and data applications.

Latest Release Latest release version npm version Conda Conda downloads per month
License Bokeh license (BSD 3-clause) PyPI PyPI downloads per month
Sponsorship Powered by NumFOCUS Live Tutorial Live Bokeh tutorial notebooks on MyBinder
Build Status Current github actions build status Support Community Support on discourse.bokeh.org
Static Analysis Language grade: Python Language grade: JavaScript Twitter Follow Bokeh on Twitter

If you like Bokeh and would like to support our mission, please consider making a donation.

colormapped image plot thumbnail anscombe plot thumbnail stocks plot thumbnail lorenz attractor plot thumbnail candlestick plot thumbnail scatter plot thumbnail SPLOM plot thumbnail
iris dataset plot thumbnail histogram plot thumbnail periodic table plot thumbnail choropleth plot thumbnail burtin antibiotic data plot thumbnail streamline plot thumbnail RGBA image plot thumbnail
stacked bars plot thumbnail quiver plot thumbnail elements data plot thumbnail boxplot thumbnail categorical plot thumbnail unemployment data plot thumbnail Les Mis co-occurrence plot thumbnail

Installation

The easiest way to install Bokeh is using the Anaconda Python distribution and its included Conda package management system. To install Bokeh and its required dependencies, enter the following command at a Bash or Windows command prompt:

conda install bokeh

To install using pip, enter the following command at a Bash or Windows command prompt:

pip install bokeh

For more information, refer to the installation documentation.

Resources

Once Bokeh is installed, check out the first steps guides.

Visit the full documentation site to view the User's Guide or launch the Bokeh tutorial to learn about Bokeh in live Jupyter Notebooks.

Community support is available on the Project Discourse.

If you would like to contribute to Bokeh, please review the Developer Guide and request an invitation to the Bokeh Dev Slack workspace.

Note: Everyone interacting in the Bokeh project's codebases, issue trackers and discussion forums is expected to follow the Code of Conduct.

Follow us

Follow us on Twitter @bokeh

Sponsors

Fiscal Sponsors

The Bokeh project is grateful for individual contributions as well as sponsorship by the organizations and companies below:

NumFocus Logo Blackstone Logo
Anaconda Logo NVidia Logo Rapids Logo
Quansight Logo Rex Logo Nom Nom Data Logo

If your company uses Bokeh and is able to sponsor the project, please contact [email protected]

Bokeh is a Sponsored Project of NumFOCUS, a 501(c)(3) nonprofit charity in the United States. NumFOCUS provides Bokeh with fiscal, legal, and administrative support to help ensure the health and sustainability of the project. Visit numfocus.org for more information.

Donations to Bokeh are managed by NumFOCUS. For donors in the United States, your gift is tax-deductible to the extent provided by law. As with any donation, you should consult with your tax adviser about your particular tax situation.

In-kind Sponsors

The Bokeh project is also grateful for the donation of services from the following companies:

Security

To report a security vulnerability, please use the Tidelift security contact. Tidelift will coordinate the fix and disclosure.

Owner
Bokeh
Interactive Data Visualization
Bokeh
Comments
  • Improve the layout subsystem

    Improve the layout subsystem

    addresses #8084

    fixes #4407 (new feature) fixes #4643 (irrelevant) fixes #5169 (fixed, needs a test) fixes #5572 (fixed) fixes #6294 (fixed) fixes #6417 (fixed, needs a test) fixes #6768 (fixed, needs a test) fixes #7120 (fixed, needs a test) fixes #7185 (irrelevant) fixes #7497 (fixed) fixes #7590 (fixed) [already closed?] fixes #7771 (fixed) fixes #8227 (fixed) fixes #8229 (new feature, needs tests, examples) fixes #6822 (fixed) fixes #4395 (fixed)

    fixes #8391 (fixed, needs test) fixes #7260 (fixed) fixes #7454 (fixed, needs test) fixes #5749 (fixed) fixes #6259 (fixed) fixes #4608 (fixed) fixes #8611 (fixed)

  • Bokeh / JupyterLab integration

    Bokeh / JupyterLab integration

    Updated high level design principles:

    • [ ] mime bundle for loading BokehJS

      The output_notebook() function generates a mime bundle looks like

      {'application/javascript': js, 
        'application/vnd.bokeh.bootstrap_bokehjs': ''}
      

      In the classic notebook, it ignores the bokeh mimetype and runs the JS. In JLab, the Bokeh mimetype has a higher precedence, so it ignores the JS mimetype.

      • For the classic notebook the JS will load the Bokeh mini-extension to register for the show mime type. Additionally BokehJS will be loaded from CDN or for inline resources, from the JS in the bundle itself.

      • For JLab the Bokeh mini-extension will be previously installed via usual JLab mechanisms. The extension will load BokehJS from CDN or for inline resources, from the locally installed Bokeh package. (via a REST endpoint??)

    • [ ] mime bundle for showing standalone docs and applications

      The show(...) function generates a mime bundle that looks like

      'application/vnd.bokeh.show`: JSON
      

      Where JSON is the serialized Bokeh Document and any additional metadata (versions, comm ids etc)

  • Generalized event system

    Generalized event system

    This PR is one I have been working on with @bryevdv on my fork (https://github.com/jlstevens/bokeh/pull/4) that aims to fix issue #5278 and will possibly help address issue #3393. This PR supersedes #5276.

    Aim

    The goal is to allow users to specify Python and Javascript callbacks associated with events. Some suggestions for potential events include UIEvents (including hammer events such as 'tap', 'press', keypress events), model related events such as button click events as well as document level events such as 'busy'. Other proposals for events may be found on this wiki page.

    As there are many potential event types, the goal is to introduce a very general mechanism that abstracts over all these potential event types (hammer, DOM, model related, document). This would be a very useful feature to have for building bokeh apps as well as for third party libraries used to build interactive Bokeh visualizations such as HoloViews.

    Architecture outline

    The API is very similar to the existing on_change and js_on_change API used to register callbacks triggered by property changes.

    Events callbacks are defined on Model and stored on the JS side as a property js_event_callbacks and on the Python side in the _event_callbacks attribute of theEventCallbackManager mixin class (which is analogous to the PropertyCallbackManager class - formerly known as CallbackManager).

    An EventManager instance exists per document in both on Python and Javascript - its job is to route events from wherever they are generated to the appropriate models that can process them. Model instances are responsible for actually invoking the registered callbacks in response to an event, triggered on the event manager. The EventManager also handles the communication of events from Javascript to Python as necessary.

    To achieve this, Model has a subscribed_events property which specifies which events are being listened to on the Python side. These are the events that are to be communicated to Python so that Python callbacks can respond accordingly. Both Javascript and Python callbacks receive an event instance (e.g Tap) which contains information such as the position of the tap. In terms of the communication protocol, there is a single new Event message that is converted into corresponding event instances once received.

    Current status

    You can now use on_event and js_on_event with the currently defined set of events to execute either Javascript or Python callbacks. You can see the API in action in the fourier_animated.py example I am currently using for testing. I intend to write a new example app from scratch and include it in this PR later.

    Open questions

    The main architectural issue right now is that I need a way to supply event instances with a particular model id in order to target a particular model. For instance, events from a given UIEvents instance only apply to a particular Plot instance. What is the best way to get the appropriate model id - at the point where the events are generated? For more information about the problem, see https://github.com/jlstevens/bokeh/pull/4.

    TODO

    I have already listed various TODO items at https://github.com/jlstevens/bokeh/pull/4 and here are the most important outstanding items:

    • [x] Write an example of a Button widget click event.
    • [x] Make sure all classes have decent docstrings
    • [x] Illustrate custom events by building a custom model.
    • [x] Testing

    Edit: to avoid having to refer back to the PR on my fork, here are the other TODO items I assigned myself:

    • [x] Rename js_callbacks to js_property_callbacks
    • [x] Add more event types and check they have useful contents
    • [x] Make a new bokeh app example specifically for illustrating events (edit: superseded for now with two demos in examples/howto ).
    • [x] Type annotations for typescript

    Possible Future work

    Currently events originating in JS can be communicated to Python but events originating in Python cannot currently be communicated to JS. An earlier prototype demonstrated that this feature is possible with the proposed architecture but this feature involves some tricky issues connecting up the communication protocol that are outside the scope of this PR.

    In addition, it is trivial to add a Javascript API to the current system. This was successfully prototyped but is omitted here as there was no obvious naming scheme for the JS methods.

  • Bokeh occasionally not working with Jupyter Notebook

    Bokeh occasionally not working with Jupyter Notebook

    I'm not sure what's going on. I get this error occasionally and I may have gotten a reproducible example but I haven't confirmed just yet.

    There are no errors in the python side. Instead of a plot I see <bokeh.io._CommsHandle at 0x109b1ec18> as the output. The javascript console shows:

    Kernel: kernel_restarting (b738e19a-021b-47ef-9d08-076f696147c8)
    main.min.js:22329 Kernel: kernel_created (b738e19a-021b-47ef-9d08-076f696147c8)
    main.min.js:22673 Starting WebSockets: ws://localhost:8888/api/kernels/b738e19a-021b-47ef-9d08-076f696147c8
    main.min.js:22329 Kernel: kernel_connected (b738e19a-021b-47ef-9d08-076f696147c8)
    main.min.js:22329 Kernel: kernel_ready (b738e19a-021b-47ef-9d08-076f696147c8)
    (program):67 Bokeh: BokehJS loaded, going straight to plotting
    cdn.pydata.org/bokeh/release/bokeh-0.11.0.min.js:3 Bokeh: setting log level to: 'info'
    (program):53 Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-0.11.0.min.css
    (program):55 Bokeh: injecting CSS: https://cdn.pydata.org/bokeh/release/bokeh-widgets-0.11.0.min.css
    (program):72 Bokeh: BokehJS loaded, going straight to plotting
    
    Could not open comm  --  Error: Class 1854dd25-3916-46bd-aab3-1729f21a403a not found in registry
    main.min.js:23119 Couldn't process kernel message WrappedError(anonymous function) @ main.min.js:23119
    
    Couldn't process kernel message WrappedError(anonymous function) @ main.min.js:23119
    
  • Another attempt to make layout more reliable

    Another attempt to make layout more reliable

    • [x] implement per-root layout solver
    • [ ] make layout reinitializable

    fixes #5967 ? #5518 ? #4810 fixes #4449

    ? #1650 -- not fixed because constraints are still bound to models, and there are other issues to resolve (e.g. we shouldn't touch plot.renderers).

  • JS/TS charts API

    JS/TS charts API

    This is really preliminary stuff.

    • [x] pie chart
    • [x] bar chart
    • [ ] line chart
    • [x] hover centered on slices, not glyph
    • [x] hover glyph sometimes doesn't deactivate (tooltip hides properly)
    • [ ] hover can affect only certain properties (e.g. can't change AnnularWedge's radius) (#2367)
    • [x] tooltip attachment in the vertical dimension
    • [x] Quad supports categorical axes
    • [x] allow to anchor tooltip to Quad glyph's sides

    Those are related:

    • [ ] fix range_padding when constructing plots in JS
    • [ ] DataRange1d should consider only visible part of AnnularWedge
    • [ ] AnnularWedge.bounds() always returns [0, 0, 0, 0]

    fixes #4311

  • Add drawing tools

    Add drawing tools

    This PR adds a range of draw tools, which allow adding and editing points, multi-lines, boxes and polygons, addressing https://github.com/bokeh/bokeh/issues/6370. For a demo of each of the tools go here (currently these use HoloViews but I'm working on pure bokeh examples now): https://anaconda.org/philippjfr/drawing_tools/notebook

    BoxDrawTool

    Allows drawing a rectangular bounding box, which will persist.

    PointDrawTool

    Allows adding points, dragging points and deleting points:

    • Add: Click anywhere on the plot
    • Drag: Click on the point and drag it
    • Delete: Tap on point (or use box_select tool) and hit delete

    PolyDrawTool

    The tool handles drawing multiple polygons/multi-lines. Holding shift will allow editing the previously drawn polygon. Without holding shift a new polygon is added.

    • Add polygon/multi-line: Drag from one point to another
    • Add vertex to polygon: Hold shift then click and drag to new vertex position
    • Delete: Tap on polygon/multi-line and hit delete

    PolyEditTool

    The vertex editing tools allow double clicking on a polygon/polyline and edit its vertices.

    • Double Tap: Selects a polygon/polyline for vertex editing
    • Drag: Clicking and dragging a vertex adjusts the polygon/polyline
    • Delete: Tap on a vertex and press delete

    API

    The API generally is very simple, pass the renderers to be edited to each of the tools. The VertexEditTool also requires a separate vertex_renderer to draw the vertices.

    ToDo

    • [x] Agree on naming
    • [x] Refactor a bit to reduce code duplication
    • [x] Add docstrings
    • [x] Add documentation and examples
    • [x] Resolve remaining TypeScript issues
    • [x] tests added / passed
    • [x] release document entry (if new feature or API change)
  • Implementation of TypeScript API

    Implementation of TypeScript API

    • [x] add support for getters/setters (Object.defineProperty)
    • [x] fix all clashes between unrelated this.prop and this.get("prop")
    • [x] implement CoffeeScript/TypeScript mid-level API (bokeh.plotting)
      • [x] finalize edge cases
      • [x] add support for legends
      • [x] add support for tools
      • [ ] ~~add remaining API functions (io, hold, etc.)~~
    • [x] TypeScript typings for low- and mid-level APIs
      • [x] add support for included properties (mixins with prefix)
      • [ ] make attrs in new Model(attrs) type-safe without too much code duplication
      • [ ] figure out how to remove string from Color union type
    • [x] make gulp test work again
      • [x] fix unit tests
      • [ ] ~~add support for on-the-fly typescript compilation~~
    • [x] add examples:
      • [x] low-level (bokehjs/examples/anscombe)
      • [x] mid-level (bokehjs/examples/burtin)

    Note: to compile everything (scripts, typings and examples), issue gulp examples.

  • Base64 serialization

    Base64 serialization

    Reopened PR #5504 as bokeh/bokeh branch to allow running image diffs. This PR implements some of the suggestions in https://github.com/bokeh/bokeh/issues/2204. In further discussion and initial testing (see https://github.com/bokeh/bokeh/pull/5429) we found that simple base64 encoding offers huge performance gains compared to the current implementation. A more complex binary json format is therefore not necessary at this time.

    Motivation

    Currently sending large arrays to the browser can take a very long time, particularly when sending relatively large images. This is because all data is sent as raw strings, which is highly inefficient both in terms of size of the data that has to be sent to the frontend and in terms of processing because both backend and frontend iterate over the arrays to validate them. For a simple 2x2 image column data source the JSON representation would previously have looked like this:

    {'image': [[[0.19593542932534513, 0.8104239473495675], [0.3907588555073921, 0.15267810064366616]]]}
    

    the new JSON representation looks as follows:

    {'image': [{'data': 'yKTPhb3b2j/Qy4BxlXzvP1bfkgIid9Q/kz0MlC4F4T8=', shape: [2,2], dtype: 'float64'}]}
    

    In the case of a 2000x2000 image it took up to 30 seconds to serialize and send the image. Through initial investigation we found that simple base64 encoding of arrays can result in huge performance gains for sending array data via web sockets. Overall this has the potential to bring 10-50x improvements in sending large arrays via the comms in the notebook and will also offer some more limited improvements for bokeh server.

    Design

    1. The encoding should happen as a last step during serialization on the Python end and as the first step after deserialization on the JS end, ensuring no other code has to deal with base64 encoded data avoiding any backward compatibility issues.
    2. The data should be wrapped in a simple JS object along ith the shape and type information. A dedicated model might be considered in future but is not necessary.
    3. The column data source on the fronted will unpack and store the shape information on the _shapes attribute.
    4. The encoding behavior should be configurable, e.g. do not encode unless the array is larger than a configurable size.
    5. All numeric column data source data should potentially be encoded, i.e. both 1-D and 2-D arrays.

    Caveats

    Currently this PR will correctly encode and decode any numerical types except for numpy int64 arrays. Since there is no native 64-bit integer type in Javascript (internally ints are handled as double precision floats where the maximum safe integer is 2**53), we cannot directly encode and decode 64-bit integer data. Using the npm int64-buffer package I managed to decode an int64 ArrayBuffer but the advantages and disadvantages of various approaches should be evaluated in a subsequent PR:

    view = new Int32Array(bytes)
    array = []
    for i in [0...view.length/2]
      int = new Int64LE(view.buffer.slice(i*8,(i+1)*8))
      array.push(int)
    

    To-Do

    • [x] Add configurable options BOKEH_USE_BINARY_ARRAYS and BOKEH_BINARY_ARRAY_CUTOFF and document them
    • [x] Add server and client side decoding and encoding
    • [x] Handle patch events
    • [x] Handle stream events
    • [ ] Ensure current tests pass and add extensive tests
    • [ ] Add release document entry (if new feature or API change)
  • Windows install fails 0.12.12

    Windows install fails 0.12.12

    I'm getting an error installing bokeh 0.12.12. Previous versions install okay on my PC. I did a fresh install of Python 3.6.3 and deleted the pip cache directory first.

    Windows 10 32-bit Python 3.6.3 32-bit

    Running pip install yields:

    > pip install bokeh==0.12.12
    Collecting bokeh==0.12.12
      Using cached bokeh-0.12.12.tar.gz
    Exception:
    Traceback (most recent call last):
      File "k:\users\ed\appdata\local\programs\python\python36-32\lib\tarfile.py", line 2268, in utime
        os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime))
    OSError: [WinError 87] The parameter is incorrect
    
    During handling of the above exception, another exception occurred:
    
    Traceback (most recent call last):
      File "k:\users\ed\appdata\local\programs\python\python36-32\lib\site-packages\pip\basecommand.py", line 215, in main
        status = self.run(options, args)
      File "k:\users\ed\appdata\local\programs\python\python36-32\lib\site-packages\pip\commands\install.py", line 324, in run
        requirement_set.prepare_files(finder)
      File "k:\users\ed\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 380, in prepare_files
        ignore_dependencies=self.ignore_dependencies))
      File "k:\users\ed\appdata\local\programs\python\python36-32\lib\site-packages\pip\req\req_set.py", line 620, in _prepare_file
        session=self.session, hashes=hashes)
      File "k:\users\ed\appdata\local\programs\python\python36-32\lib\site-packages\pip\download.py", line 821, in unpack_url
        hashes=hashes
      File "k:\users\ed\appdata\local\programs\python\python36-32\lib\site-packages\pip\download.py", line 663, in unpack_http_url
        unpack_file(from_path, location, content_type, link)
      File "k:\users\ed\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py", line 605, in unpack_file
        untar_file(filename, location)
      File "k:\users\ed\appdata\local\programs\python\python36-32\lib\site-packages\pip\utils\__init__.py", line 581, in untar_file
        tar.utime(member, path)
      File "k:\users\ed\appdata\local\programs\python\python36-32\lib\tarfile.py", line 2270, in utime
        raise ExtractError("could not change modification time")
    tarfile.ExtractError: could not change modification time
    
  • Evaluate Bokeh Server on windows

    Evaluate Bokeh Server on windows

    Some initial partial observations on Windows 7 with 0.11.0dev3 with python 2.7.11:

    • sliders.py works
    • fourier example does not animate
    • stocks example does not update
  • [BUG] bokeh.plotting.graph.from_networkx fails on graphs having nodes with string index values

    [BUG] bokeh.plotting.graph.from_networkx fails on graphs having nodes with string index values

    Software versions

    Python version : 3.10.8 (tags/v3.10.8:aaaf517, Oct 11 2022, 16:50:30) [MSC v.1933 64 bit (AMD64)] IPython version : (not installed) Tornado version : 6.2 Bokeh version : 3.0.2 BokehJS static path : c:\dev\bokeh_test\venv\lib\site-packages\bokeh\server\static node.js version : (not installed) npm version : (not installed) Operating system : Windows-10-10.0.22621-SP0

    Browser name and version

    No response

    Jupyter notebook / Jupyter Lab version

    No response

    Expected behavior

    generate a graph_renderer without crashing :-)

    Observed behavior

    The error comes from StaticLayoutProvider (in bokeh\models\graph.py)

    Comparing the 2.4.3 to the 3.0.2 implementations (see below), one can clearly see that the support of string valued indexes has been removed. Is this change intentional or is it a regression the code base?

    BTW Monkey patching this by creating a version that replaces graph_layout = Dict(Int, Seq(Any)... with graph_layout = Dict(Either(String, Int), Seq(Any) makes the from_networkx function work. I have not used it in any other context other then investigating this issue so there may be undesired effects of this change.

    2.4.3:

    class StaticLayoutProvider(LayoutProvider):
        '''
        '''
    
        graph_layout = Dict(Either(String, Int), Seq(Any), default={}, help="""
        The coordinates of the graph nodes in cartesian space. The dictionary
        keys correspond to a node index and the values are a two element sequence
        containing the x and y coordinates of the node.
        .. code-block:: python
            {
                0 : [0.5, 0.5],
                1 : [1.0, 0.86],
                2 : [0.86, 1],
            }
        """)
    

    3.0.2:

    class StaticLayoutProvider(LayoutProvider):
        '''
    
        '''
    
        # explicit __init__ to support Init signatures
        def __init__(self, *args, **kwargs) -> None:
            super().__init__(*args, **kwargs)
    
        # TODO: Seq(Any).length == 2
        graph_layout = Dict(Int, Seq(Any), default={}, help="""
        The coordinates of the graph nodes in cartesian space. The dictionary
        keys correspond to a node index and the values are a two element sequence
        containing the x and y coordinates of the node.
    
        .. code-block:: python
    
            {
                0 : [0.5, 0.5],
                1 : [1.0, 0.86],
                2 : [0.86, 1],
            }
        """)
    

    Example code

    # pip install bokeh==3.0.2
    # pip install networkx==2.8.8
    
    import networkx as nx
    from bokeh.plotting import from_networkx
    
    graph = nx.Graph()
    
    graph.add_edge("a", "b")
    
    layout_function = nx.spring_layout
    
    graph_renderer = from_networkx(graph, layout_function, center=(0,0), scale=1)
    

    Stack traceback or browser console output

    Traceback (most recent call last):
      File "C:\dev\bokeh_test\bokeh_test.py", line 13, in <module>
        graph_renderer = from_networkx(graph, layout_function, center=(0,0), scale=1)
      File "C:\dev\bokeh_test\venv\lib\site-packages\bokeh\plotting\graph.py", line 125, in from_networkx
        graph_renderer.layout_provider = StaticLayoutProvider(graph_layout=graph_layout)
      File "C:\dev\bokeh_test\venv\lib\site-packages\bokeh\models\graphs.py", line 83, in __init__
        super().__init__(*args, **kwargs)
      File "C:\dev\bokeh_test\venv\lib\site-packages\bokeh\models\graphs.py", line 66, in __init__
        super().__init__(*args, **kwargs)
      File "C:\dev\bokeh_test\venv\lib\site-packages\bokeh\model\model.py", line 115, in __init__
        super().__init__(**kwargs)
      File "C:\dev\bokeh_test\venv\lib\site-packages\bokeh\core\has_props.py", line 298, in __init__
        setattr(self, name, value)
      File "C:\dev\bokeh_test\venv\lib\site-packages\bokeh\core\has_props.py", line 327, in __setattr__
        return super().__setattr__(name, value)
      File "C:\dev\bokeh_test\venv\lib\site-packages\bokeh\core\property\descriptors.py", line 289, in __set__
        value = self.property.prepare_value(obj, self.name, value)
      File "C:\dev\bokeh_test\venv\lib\site-packages\bokeh\core\property\bases.py", line 365, in prepare_value
        raise ValueError(f"failed to validate {obj_repr}.{name}: {error}")
    ValueError: failed to validate StaticLayoutProvider(id='p1032', ...).graph_layout: expected an element of Dict(Int, Seq(Any)), got {'a': array([-1.        ,  0.48174052]), 'b': array([ 1.        , -0.48174052])}
    

    Screenshots

    No response

  • [BUG] First steps 2 doc figures have low contrast

    [BUG] First steps 2 doc figures have low contrast

    Software versions

    n/a

    Browser name and version

    No response

    Jupyter notebook / Jupyter Lab version

    No response

    Expected behavior

    The figure at https://docs.bokeh.org/en/latest/docs/first_steps/first_steps_2.html#rendering-circles to have high contrast between the figure background and markers.

    Observed behavior

    Instead the yellow markers on white background are very low contrast and hard to see: Screenshot 2022-11-23 at 20 18 39

    Example code

    n/a
    

    Stack traceback or browser console output

    No response

    Screenshots

    No response

  • Make Slider and Image available in BokehJS (JS only)

    Make Slider and Image available in BokehJS (JS only)

    Hi, As discussed with Bryan in https://discourse.bokeh.org/t/bokehjs-how-to-create-a-slider/9759/3, it would be interesting to have Slider and Image available directly in BokehJS.

    The documentations states that nearly all Python models are available similarly in JS with new Bokeh.<model>. It seems that new Bokeh.Slider(...) and new Bokeh.Image(...) (I'm looking for color mapped images) are currently not available in JS-only BokehJS. Do you think it would be straightforward to add it? I can do the beta-testing and reporting.

    Thanks

    PS: I used this issue template because the other ones were quite complex with many textboxes - this one is more classical.

  • curdoc.clear() doesn't work anymore on 3.x

    curdoc.clear() doesn't work anymore on 3.x

    Software versions

    Python version : 3.9.10 (v3.9.10:f2f3f53782, Jan 13 2022, 16:55:45) IPython version : (not installed) Tornado version : 6.2 Bokeh version : 2.4.3 BokehJS static path : /Users/johannpayen/Dropbox/Dev Python/Dev Python NextOne/venv/lib/python3.9/site-packages/bokeh/server/static node.js version : (not installed) npm version : (not installed) Operating system : macOS-12.6-arm64-arm-64bit

    Browser name and version

    chrome

    Jupyter notebook / Jupyter Lab version

    No response

    Expected behavior

    curdoc().clear() clear the document in Bokeh 2.x, since 3.x it stopped working.

    There are other issues related : curdoc().title works only once curdoc().add_root() works only once also

    Observed behavior

    nothing seems to happen from the user point of view.

    Example code

    import numpy as np
    
    from bokeh.io import curdoc
    from bokeh.layouts import column, row
    from bokeh.models import ColumnDataSource, Slider, TextInput
    from bokeh.plotting import figure
    
    # Set up data
    N = 200
    x = np.linspace(0, 4*np.pi, N)
    y = np.sin(x)
    source = ColumnDataSource(data=dict(x=x, y=y))
    
    
    # Set up plot
    plot = figure(height=400, width=400, title="my sine wave",
                  tools="crosshair,pan,reset,save,wheel_zoom",
                  x_range=[0, 4*np.pi], y_range=[-2.5, 2.5])
    
    plot.line('x', 'y', source=source, line_width=3, line_alpha=0.6)
    
    
    # Set up widgets
    text = TextInput(title="title", value='my sine wave')
    offset = Slider(title="offset", value=0.0, start=-5.0, end=5.0, step=0.1)
    amplitude = Slider(title="amplitude", value=1.0, start=-5.0, end=5.0, step=0.1)
    phase = Slider(title="phase", value=0.0, start=0.0, end=2*np.pi)
    freq = Slider(title="frequency", value=1.0, start=0.1, end=5.1, step=0.1)
    
    
    # Set up callbacks
    def update_title(attrname, old, new):
        plot.title.text = text.value
        if text.value =="clear":
            curdoc().clear()
    
    text.on_change('value', update_title)
    
    def update_data(attrname, old, new):
    
        # Get the current slider values
        a = amplitude.value
        b = offset.value
        w = phase.value
        k = freq.value
    
        # Generate the new curve
        x = np.linspace(0, 4*np.pi, N)
        y = a*np.sin(k*x + w) + b
    
        source.data = dict(x=x, y=y)
    
    for w in [offset, amplitude, phase, freq]:
        w.on_change('value', update_data)
    
    
    # Set up layouts and add to document
    inputs = column(text, offset, amplitude, phase, freq)
    
    curdoc().add_root(row(inputs, plot, width=800))
    curdoc().title = "Sliders"
    

    Stack traceback or browser console output

    No response

    Screenshots

    No response

Interactive Data Visualization in the browser, from Python
Interactive Data Visualization in the browser, from  Python

Bokeh is an interactive visualization library for modern web browsers. It provides elegant, concise construction of versatile graphics, and affords hi

Feb 18, 2021
This is a super simple visualization toolbox (script) for transformer attention visualization ✌
This is a super simple visualization toolbox (script) for transformer attention visualization ✌

Trans_attention_vis This is a super simple visualization toolbox (script) for transformer attention visualization ✌ 1. How to prepare your attention m

Jul 9, 2022
SummVis is an interactive visualization tool for text summarization.
SummVis is an interactive visualization tool for text summarization.

SummVis is an interactive visualization tool for analyzing abstractive summarization model outputs and datasets.

Nov 24, 2022
Learning Convolutional Neural Networks with Interactive Visualization.
Learning Convolutional Neural Networks with Interactive Visualization.

CNN Explainer An interactive visualization system designed to help non-experts learn about Convolutional Neural Networks (CNNs) For more information,

Nov 27, 2022
A dashboard built using Plotly-Dash for interactive visualization of Dex-connected individuals across the country.
A dashboard built using Plotly-Dash for interactive visualization of Dex-connected individuals across the country.

Dashboard For The DexConnect Platform of Dexterity Global Working prototype submission for internship at Dexterity Global Group. Dashboard for real ti

Jun 15, 2021
GUI for visualization and interactive editing of SMPL-family body models ie. SMPL, SMPL-X, MANO, FLAME.

Body Model Visualizer Introduction This is a simple Open3D-based GUI for SMPL-family body models. This GUI lets you play with the shape, expression, a

Nov 13, 2022
Apache Superset is a Data Visualization and Data Exploration Platform
Apache Superset is a Data Visualization and Data Exploration Platform

Superset A modern, enterprise-ready business intelligence web application. Why Superset? | Supported Databases | Installation and Configuration | Rele

Dec 5, 2022
Apache Superset is a Data Visualization and Data Exploration Platform
Apache Superset is a Data Visualization and Data Exploration Platform

Apache Superset is a Data Visualization and Data Exploration Platform

Dec 1, 2022
Automatic data visualization in atom with the nteract data-explorer
Automatic data visualization in atom with the nteract data-explorer

Data Explorer Interactively explore your data directly in atom with hydrogen! The nteract data-explorer provides automatic data visualization, so you

Dec 1, 2022
Data-FX is an addon for Blender (2.9) that allows for the visualization of data with different charts
Data-FX is an addon for Blender (2.9) that allows for the visualization of data with different charts

Data-FX Data-FX is an addon for Blender (2.9) that allows for the visualization of data with different charts Currently, there are only 2 chart option

Nov 21, 2022
Show Data: Show your dataset in web browser!
 Show Data: Show your dataset in web browser!

Show Data is to generate html tables for large scale image dataset, especially for the dataset in remote server. It provides some useful commond line tools and fully customizeble API reference to generate html table different tasks.

Nov 26, 2022
Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax.
Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax.

PyDexter Simple plotting for Python. Python wrapper for D3xter - render charts in the browser with simple Python syntax. Setup $ pip install PyDexter

Mar 6, 2021
Debugging, monitoring and visualization for Python Machine Learning and Data Science
Debugging, monitoring and visualization for Python Machine Learning and Data Science

Welcome to TensorWatch TensorWatch is a debugging and visualization tool designed for data science, deep learning and reinforcement learning from Micr

Dec 5, 2022
Missing data visualization module for Python.
Missing data visualization module for Python.

missingno Messy datasets? Missing values? missingno provides a small toolset of flexible and easy-to-use missing data visualizations and utilities tha

Nov 26, 2022
Missing data visualization module for Python.
Missing data visualization module for Python.

missingno Messy datasets? Missing values? missingno provides a small toolset of flexible and easy-to-use missing data visualizations and utilities tha

Feb 18, 2021
High-level geospatial data visualization library for Python.
High-level geospatial data visualization library for Python.

geoplot: geospatial data visualization geoplot is a high-level Python geospatial plotting library. It's an extension to cartopy and matplotlib which m

Nov 30, 2022
Rick and Morty Data Visualization with python
Rick and Morty Data Visualization with python

Rick and Morty Data Visualization For this project I looked at data for the TV show Rick and Morty Number of Episodes at a Certain Location Here is th

Aug 29, 2022
Example Code Notebooks for Data Visualization in Python
Example Code Notebooks for Data Visualization in Python

This repository contains sample code scripts for creating awesome data visualizations from scratch using different python libraries (such as matplotli

Nov 22, 2022
Resources for teaching & learning practical data visualization with python.
Resources for teaching & learning practical data visualization with python.

Practical Data Visualization with Python Overview All views expressed on this site are my own and do not represent the opinions of any entity with whi

Sep 24, 2022