x = np.arange(10)
y = np.ones(10)
bools = np.random.randint(0, 2, 10).astype(bool)
colors = np.array(bools, str)
colors[bools] = 'g'
colors[~bools] = 'r'
rx = 1
ry = 2
rect = [(-rx, -ry), (rx, -ry), (rx, ry), (-rx, ry)]
plt.figure()
plt.scatter(x, y, facecolor=colors, verts=rect, s=1000)
plt.scatter(x, y+3, facecolor=colors[::-1], verts=rect, s=1000)
plt.ylim(0, 5)
plt.yticks([1, 4], ['Train', 'Test'])
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
dataset_train = pd.read_csv('EURUSD_M1TechnicalIndicators.txt', usecols=['open', 'close'])
dataset_test = pd.read_csv('Test_EURUSD_M1TechnicalIn