def plot_degree( event, cmbox ): """ Plot the info about the degree selected on combobox """ sel = cmbox.GetStringSelection() title = sel.split(' | ') if sel != '': C_D = Controller_DB() lista = C_D.query_students_degrees() x=[] y=[] for i in lista: if i[0].find(sel.encode('utf-8')) >= 0: x.append(i[1]) y.append(i[2]) C_p = Controller_Plot(title[0],x, y) C_p.plot_data() pass
def plot_major( event, cmbox ): """ Plot the info about the major selected on combobox """ id_major = cmbox.GetCurrentSelection() name = cmbox.GetStringSelection() id_major = id_major + 1 C_D = Controller_DB() lista = C_D.query_students_major_plot(id_major) x=[] y=[] for i in lista: x.append(i[1]) y.append(i[2]) C_p = Controller_Plot(name ,x, y) C_p.plot_data() pass