[Chennaipy] Chennaipy - Monday Module - 12 Sep 2022

selvi dct selvi.dct at gmail.com
Mon Sep 12 13:41:39 EDT 2022


Date: 12 Sep 2022


Module : bokeh


Installation : pip install bokeh


About:

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.


Source Code:

        import numpy as np


        from bokeh.plotting import figure, show


        N = 500

        x = np.linspace(0, 10, N)

        y = np.linspace(0, 10, N)

        xx, yy = np.meshgrid(x, y)

        d = np.sin(xx)*np.cos(yy)


        p = figure(tooltips=[("x", "$x"), ("y", "$y"), ("value", "@image")])

        p.x_range.range_padding = p.y_range.range_padding = 0


        # must give a vector of image data for image parameter

        p.image(image=[d], x=0, y=0, dw=10, dh=10, palette="Spectral11",
level="image")

        p.grid.grid_line_width = 0.5


        show(p)



Reference:

https://pypi.org/project/bokeh/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/chennaipy/attachments/20220912/385f5bdb/attachment.html>


More information about the Chennaipy mailing list