11.2.8.6: Using bqplot to make interactive plots

Construction Guide for LibreTexts 2e · LibreTexts

0%

Contents

    Text

    Size
    100%
    Theme
    Typeface
    Line length
    Spacing

    Read aloud

    How

    Speed: 1×
    Light up
    Highlight

    Symbols: Mulberry Symbols, © 2018–2026 Steve Lee, CC BY-SA 4.0 (licence, the set), the site's own copies.

    From LibreTexts, under CC BY-SA 4.0, as the source states it; its equations are written in TeX, which the PDF shows typeset. This page at LibreTexts.

    11.2.8.6: Using bqplot to make interactive plots

    Libretexts authors can utilize the bqplot Jupyter widget, a 2D plotting library, in their textbooks. This example is repurposed from the bqplot documentation and is licensed under the Apache License 2.0 License.

    import numpy as np
    from bqplot import pyplot as plt
    
    size = 100
    np.random.seed(0)
    x_data = np.arange(size)
    y_data = np.cumsum(np.random.randn(size)  * 100.0)
    
    plt.figure(title='My First Plot')
    plt.plot(x_data, y_data)
    plt.show()

    This page titled 11.2.8.6: Using bqplot to make interactive plots was last modified on Tue, 23 Jul 2024 01:45:30 GMT and is shared under a CC BY-SA 4.0 license and was authored, remixed, and/or curated by LibreTexts.