Skip to main content
Chemistry LibreTexts Using bqplot to make interactive plots

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


    • Was this article helpful?