def bar_chart_analyze(self): """ Построение столбчатой диаграммы ---------- Параметры: - ---------- Возвращает: - ---------- Автор: Литвинов В.С. """ column_name_1_ru = self.cb_kach_col_1.get() column_name_2_ru = self.cb_kach_col_2.get() column_name_1_eng = lp.translate_to_eng(column_name_1_ru) column_name_2_eng = lp.translate_to_eng(column_name_2_ru) var_1 = self.parent.get_values(column_name_1_eng) var_2 = self.parent.get_values(column_name_2_eng) ga.bar_chart(var_1, var_2, column_name_1_ru, column_name_2_ru)
def box_visk_analyze(self): """ Построение диаграммы Бокса-Вискера ---------- Параметры: - ---------- Возвращает: - ---------- Автор: Литвинов В.С. """ column_name_1_ru = self.cb_kach_col.get() column_name_2_ru = self.cb_numeral.get() column_name_1_eng = lp.translate_to_eng(column_name_1_ru) column_name_2_eng = lp.translate_to_eng(column_name_2_ru) var_1 = self.parent.get_values(column_name_1_eng) var_2 = self.parent.get_values(column_name_2_eng) fixed_var_2 = results = [int(i) for i in var_2] ga.box_plot(var_1, fixed_var_2, column_name_1_ru, column_name_2_ru)
def histogram_analyze(self): """ Построение гистограммы ---------- Параметры: - ---------- Возвращает: - ---------- Автор: Литвинов В.С. """ column_name_1_ru = self.cb_kach_col.get() column_name_2_ru = self.cb_numeral.get() column_name_1_eng = lp.translate_to_eng(column_name_1_ru) column_name_2_eng = lp.translate_to_eng(column_name_2_ru) var_1 = self.parent.get_values(column_name_1_eng) var_2 = self.parent.get_values(column_name_2_eng) fixed_var_2 = [int(i) for i in var_2] ga.histogram(var_1, fixed_var_2, column_name_1_ru, column_name_2_ru)
def dispersion_analyze(self): """ Построение диаграммы рассеяния ---------- Параметры: - ---------- Возвращает: - ---------- Автор: Литвинов В.С. """ column_name_1_ru = self.cb_kach_col.get() column_name_2_ru = self.cb_numeral_1.get() column_name_3_ru = self.cb_numeral_2.get() column_name_1_eng = lp.translate_to_eng(column_name_1_ru) column_name_2_eng = lp.translate_to_eng(column_name_2_ru) column_name_3_eng = lp.translate_to_eng(column_name_3_ru) var_1 = self.parent.get_values(column_name_1_eng) var_2 = self.parent.get_values(column_name_2_eng) var_3 = self.parent.get_values(column_name_3_eng) fixed_var_2 = [int(i) for i in var_2] fixed_var_3 = [int(i) for i in var_3] ga.scatter(var_1, fixed_var_2, fixed_var_3, column_name_1_ru, column_name_2_ru, column_name_3_ru)
def init_GUI(self): """ Конструктор интерфейса окна базовой статистики ---------- Параметры: - ---------- Возвращает: - ---------- Автор: Литвинов В.С. """ # Меню mainmenu = tk.Menu(self) filemenu = tk.Menu(mainmenu, tearoff=0) filemenu.add_command(label="Экспорт в excel", command=lambda:self.parent.give_excel(self.dataframe,False)) mainmenu.add_cascade(label="Экспорт", menu=filemenu) self.config(menu=mainmenu) # Фрейм окна base_stats_window = tk.LabelFrame( self, text="Параметры") base_stats_window.pack(fill=tk.BOTH, expand=1, padx=5, pady=5) # Размер, ширина колонок и таблица number_of_columns = len(self.column_names_ru) self.width = lp.good_looking_columns(number_of_columns) self.column_names_eng = [lp.translate_to_eng( self.column_names_ru[x]) for x in range(number_of_columns)] self.tree = ttk.Treeview( base_stats_window, columns=self.column_names_eng, height=20, show="headings") for i in range(len(self.column_names_eng)): self.tree.column(self.column_names_eng[i], width=self.width, anchor=tk.CENTER) self.tree.heading(self.column_names_eng[i], text=self.column_names_ru[i]) tree_scrollbar_vertical = tk.Scrollbar( base_stats_window, orient="vertical", command=self.tree.yview) tree_scrollbar_vertical.pack(side=tk.RIGHT, fill="y") tree_scrollbar_horizontal = tk.Scrollbar( base_stats_window, orient="horizontal", command=self.tree.xview) tree_scrollbar_horizontal.pack(side=tk.BOTTOM, fill="x") self.tree.pack(pady=5) self.clever_insert_values() # Не даёт перейти в другое окно self.grab_set() self.focus_set()