diff --git a/.vscode/settings.json b/.vscode/settings.json index eea4f90..615aafb 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -1,3 +1,3 @@ { - "python.pythonPath": "C:\\Users\\SamPom100\\AppData\\Local\\Programs\\Python\\Python37\\python.exe" + "python.pythonPath": "/usr/bin/python3" } \ No newline at end of file diff --git a/src/__pycache__/GUI.cpython-37.pyc b/src/__pycache__/GUI.cpython-37.pyc index 49c699a..0624c46 100644 Binary files a/src/__pycache__/GUI.cpython-37.pyc and b/src/__pycache__/GUI.cpython-37.pyc differ diff --git a/src/__pycache__/scrolly.cpython-37.pyc b/src/__pycache__/scrolly.cpython-37.pyc index 81f74a0..535b5fb 100644 Binary files a/src/__pycache__/scrolly.cpython-37.pyc and b/src/__pycache__/scrolly.cpython-37.pyc differ diff --git a/src/main.py b/src/main.py index cbe1ab7..f8255e4 100644 --- a/src/main.py +++ b/src/main.py @@ -2,6 +2,7 @@ import yfinance as yf import pandas as pd import matplotlib.pyplot as plt +from matplotlib import cm from PIL import Image from GUI import * from scrolly import * @@ -177,8 +178,10 @@ def threedeegraph(object): # the bars' heights dz = eg.values.ravel() - # plot - ax.bar3d(xpos, ypos, zpos, dx, dy, dz) + # plot and color + values = np.linspace(0.2, 1., xpos.ravel().shape[0]) + colors = cm.rainbow(values) + ax.bar3d(xpos, ypos, zpos, dx, dy, dz, color=colors) # put the column / index labels ax.w_yaxis.set_ticklabels(eg.columns) @@ -188,7 +191,7 @@ def threedeegraph(object): ax.set_xlabel('Strike') ax.set_ylabel('Date') ax.set_zlabel('Open Interest') - fig.colorbar(surf1, ax=ax1, shrink=0.5, aspect=5) + #fig.colorbar(surf1, ax=ax1, shrink=0.5, aspect=5) plt.show()