Skip to main content
Chemistry LibreTexts

5.2.8.6: Using bqplot to make interactive plots

  • Page ID
    346917
  • 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()

     

    • Was this article helpful?