Prerequisites

pip install bqplot


In [126]:
import numpy as np
from bqplot import pyplot as plt

# And creating some random data
size = 100
np.random.seed(0)
x_data = np.arange(size)
y_data = np.cumsum(np.random.randn(size)  * 100.0)

In [127]:
plt.figure(title='My First Plot')
plt.plot(x_data, y_data)
plt.show()

Using bqplot's interactive elements


In [128]:
# Creating a new Figure and setting it's title
plt.figure(title='My Second Chart')

In [129]:
# Let's assign the scatter plot to a variable
scatter_plot = plt.scatter(x_data, y_data)
scatter_plot.y = np.cumsum(np.random.randn(size)  * 100.0)

Change color of plots


In [ ]:
# Say, the color
scatter_plot.colors = ['Red']

In [ ]:
scatter_plot.colors = ['yellow']

In [ ]: