Button press event - event handling and picking: IndexError: list index out of range

2020-06-07 Thread Caledonian26
I have the following command below. The overall aim is to allow the user to select a Y-value by pressing on the bar graph. The colour of each bar should then change depending on what this Y-value is. import pandas as pd import numpy as np from scipy import stats import matplotlib.pyplot as plt

Re: Applied Data Science with Python - Assignment 2.3: clicking on chart to select Y values

2020-06-06 Thread Caledonian26
On Saturday, June 6, 2020 at 10:29:46 AM UTC+1, Chris Angelico wrote: > On Sat, Jun 6, 2020 at 7:26 PM Caledonian26 wrote: > > *However,* I keep getting the error: IndexError: list index out of range. > > Could anyone give me a helping hand as to where I am going wrong? Am I on

Applied Data Science with Python - Assignment 2.3: clicking on chart to select Y values

2020-06-06 Thread Caledonian26
Hey all, I have the following code below: import pandas as pd import numpy as np from scipy import stats np.random.seed(12345) scores = [np.random.normal(32000,20,3650).mean(), np.random.normal(43000,10,3650).mean(),np.random.normal(43500,14,3650).mean(), np.random.normal(