Creating multiple plots along the same row
In order to create multiple plots along the same row, let's first create three unique plots. We will be working with the S&P
500 stock data
found on Kaggle (https://www.kaggle.com/camnugent/sandp500/data).
The first step is to read the data and filter it so that we only use the data related to Apple as shown here:
#Import the required packages import pandas as pd #Read in the data df = pd.read_csv('all_stocks_5yr.csv') #Convert the date column into datetime data type df['date'] = pd.to_datetime(df['date']) #Filter the data for Apple stocks only df_apple = df[df['Name'] == 'AAL']
Next, let's construct three unique plots using the code as shown here:
#Import the required packages from bokeh.io import output_file, show from bokeh.plotting import figure from bokeh.plotting import ColumnDataSource #Create the ColumnDataSource object data = ColumnDataSource(data = { 'x' : df_apple['high'], 'y' : df_apple['low'], 'x1': df_apple['open...