Creating plots using NumPy arrays
NumPy arrays are one of the most fundamental data structures found in Python and as such are an important data structure when it comes to creating interactive visualizations in Bokeh. In this section, we will cover how you can build line and scatter plots using NumPy arrays.
Creating line plots using NumPy arrays
In order to create a simple line plot using a NumPy array, we can use this code:
#Import required packages
import numpy as np
import random
from bokeh.io import output_file, show
from bokeh.plotting import figure
#Creating an array for the points along the x and y axes
array_x =np.array([1,2,3,4,5,6])
array_y = np.array([5,6,7,8,9,10])
#Creating a line plot
plot = figure()
plot.line(array_x, array_y)
#Output the plot
output_file('numpy_line.html')
show(plot)This renders a plot as illustrated here:

In the previous code, we created two NumPy arrays to hold the points along the x-and y-axes. We then used the regular Bokeh function calls that...