<gh_stars>0
#! /usr/bin/env python
#  -*- coding: utf-8 -*-
#
# GUI module generated by PAGE version 4.20
#  in conjunction with Tcl version 8.6
#    Feb 01, 2019 12:08:48 PM MST  platform: Windows NT

###############################################################################
###############################################################################
#need to add in
import MODOAnalysis
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.backends.backend_tkagg as tkagg
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from tkinter.filedialog import askopenfilename
from tkinter.filedialog import asksaveasfilename
from matplotlib.figure import Figure
import matplotlib.transforms
import itertools
#from pykrige.uk import UniversalKriging
from matplotlib.mlab import griddata
from matplotlib import cm
from scipy import stats
import seaborn as sns
np.random.seed(1234)

import warnings
warnings.filterwarnings("ignore")

#from tkinter import *
###############################################################################
###############################################################################



import sys

try:
    import Tkinter as tk
except ImportError:
    import tkinter as tk

try:
    import ttk
    py3 = False
except ImportError:
    import tkinter.ttk as ttk
    py3 = True

import GUI_support

from tkinter import *

def vp_start_gui():
    '''Starting point when module is the main routine.'''
    global val, w, root
    root = tk.Tk()
#    root.resizable(False, False)
    root.resizable(True, True)
    GUI_support.set_Tk_var()
    top = Toplevel1 (root)
    GUI_support.init(root, top)
    root.mainloop()

w = None
def create_Toplevel1(root, *args, **kwargs):
    '''Starting point when module is imported by another program.'''
    global w, w_win, rt
    rt = root
    w = tk.Toplevel (root)
    GUI_support.set_Tk_var()
    top = Toplevel1 (w)
    GUI_support.init(w, top, *args, **kwargs)
    return (w, top)

def destroy_Toplevel1():
    global w
    w.quit()
    w.destroy()
    sys.exit('ladskflsdg')
    w = None

class Toplevel1:
    def __init__(self, top=None):
        #gotta initialize a bunch of vars so I can check if they exist later
        self.canvas=None
        self.binspin_fig=None
        self.artificial_binspin_fig=None
        self.artificial_rose_ax=None
        self.artifical_bin_canvas=None
        self.ax=None
        self.output_df=None
        self.previewcanvas=None
        self.preview_fig=None
        self.preview_ax=None
        self.min_x=None
        self.min_y=None
        self.max_x=None
        self.max_y=None
        self.min_gx=None
        self.min_gy=None
        self.max_gx=None
        self.max_gy=None
        self.grid_xy=None
        self.dx=None
        self.dx=None
        self.artificial_fig=None
        self.artifical_canvas=None
        self.artificial_ax=None
        
        ################################################
        ################################################
        
        self.mult_cont_fig=None
        self.mult_cont_ax=None
        self.mult_cont_canvas=None
        self.preview_toolbar=None
        self.mult_slide=False
        self.beta_slide=False
        self.mult_toolbar=None
        self.sample=None
        self.contour=None
        
        ################################################
        ################################################
        
        self.mult_point_canvas=None
        self.mult_point_fig=None
        self.mult_point_toolbar=None
        self.mult_point_marker=1
        ################################################
        ################################################
        
        self.beta_point_canvas=None
        self.beta_point_fig=None
        self.beta_point_toolbar=None
        self.beta_point_marker=1
        
        ################################################
        ################################################
        
        self.beta_cont_fig=None
        self.y_num=None
        self.cont_grid_xy = None
        self.cont_grid_x=None
        self.cont_grid_y=None
        self.mult_zi = None
        self.mult_strike_marker=1
        self.beta_strike_marker=1
        self.beta_toolbar=None
        self.beta_cont_canvas=None
        self.beta_contour=None
        self.beta_zi=None
        self.hist_fig=None
        self.hist_ax=None
        self.beta_mult_fig=None
        self.beta_mult_ax=None
        self.beta_mult_canvas=None
        self.uniform_df=None
        self.hist_canvas=None
        self.init=False
        self.hist_toolbar=None
        self.corr_toolbar=None
        self.beta_mult_toolbar=None
        self.rose_canvas=None
        self.fdense_fig=None
        self.fdense_zi=None
        self.fdense_contour=None
        self.fdense_cbar=None
        self.fdense_canvas=None
        self.fdense_ax=None
        self.log_fdense_fig=None
        self.log_fdense_zi=None
        self.log_fdense_contour=None
        self.log_fdense_cbar=None
        self.log_fdense_canvas=None
        self.log_fdense_ax=None
        self.uniform_mult_fig=None
        self.uniform_mult_zi=None
        self.uniform_mult_contour=None
        self.uniform_mult_cbar=None
        self.uniform_mult_canvas=None
        self.uniform_mult_ax=None
        self.uniform_beta_fig=None
        self.uniform_beta_zi=None
        self.uniform_beta_contour=None
        self.uniform_beta_cbar=None
        self.uniform_beta_canvas=None
        self.uniform_beta_ax=None
        self.frac_mult_fig=None
        self.frac_mult_zi=None
        self.frac_mult_contour=None
        self.frac_mult_cbar=None
        self.frac_mult_canvas=None
        self.frac_mult_ax=None
        
        self.frac_beta_fig=None
        self.frac_beta_zi=None
        self.frac_beta_contour=None
        self.frac_beta_cbar=None
        self.frac_beta_canvas=None
        self.frac_beta_ax=None

        self.c1=None
        self.c2=None
        self.c3=None
        self.c4=None
        self.c5=None
        self.c6=None
        self.random_sample=None
        self.cmaps = ['viridis', 'plasma', 'inferno', 'magma', 'Greys', 'Purples',
                      'Blues', 'Greens', 'Oranges', 'Reds', 'YlOrBr', 'YlOrRd',
                      'OrRd', 'PuRd', 'RdPu', 'BuPu', 'GnBu', 'PuBu', 'YlGnBu',
                      'PuBuGn', 'BuGn', 'YlGn','binary', 'gist_yarg', 
                      'gist_gray', 'gray', 'bone', 'pink','spring', 'summer', 
                      'autumn', 'winter', 'cool', 'Wistia','hot', 'afmhot',
                      'gist_heat', 'copper','PiYG', 'PRGn', 'BrBG', 
                      'PuOr', 'RdGy', 'RdBu', 'RdYlBu', 'RdYlGn', 'Spectral',
                      'coolwarm', 'bwr', 'Pastel1', 'Pastel2', 'Paired', 'Accent',
                      'Dark2', 'Set1', 'Set2', 'Set3', 'tab10', 'tab20', 'tab20b',
                      'tab20c', 'flag', 'prism', 'ocean', 'gist_earth', 'terrain',
                      'gist_stern','gnuplot', 'gnuplot2', 'CMRmap', 'cubehelix', 
                      'brg', 'hsv','gist_rainbow', 'rainbow', 'jet',
                      'nipy_spectral', 'gist_ncar']
        '''This class configures and populates the toplevel window.
           top is the toplevel containing window.'''
        _bgcolor = '#d9d9d9'  # X11 color: 'gray85'
        _fgcolor = '#000000'  # X11 color: 'black'
        _compcolor = '#d9d9d9' # X11 color: 'gray85'
        _ana1color = '#d9d9d9' # X11 color: 'gray85' 
        _ana2color = '#ececec' # Closest X11 color: 'gray92' 
        font10 = "-family {Courier New} -size 10 -weight normal -slant"  \
            " roman -underline 0 -overstrike 0"
        font11 = "-family {Segoe UI} -size 8 -weight normal -slant "  \
            "roman -underline 0 -overstrike 0"
        font12 = "-family {Segoe UI} -size 12 -weight bold -slant "  \
            "roman -underline 0 -overstrike 0"
        font13 = "-family {Segoe UI} -size 14 -weight normal -slant "  \
            "roman -underline 0 -overstrike 0"
        font14 = "-family {Segoe UI} -size 7 -weight normal -slant "  \
            "roman -underline 0 -overstrike 0"
        font17="-family {Segoe UI} -size 12 -weight bold -slant "  \
            "roman -underline 0 -overstrike 0"
        self.font15 = "-family {Segoe UI} -size 12 -weight bold -slant "  \
            "roman -underline 0 -overstrike 0"
        self.style = ttk.Style()
        if sys.platform == "win32":
            self.style.theme_use('winnative')
        self.style.configure('.',background=_bgcolor)
        self.style.configure('.',foreground=_fgcolor)
        self.style.configure('.',font="TkDefaultFont")
        self.style.map('.',background=
            [('selected', _compcolor), ('active',_ana2color)])

        top.geometry("1049x700+543+128")
        top.title("MODO ko MODO")
        top.configure(background="#52d883")
        top.configure(highlightbackground="#d9d9d9")
        top.configure(highlightcolor="black")

        self.style.configure('TNotebook.Tab', background=_bgcolor)
        self.style.configure('TNotebook.Tab', foreground=_fgcolor)
        self.style.map('TNotebook.Tab', background=
            [('selected', _compcolor), ('active',_ana2color)])
        self.TNotebook1 = ttk.Notebook(top)
        self.TNotebook1.place(relx=0.01, rely=0.015, relheight=0.953
                , relwidth=0.976)
        self.TNotebook1.configure(width=1024)
#        self.TNotebook1.configure(height=1024)
        self.TNotebook1.configure(takefocus="")
        self.TNotebook1_t0 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t0, padding=3)
        self.TNotebook1.tab(0, text="Main",compound="left",underline="-1",)
        self.TNotebook1_t0.configure(background="#86bad8")
        self.TNotebook1_t0.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t0.configure(highlightcolor="black")
        self.TNotebook1_t1 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t1, padding=3)
        self.TNotebook1.tab(1, text="Contour Plots", compound="left"
                ,underline="-1", )
        self.TNotebook1_t1.configure(background="#86bad8")
        self.TNotebook1_t1.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t1.configure(highlightcolor="black")
        
###############################################################################
#             Want to get rid of this tab cuz not using it for now
###############################################################################  
        self.TNotebook1_t2 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t2, padding=3)
        self.TNotebook1.tab(2, text="Colored Point Plots", compound="none", underline="-1"
                ,)
        self.TNotebook1_t2.configure(background="#86bad8")
        self.TNotebook1_t2.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t2.configure(highlightcolor="black")
        self.TNotebook1_t3 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t3, padding=3)
        self.TNotebook1.tab(3, text="Sample Plots", compound="none"
                ,underline="-1", )
        self.TNotebook1_t3.configure(background="#86bad8")
        self.TNotebook1_t3.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t3.configure(highlightcolor="black")
        self.TNotebook1_t4 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t4, padding=3)
        self.TNotebook1.tab(4, text="Summary Stats", compound="none"
                ,underline="-1", )
        
        self.TNotebook1_t4.configure(background="#86bad8")
        self.TNotebook1_t4.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t4.configure(highlightcolor="black")
        self.TNotebook1_t5 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t5, padding=3)
        self.TNotebook1.tab(5, text="Settings",compound="none",underline="-1",)
        self.TNotebook1_t5.configure(background="#d9d9d9")
        self.TNotebook1_t5.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t5.configure(highlightcolor="black")
        
        self.TNotebook1_t6 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t6, padding=3)
        self.TNotebook1.tab(6, text="Artificial Data",compound="none",underline="-1",)
        self.TNotebook1_t6.configure(background="#86bad8")
        self.TNotebook1_t6.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t6.configure(highlightcolor="black")
###############################################################################
###############################################################################
#make sure this has command updateValue
        self.s1 = tk.Scale(self.TNotebook1_t0, from_=10.0, to=500.0, command=self.updateValue)
###############################################################################
###############################################################################
        self.s1.place(relx=0.02, rely=0.25, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.s1.configure(activebackground="#ececec")
        self.s1.configure(background="#d9d9d9")
        self.s1.configure(font="TkTextFont")
        self.s1.configure(foreground="#000000")
        self.s1.configure(highlightbackground="#d9d9d9")
        self.s1.configure(highlightcolor="black")
        self.s1.configure(label="X Grid Nodes")
        self.s1.configure(orient="horizontal")
        self.s1.configure(takefocus="0")
        self.s1.configure(troughcolor="#f2f2f2")

###############################################################################
###############################################################################
        #make sure this has command keep original
        self.s2 = tk.Scale(self.TNotebook1_t0, from_=0.0, to=500.0, command=self.keep_original)
###############################################################################
###############################################################################
        self.s2.place(relx=0.02, rely=0.342, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.s2.configure(activebackground="#ececec")
        self.s2.configure(background="#d9d9d9")
        self.s2.configure(font="TkTextFont")
        self.s2.configure(foreground="#000000")
        self.s2.configure(highlightbackground="#d9d9d9")
        self.s2.configure(highlightcolor="black")
        self.s2.configure(label="Y Grid Nodes")
        self.s2.configure(orient="horizontal")
        self.s2.configure(takefocus="0")
        self.s2.configure(troughcolor="#afafaf")
        self.s2.set(10)

###############################################################################
###############################################################################
        #addded a scale here to show number of grid node
        #and a fram to put the tool bar in
        self.s3 = tk.Scale(self.TNotebook1_t0, from_=0.0, 
                           to=250000.0, command=self.keep_original)
        self.tab0_frame = tk.Frame(self.TNotebook1_t0)
###############################################################################
###############################################################################
        self.s3.place(relx=0.02, rely=0.433, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.s3.configure(activebackground="#ececec")
        self.s3.configure(background="#d9d9d9")
        self.s3.configure(font="TkTextFont")
        self.s3.configure(foreground="#000000")
        self.s3.configure(highlightbackground="#d9d9d9")
        self.s3.configure(highlightcolor="black")
        self.s3.configure(label="Total Grid Nodes")
        self.s3.configure(orient="horizontal")
        self.s3.configure(takefocus="0")
        self.s3.configure(troughcolor="#afafaf")
        self.s3.set(100)                  


        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.0, rely=0.033, relwidth=0.147)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator2 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator2.place(relx=0.147, rely=0.033, relheight=0.517)
        self.TSeparator2.configure(orient="vertical")
        self.TSeparator2.configure(takefocus="0")

        self.TSeparator2 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator2.place(relx=-0.005, rely=0.033, relheight=0.517)
        self.TSeparator2.configure(orient="vertical")
        self.TSeparator2.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=-0.01, rely=0.55, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.Label1_1 = tk.Label(self.TNotebook1_t0)
        self.Label1_1.place(relx=0.005, rely=0.042, height=33, width=142)
        self.Label1_1.configure(activebackground="#f9f9f9")
        self.Label1_1.configure(activeforeground="black")
        self.Label1_1.configure(background="#c1c1c1")
        self.Label1_1.configure(disabledforeground="#a3a3a3")
        self.Label1_1.configure(font=font12)
        self.Label1_1.configure(foreground="#000000")
        self.Label1_1.configure(highlightbackground="#d9d9d9")
        self.Label1_1.configure(highlightcolor="black")
        self.Label1_1.configure(text='''Grid Parameters''')
        
        self.Average_Dist_Label = tk.Label(self.TNotebook1_t0,anchor='w')
        self.Average_Dist_Label.place(relx=0.65, rely=0.95, height=33, width=350)
        self.Average_Dist_Label.configure(activebackground="#f9f9f9")
        self.Average_Dist_Label.configure(activeforeground="black")
        self.Average_Dist_Label.configure(background="#86bad8")
        self.Average_Dist_Label.configure(disabledforeground="#a3a3a3")
        self.Average_Dist_Label.configure(foreground="#000000")
        self.Average_Dist_Label.configure(highlightbackground="#d9d9d9")
        self.Average_Dist_Label.configure(highlightcolor="black")
        self.Average_Dist_Label.configure(font=self.font15)
        self.Average_Dist_Label.configure(text='''Average Distance to nth Fracture:''')
        
        self.FrontPearsonLabel = tk.Label(self.TNotebook1_t0,anchor='w')
        self.FrontPearsonLabel.place(relx=0.65, rely=0.91, height=33, width=350)
        self.FrontPearsonLabel.configure(activebackground="#f9f9f9")
        self.FrontPearsonLabel.configure(activeforeground="black")
        self.FrontPearsonLabel.configure(background="#86bad8")
        self.FrontPearsonLabel.configure(disabledforeground="#a3a3a3")
        self.FrontPearsonLabel.configure(foreground="#000000")
        self.FrontPearsonLabel.configure(highlightbackground="#d9d9d9")
        self.FrontPearsonLabel.configure(highlightcolor="black")
        self.FrontPearsonLabel.configure(font=self.font15)
        self.FrontPearsonLabel.configure(text='''Multinomial vs. Beta Pearson R:''')

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=-0.01, rely=0.1, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=-0.01, rely=0.225, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.Label2 = tk.Label(self.TNotebook1_t0)
        self.Label2.place(relx=0.0, rely=0.108, height=71, width=144)
        self.Label2.configure(activebackground="#f9f9f9")
        self.Label2.configure(activeforeground="black")
        self.Label2.configure(background="#d9d9d9")
        self.Label2.configure(disabledforeground="#a3a3a3")
        self.Label2.configure(font=font11)
        self.Label2.configure(foreground="#000000")
        self.Label2.configure(highlightbackground="#d9d9d9")
        self.Label2.configure(highlightcolor="black")
        self.Label2.configure(text='''Note: Only need to change the x value. The rest will update to keep aspect ratio.''')
        self.Label2.configure(wraplength="125")

        self.Label1_2 = tk.Label(self.TNotebook1_t0)
        self.Label1_2.place(relx=0.157, rely=0.042, height=43, width=142)
        self.Label1_2.configure(activebackground="#f9f9f9")
        self.Label1_2.configure(activeforeground="black")
        self.Label1_2.configure(background="#c1c1c1")
        self.Label1_2.configure(disabledforeground="#a3a3a3")
        self.Label1_2.configure(font=font12)
        self.Label1_2.configure(foreground="#000000")
        self.Label1_2.configure(highlightbackground="#d9d9d9")
        self.Label1_2.configure(highlightcolor="black")
        self.Label1_2.configure(text='''Multinomial Parameters''')
        self.Label1_2.configure(wraplength="150")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.55, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.033, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator2 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator2.place(relx=0.304, rely=0.033, relheight=0.617)
        self.TSeparator2.configure(orient="vertical")
        self.TSeparator2.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.133, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")
        
        self.neighbors_val=IntVar(self.TNotebook1_t0)
        self.neighbors_val.set(12)
        self.neighbors = ttk.Combobox(self.TNotebook1_t0)
        self.neighbors.place(relx=0.25, rely=0.133, relheight=0.035
                , relwidth=0.042)
        self.value_list = [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,]
        self.neighbors.configure(values=self.value_list)
        self.neighbors.configure(textvariable=self.neighbors_val)
        self.neighbors.configure(takefocus="")

        self.Label1_3 = tk.Label(self.TNotebook1_t0)
        self.Label1_3.place(relx=0.152, rely=0.133, height=21, width=99)
        self.Label1_3.configure(activebackground="#f9f9f9")
        self.Label1_3.configure(activeforeground="black")
        self.Label1_3.configure(background="#86bad8")
        self.Label1_3.configure(disabledforeground="#a3a3a3")
        self.Label1_3.configure(foreground="#000000")
        self.Label1_3.configure(highlightbackground="#d9d9d9")
        self.Label1_3.configure(highlightcolor="black")
        self.Label1_3.configure(text='''Neighbors to Avg''')

#######################################################################################
#    Changing label to cuttof checkbox
######################################################################################
#        self.Label1_4 = tk.Label(self.TNotebook1_t0)
#        self.Label1_4.place(relx=0.157, rely=0.183, height=21, width=49)
#        self.Label1_4.configure(activebackground="#86bad8")
#        self.Label1_4.configure(activeforeground="black")
#        self.Label1_4.configure(background="#86bad8")
#        self.Label1_4.configure(disabledforeground="#a3a3a3")
#        self.Label1_4.configure(foreground="#000000")
#        self.Label1_4.configure(highlightbackground="#d9d9d9")
#        self.Label1_4.configure(highlightcolor="black")
#        self.Label1_4.configure(justify='left')
#        self.Label1_4.configure(text='''Cuttoff r''')

        self.cuttoff=IntVar(self.TNotebook1_t0)
        self.Cuttoff_Check_Box = tk.Checkbutton(self.TNotebook1_t0)
        self.Cuttoff_Check_Box.place(relx=0.15, rely=0.19, height=21, width=80)
        self.Cuttoff_Check_Box.configure(activebackground="#86bad8")
        self.Cuttoff_Check_Box.configure(activeforeground="#000000")
        self.Cuttoff_Check_Box.configure(background="#86bad8")
        self.Cuttoff_Check_Box.configure(disabledforeground="#86bad8")
        self.Cuttoff_Check_Box.configure(foreground="#000000")
        self.Cuttoff_Check_Box.configure(highlightbackground="#86bad8")
        self.Cuttoff_Check_Box.configure(highlightcolor="#000000")
        self.Cuttoff_Check_Box.configure(justify='left')
        self.Cuttoff_Check_Box.configure(takefocus="0")
        self.Cuttoff_Check_Box.configure(text='''Cuttoff r''')
        self.Cuttoff_Check_Box.configure(variable=self.cuttoff)

#        self.cuttoff_r=DoubleVar(self.TNotebook1_t0)
        self.cuttoff_r = tk.Entry(self.TNotebook1_t0)
        self.cuttoff_r.place(relx=0.246, rely=0.192,height=20, relwidth=0.052)
        self.cuttoff_r.configure(background="white")
        self.cuttoff_r.configure(disabledforeground="#a3a3a3")
        self.cuttoff_r.configure(font="TkFixedFont")
        self.cuttoff_r.configure(foreground="#000000")
        self.cuttoff_r.configure(highlightbackground="#d9d9d9")
        self.cuttoff_r.configure(highlightcolor="black")
        self.cuttoff_r.configure(insertbackground="black")
        self.cuttoff_r.configure(selectbackground="#c4c4c4")
        self.cuttoff_r.configure(selectforeground="black")
        self.cuttoff_r.configure(takefocus="0")
#        self.cuttoff_r.configure(variable=self.cuttoff_r)

        self.TSeparator2 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator2.place(relx=0.461, rely=0.033, relheight=0.967)
        self.TSeparator2.configure(orient="vertical")
        self.TSeparator2.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.304, rely=0.65, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.304, rely=0.033, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.225, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.Label1_8 = tk.Label(self.TNotebook1_t0)
        self.Label1_8.place(relx=0.157, rely=0.242, height=33, width=142)
        self.Label1_8.configure(activebackground="#f9f9f9")
        self.Label1_8.configure(activeforeground="black")
        self.Label1_8.configure(background="#c1c1c1")
        self.Label1_8.configure(disabledforeground="#a3a3a3")
        self.Label1_8.configure(font=font12)
        self.Label1_8.configure(foreground="#000000")
        self.Label1_8.configure(highlightbackground="#d9d9d9")
        self.Label1_8.configure(highlightcolor="black")
        self.Label1_8.configure(text='''Beta Parameters''')

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.308, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")
        
        self.theta_val=DoubleVar(self.TNotebook1_t0)
        self.theta_val.set(4)
        self.Theta = tk.Entry(self.TNotebook1_t0)
        self.Theta.place(relx=0.216, rely=0.5,height=20, relwidth=0.082)
        self.Theta.configure(background="white")
        self.Theta.configure(disabledforeground="#a3a3a3")
        self.Theta.configure(font="TkFixedFont")
        self.Theta.configure(foreground="#000000")
        self.Theta.configure(highlightbackground="#d9d9d9")
        self.Theta.configure(highlightcolor="black")
        self.Theta.configure(insertbackground="black")
        self.Theta.configure(selectbackground="#c4c4c4")
        self.Theta.configure(selectforeground="black")
        self.Theta.configure(takefocus="0")
        self.Theta.configure(textvariable=self.theta_val)

        self.Label1_11 = tk.Label(self.TNotebook1_t0)
        self.Label1_11.place(relx=0.152, rely=0.5, height=21, width=39)
        self.Label1_11.configure(activebackground="#f9f9f9")
        self.Label1_11.configure(activeforeground="black")
        self.Label1_11.configure(background="#86bad8")
        self.Label1_11.configure(disabledforeground="#a3a3a3")
        self.Label1_11.configure(foreground="#000000")
        self.Label1_11.configure(highlightbackground="#d9d9d9")
        self.Label1_11.configure(highlightcolor="black")
        self.Label1_11.configure(justify='left')
        self.Label1_11.configure(text='''Theta''')

        self.Label1_10 = tk.Label(self.TNotebook1_t0)
        self.Label1_10.place(relx=0.15, rely=0.3, height=45, width=100)
        self.Label1_10.configure(activebackground="#f9f9f9")
        self.Label1_10.configure(activeforeground="black")
        self.Label1_10.configure(background="#86bad8")
        self.Label1_10.configure(disabledforeground="#a3a3a3")
        self.Label1_10.configure(foreground="#000000")
        self.Label1_10.configure(highlightbackground="#d9d9d9")
        self.Label1_10.configure(highlightcolor="black")
        self.Label1_10.configure(justify='left')
        self.Label1_10.configure(text='''Dominant Fracture \n Set Median''')
        self.Label1_10.config(font=('Arial',8))
        self.Label1_10.lower(belowThis=None)

        self.Label1_9 = tk.Label(self.TNotebook1_t0)
        self.Label1_9.place(relx=0.152, rely=0.383, height=20, width=99)
        self.Label1_9.configure(activebackground="#f9f9f9")
        self.Label1_9.configure(activeforeground="black")
        self.Label1_9.configure(background="#86bad8")
        self.Label1_9.configure(disabledforeground="#a3a3a3")
        self.Label1_9.configure(foreground="#000000")
        self.Label1_9.configure(highlightbackground="#d9d9d9")
        self.Label1_9.configure(highlightcolor="black")
        self.Label1_9.configure(justify='left')
        self.Label1_9.configure(text='''Spread (1 sigma)''')
        
        self.bulk_sigma_val=DoubleVar(self.TNotebook1_t0)
        self.bulk_sigma = tk.Entry(self.TNotebook1_t0)
        self.bulk_sigma.place(relx=0.245, rely=0.383,height=20, relwidth=0.053)
        self.bulk_sigma.configure(background="white")
        self.bulk_sigma.configure(disabledforeground="#a3a3a3")
        self.bulk_sigma.configure(font="TkFixedFont")
        self.bulk_sigma.configure(foreground="#000000")
        self.bulk_sigma.configure(highlightbackground="#d9d9d9")
        self.bulk_sigma.configure(highlightcolor="black")
        self.bulk_sigma.configure(insertbackground="black")
        self.bulk_sigma.configure(selectbackground="#c4c4c4")
        self.bulk_sigma.configure(selectforeground="black")
        self.bulk_sigma.configure(takefocus="0")
        self.bulk_sigma.configure(textvariable=self.bulk_sigma_val)

#####################################################################################
        self.bulk_mean_val=tk.StringVar(self.TNotebook1_t0, value=15)        
        self.bulk_mean = tk.Entry(self.TNotebook1_t0,textvariable=self.bulk_mean_val)
        self.bulk_mean.place(relx=0.245, rely=0.317,height=20, relwidth=0.053)
        self.bulk_mean.configure(background="white")
        self.bulk_mean.configure(disabledforeground="#a3a3a3")
        self.bulk_mean.configure(font="TkFixedFont")
        self.bulk_mean.configure(foreground="#000000")
        self.bulk_mean.configure(highlightbackground="#d9d9d9")
        self.bulk_mean.configure(highlightcolor="black")
        self.bulk_mean.configure(insertbackground="black")
        self.bulk_mean.configure(selectbackground="#c4c4c4")
        self.bulk_mean.configure(selectforeground="black")
        self.bulk_mean.configure(takefocus="0")

        self.Label1_12 = tk.Label(self.TNotebook1_t0)
        self.Label1_12.place(relx=0.152, rely=0.433, height=31, width=89)
        self.Label1_12.configure(activebackground="#f9f9f9")
        self.Label1_12.configure(activeforeground="black")
        self.Label1_12.configure(background="#86bad8")
        self.Label1_12.configure(disabledforeground="#a3a3a3")
        self.Label1_12.configure(foreground="#000000")
        self.Label1_12.configure(highlightbackground="#d9d9d9")
        self.Label1_12.configure(highlightcolor="black")
        self.Label1_12.configure(justify='left')
        self.Label1_12.configure(text='''Recommended Theta''')
        self.Label1_12.configure(wraplength="90")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.492, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.417, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.367, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.183, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=-0.01, rely=0.1, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.125, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.3, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.Label1_5 = tk.Label(self.TNotebook1_t0)
        self.Label1_5.place(relx=0.314, rely=0.033, height=33, width=142)
        self.Label1_5.configure(activebackground="#f9f9f9")
        self.Label1_5.configure(activeforeground="black")
        self.Label1_5.configure(background="#c1c1c1")
        self.Label1_5.configure(disabledforeground="#a3a3a3")
        self.Label1_5.configure(font=font12)
        self.Label1_5.configure(foreground="#000000")
        self.Label1_5.configure(highlightbackground="#d9d9d9")
        self.Label1_5.configure(highlightcolor="black")
        self.Label1_5.configure(text='''Bin Rotation''')
        self.Label1_5.configure(wraplength="100")

        self.Label3 = tk.Label(self.TNotebook1_t0)
        self.Label3.place(relx=0.319, rely=0.308, height=21, width=59)
        self.Label3.configure(activebackground="#f9f9f9")
        self.Label3.configure(activeforeground="black")
        self.Label3.configure(background="#86bad8")
        self.Label3.configure(disabledforeground="#a3a3a3")
        self.Label3.configure(foreground="#000000")
        self.Label3.configure(highlightbackground="#d9d9d9")
        self.Label3.configure(highlightcolor="black")
        self.Label3.configure(text='''Bin Center''')
        
        self.bin_center=DoubleVar(self.TNotebook1_t0)
        self.Bin_center_entry = tk.Entry(self.TNotebook1_t0)
        self.Bin_center_entry.place(relx=0.382, rely=0.317, height=20
                , relwidth=0.073)
        self.Bin_center_entry.configure(background="white")
        self.Bin_center_entry.configure(disabledforeground="#a3a3a3")
        self.Bin_center_entry.configure(font="TkFixedFont")
        self.Bin_center_entry.configure(foreground="#000000")
        self.Bin_center_entry.configure(highlightbackground="#d9d9d9")
        self.Bin_center_entry.configure(highlightcolor="black")
        self.Bin_center_entry.configure(insertbackground="black")
        self.Bin_center_entry.configure(selectbackground="#c4c4c4")
        self.Bin_center_entry.configure(selectforeground="black")
        self.Bin_center_entry.configure(takefocus="0")
        self.Bin_center_entry.configure(textvariable=self.bin_center)

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.304, rely=0.225, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.BinSpin = tk.Canvas(self.TNotebook1_t0)
        self.BinSpin.place(relx=0.314, rely=0.4, relheight=0.238, relwidth=0.14)
        self.BinSpin.configure(background="#d9d9d9")
        self.BinSpin.configure(borderwidth="2")
        self.BinSpin.configure(highlightbackground="#d9d9d9")
        self.BinSpin.configure(highlightcolor="black")
        self.BinSpin.configure(insertbackground="black")
        self.BinSpin.configure(relief='ridge')
        self.BinSpin.configure(selectbackground="#c4c4c4")
        self.BinSpin.configure(selectforeground="black")
        self.BinSpin.configure(takefocus="0")
        self.BinSpin.configure(width=143)
        
        self.BinSpin_a = tk.Canvas(self.TNotebook1_t6)
        self.BinSpin_a.place(relx=0.65, rely=0.7, relheight=0.238, relwidth=0.14)
        self.BinSpin_a.configure(background="#d9d9d9")
        self.BinSpin_a.configure(borderwidth="2")
        self.BinSpin_a.configure(highlightbackground="#d9d9d9")
        self.BinSpin_a.configure(highlightcolor="black")
        self.BinSpin_a.configure(insertbackground="black")
        self.BinSpin_a.configure(relief='ridge')
        self.BinSpin_a.configure(selectbackground="#c4c4c4")
        self.BinSpin_a.configure(selectforeground="black")
        self.BinSpin_a.configure(takefocus="0")
        self.BinSpin_a.configure(width=143)

        self.Analyse = tk.Button(self.TNotebook1_t0, command=self.analyse)
        self.Analyse.place(relx=0.005, rely=0.658, height=54, width=147)
        self.Analyse.configure(activebackground="#ececec")
        self.Analyse.configure(activeforeground="#000000")
        self.Analyse.configure(background="#ffae21")
        self.Analyse.configure(disabledforeground="#a3a3a3")
        self.Analyse.configure(foreground="#000000")
        self.Analyse.configure(highlightbackground="#d9d9d9")
        self.Analyse.configure(highlightcolor="black")
        self.Analyse.configure(pady="0")
        self.Analyse.configure(takefocus="0")
        self.Analyse.configure(text='''Analyse Sample''')
        
        self.Quit = tk.Button(self.TNotebook1_t0, command=self.quitit)
        self.Quit.place(relx=0.005, rely=0.75, height=25, width=147)
        self.Quit.configure(background="#FF0000")
        self.Quit.configure(disabledforeground="#a3a3a3")
        self.Quit.configure(foreground="#000000")
        self.Quit.configure(highlightbackground="#d9d9d9")
        self.Quit.configure(highlightcolor="black")
        self.Quit.configure(pady="0")
        self.Quit.configure(takefocus="0")
        self.Quit.configure(text='''Quit''')

        self.ToExcel = tk.Button(self.TNotebook1_t0, command=self.export_text)
        self.ToExcel.place(relx=0.157, rely=0.658, height=54, width=147)
        self.ToExcel.configure(activebackground="#ececec")
        self.ToExcel.configure(activeforeground="#000000")
        self.ToExcel.configure(background="#ffae21")
        self.ToExcel.configure(disabledforeground="#a3a3a3")
        self.ToExcel.configure(foreground="#000000")
        self.ToExcel.configure(highlightbackground="#d9d9d9")
        self.ToExcel.configure(highlightcolor="black")
        self.ToExcel.configure(pady="0")
        self.ToExcel.configure(takefocus="0")
        self.ToExcel.configure(text='''Export to Excel''')

        self.Label1_6 = tk.Label(self.TNotebook1_t0)
        self.Label1_6.place(relx=0.304, rely=0.092, height=81, width=154)
        self.Label1_6.configure(activebackground="#f9f9f9")
        self.Label1_6.configure(activeforeground="black")
        self.Label1_6.configure(background="#d9d9d9")
        self.Label1_6.configure(disabledforeground="#a3a3a3")
        self.Label1_6.configure(font=font11)
        self.Label1_6.configure(foreground="#000000")
        self.Label1_6.configure(highlightbackground="#d9d9d9")
        self.Label1_6.configure(highlightcolor="black")
        self.Label1_6.configure(justify='left')
        self.Label1_6.configure(text='''Note: This unexplored paramter will shift how the bin counts work. Recommend no spin or dominant fracture set mean.''')
        self.Label1_6.configure(wraplength="150")
        
        self.custom_bin_check=IntVar(self.TNotebook1_t0)
        self.Custom_Bins = tk.Checkbutton(self.TNotebook1_t0)
        self.Custom_Bins.place(relx=0.314, rely=0.233, relheight=0.042
                , relwidth=0.093)
        self.Custom_Bins.configure(activebackground="#86bad8")
        self.Custom_Bins.configure(activeforeground="#000000")
        self.Custom_Bins.configure(background="#86bad8")
        self.Custom_Bins.configure(disabledforeground="#86bad8")
        self.Custom_Bins.configure(foreground="#000000")
        self.Custom_Bins.configure(highlightbackground="#86bad8")
        self.Custom_Bins.configure(highlightcolor="#000000")
        self.Custom_Bins.configure(justify='left')
        self.Custom_Bins.configure(takefocus="0")
        self.Custom_Bins.configure(text='''Custom Bins''')
        self.Custom_Bins.configure(variable=self.custom_bin_check)

###############################################################################
# Addedd cuttoff radius checkbox option
##############################################################################
        

        self.LoadFile = tk.Button(self.TNotebook1_t0, command=self.load_file)
        self.LoadFile.place(relx=0.005, rely=0.567, height=54, width=148)
        self.LoadFile.configure(activebackground="#ececec")
        self.LoadFile.configure(activeforeground="#000000")
        self.LoadFile.configure(background="#ffae21")
        self.LoadFile.configure(disabledforeground="#a3a3a3")
        self.LoadFile.configure(foreground="#000000")
        self.LoadFile.configure(highlightbackground="#d9d9d9")
        self.LoadFile.configure(highlightcolor="black")
        self.LoadFile.configure(pady="0")
        self.LoadFile.configure(takefocus="0")
        self.LoadFile.configure(text='''Load File''')

        self.TSeparator2 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator2.place(relx=0.995, rely=0.033, relheight=0.967)
        self.TSeparator2.configure(orient="vertical")
        self.TSeparator2.configure(takefocus="0")
        
        self.Label3 = tk.Label(self.TNotebook1_t0)
        self.Label3.place(relx=0.005, rely=0.908, height=21, width=118)
        self.Label3.configure(activebackground="#86bad8")
        self.Label3.configure(activeforeground="black")
        self.Label3.configure(background="#86bad8")
        self.Label3.configure(disabledforeground="#a3a3a3")
        self.Label3.configure(foreground="#000000")
        self.Label3.configure(highlightbackground="#d9d9d9")
        self.Label3.configure(highlightcolor="black")
        self.Label3.configure(text='''Current Sample File''')
        
        ##################################################################
        #added this extra button to make the plot 1 to one if you want.
        self.PreviewEqualAspect = tk.Button(self.TNotebook1_t0, command=self.preview_equal_aspect)
        self.PreviewEqualAspect.place(relx=0.47, rely=0.885, height=25, width=110)
        self.PreviewEqualAspect.configure(activebackground="#ececec")
        self.PreviewEqualAspect.configure(activeforeground="#000000")
        self.PreviewEqualAspect.configure(background="#ffae21")
        self.PreviewEqualAspect.configure(disabledforeground="#a3a3a3")
        self.PreviewEqualAspect.configure(foreground="#000000")
        self.PreviewEqualAspect.configure(highlightbackground="#d9d9d9")
        self.PreviewEqualAspect.configure(highlightcolor="black")
        self.PreviewEqualAspect.configure(pady="0")
        self.PreviewEqualAspect.configure(takefocus="0")
        self.PreviewEqualAspect.configure(text='''1:1 Aspect Ratio''')
        
        ##################################################################
        #added this extra button to make the multinomial contour one to one if you want.        
        self.MultContEqualAspect = tk.Button(self.TNotebook1_t1, command=self.mult_equal_aspect)
        self.MultContEqualAspect.place(relx=0.85, rely=0.025, height=25, width=110)
        self.MultContEqualAspect.configure(activebackground="#ececec")
        self.MultContEqualAspect.configure(activeforeground="#000000")
        self.MultContEqualAspect.configure(background="#ffae21")
        self.MultContEqualAspect.configure(disabledforeground="#a3a3a3")
        self.MultContEqualAspect.configure(foreground="#000000")
        self.MultContEqualAspect.configure(highlightbackground="#d9d9d9")
        self.MultContEqualAspect.configure(highlightcolor="black")
        self.MultContEqualAspect.configure(pady="0")
        self.MultContEqualAspect.configure(takefocus="0")
        self.MultContEqualAspect.configure(text='''1:1 Aspect Ratio''')
        
        
        
        
################################################################################
################################################################################
################################################################################
        #Here I changed a bunch of stuff ot be on a new tab because the main
        #was getting too crowded.
###############################################################################
        
        
        
        

        
        
        
        self.Label1_7 = tk.Label(self.TNotebook1_t6)
        self.Label1_7.place(relx=0.461, rely=0.033, height=33, width=542)
        self.Label1_7.configure(activebackground="#f9f9f9")
        self.Label1_7.configure(activeforeground="black")
        self.Label1_7.configure(background="#c1c1c1")
        self.Label1_7.configure(disabledforeground="#a3a3a3")
        self.Label1_7.configure(font=font12)
        self.Label1_7.configure(foreground="#000000")
        self.Label1_7.configure(highlightbackground="#d9d9d9")
        self.Label1_7.configure(highlightcolor="black")
        self.Label1_7.configure(text='''Artificial Dataset Creation''')

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.461, rely=0.033, relwidth=0.539)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.461, rely=0.283, relwidth=0.539)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.461, rely=0.383, relwidth=0.539)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.461, rely=0.483, relwidth=0.539)
        self.TSeparator1.configure(takefocus="0")

        self.c1_mean = tk.Entry(self.TNotebook1_t6)
        self.c1_mean.place(relx=0.564, rely=0.1,height=20, relwidth=0.053)
        self.c1_mean.configure(background="white")
        self.c1_mean.configure(disabledforeground="#a3a3a3")
        self.c1_mean.configure(font="TkFixedFont")
        self.c1_mean.configure(foreground="#000000")
        self.c1_mean.configure(highlightbackground="#d9d9d9")
        self.c1_mean.configure(highlightcolor="black")
        self.c1_mean.configure(insertbackground="black")
        self.c1_mean.configure(selectbackground="#c4c4c4")
        self.c1_mean.configure(selectforeground="black")


        self.c1_sigma = tk.Entry(self.TNotebook1_t6)
        self.c1_sigma.place(relx=0.564, rely=0.142,height=20, relwidth=0.053)
        self.c1_sigma.configure(background="white")
        self.c1_sigma.configure(disabledforeground="#a3a3a3")
        self.c1_sigma.configure(font="TkFixedFont")
        self.c1_sigma.configure(foreground="#000000")
        self.c1_sigma.configure(highlightbackground="#d9d9d9")
        self.c1_sigma.configure(highlightcolor="black")
        self.c1_sigma.configure(insertbackground="black")
        self.c1_sigma.configure(selectbackground="#c4c4c4")
        self.c1_sigma.configure(selectforeground="black")
        self.c1_sigma.configure(takefocus="0")

        self.Label1_14 = tk.Label(self.TNotebook1_t6)
        self.Label1_14.place(relx=0.515, rely=0.1, height=21, width=49)
        self.Label1_14.configure(activebackground="#f9f9f9")
        self.Label1_14.configure(activeforeground="black")
        self.Label1_14.configure(background="#86bad8")
        self.Label1_14.configure(disabledforeground="#a3a3a3")
        self.Label1_14.configure(foreground="#000000")
        self.Label1_14.configure(highlightbackground="#d9d9d9")
        self.Label1_14.configure(highlightcolor="black")
        self.Label1_14.configure(justify='left')
        self.Label1_14.configure(text='''mean''')

        self.Label1_15 = tk.Label(self.TNotebook1_t6)
        self.Label1_15.place(relx=0.515, rely=0.142, height=21, width=49)
        self.Label1_15.configure(activebackground="#f9f9f9")
        self.Label1_15.configure(activeforeground="black")
        self.Label1_15.configure(background="#86bad8")
        self.Label1_15.configure(disabledforeground="#a3a3a3")
        self.Label1_15.configure(foreground="#000000")
        self.Label1_15.configure(highlightbackground="#d9d9d9")
        self.Label1_15.configure(highlightcolor="black")
        self.Label1_15.configure(justify='left')
        self.Label1_15.configure(text='''sigma''')

        self.Label1_19 = tk.Label(self.TNotebook1_t6)
        self.Label1_19.place(relx=0.815, rely=0.15, height=20, width=38)
        self.Label1_19.configure(activebackground="#f9f9f9")
        self.Label1_19.configure(activeforeground="black")
        self.Label1_19.configure(background="#86bad8")
        self.Label1_19.configure(disabledforeground="#a3a3a3")
        self.Label1_19.configure(foreground="#000000")
        self.Label1_19.configure(highlightbackground="#d9d9d9")
        self.Label1_19.configure(highlightcolor="black")
        self.Label1_19.configure(justify='left')
        self.Label1_19.configure(text='''y min''')

        self.c1_ymin = tk.Entry(self.TNotebook1_t6)
        self.c1_ymin.place(relx=0.858, rely=0.145,height=20, relwidth=0.05)
        self.c1_ymin.configure(background="white")
        self.c1_ymin.configure(disabledforeground="#a3a3a3")
        self.c1_ymin.configure(font="TkFixedFont")
        self.c1_ymin.configure(foreground="#000000")
        self.c1_ymin.configure(highlightbackground="#d9d9d9")
        self.c1_ymin.configure(highlightcolor="black")
        self.c1_ymin.configure(insertbackground="black")
        self.c1_ymin.configure(selectbackground="#c4c4c4")
        self.c1_ymin.configure(selectforeground="black")
        self.c1_ymin.configure(takefocus="0")

        self.c1_ymax = tk.Entry(self.TNotebook1_t6)
        self.c1_ymax.place(relx=0.858, rely=0.105,height=20, relwidth=0.05)
        self.c1_ymax.configure(background="white")
        self.c1_ymax.configure(disabledforeground="#a3a3a3")
        self.c1_ymax.configure(font="TkFixedFont")
        self.c1_ymax.configure(foreground="#000000")
        self.c1_ymax.configure(highlightbackground="#d9d9d9")
        self.c1_ymax.configure(highlightcolor="black")
        self.c1_ymax.configure(insertbackground="black")
        self.c1_ymax.configure(selectbackground="#c4c4c4")
        self.c1_ymax.configure(selectforeground="black")
        self.c1_ymax.configure(takefocus="0")

        self.label1_16 = tk.Label(self.TNotebook1_t6)
        self.label1_16.place(relx=0.623, rely=0.125, height=20, width=40)
        self.label1_16.configure(activebackground="#f9f9f9")
        self.label1_16.configure(activeforeground="black")
        self.label1_16.configure(background="#86bad8")
        self.label1_16.configure(disabledforeground="#a3a3a3")
        self.label1_16.configure(foreground="#000000")
        self.label1_16.configure(highlightbackground="#d9d9d9")
        self.label1_16.configure(highlightcolor="black")
        self.label1_16.configure(justify='left')
        self.label1_16.configure(text='''x min''')

        self.Label1_22 = tk.Label(self.TNotebook1_t6)
        self.Label1_22.place(relx=0.515, rely=0.2, height=20, width=38)
        self.Label1_22.configure(activebackground="#f9f9f9")
        self.Label1_22.configure(activeforeground="black")
        self.Label1_22.configure(background="#86bad8")
        self.Label1_22.configure(disabledforeground="#a3a3a3")
        self.Label1_22.configure(foreground="#000000")
        self.Label1_22.configure(highlightbackground="#d9d9d9")
        self.Label1_22.configure(highlightcolor="black")
        self.Label1_22.configure(justify='left')
        self.Label1_22.configure(text='''mean''')

        self.c2_mean = tk.Entry(self.TNotebook1_t6)
        self.c2_mean.place(relx=0.564, rely=0.2,height=20, relwidth=0.053)
        self.c2_mean.configure(background="white")
        self.c2_mean.configure(disabledforeground="#a3a3a3")
        self.c2_mean.configure(font="TkFixedFont")
        self.c2_mean.configure(foreground="#000000")
        self.c2_mean.configure(highlightbackground="#d9d9d9")
        self.c2_mean.configure(highlightcolor="black")
        self.c2_mean.configure(insertbackground="black")
        self.c2_mean.configure(selectbackground="#c4c4c4")
        self.c2_mean.configure(selectforeground="black")
        self.c2_mean.configure(takefocus="0")

        self.c2_xmin = tk.Entry(self.TNotebook1_t6)
        self.c2_xmin.place(relx=0.665, rely=0.225,height=20, relwidth=0.05)
        self.c2_xmin.configure(background="white")
        self.c2_xmin.configure(disabledforeground="#a3a3a3")
        self.c2_xmin.configure(font="TkFixedFont")
        self.c2_xmin.configure(foreground="#000000")
        self.c2_xmin.configure(highlightbackground="#d9d9d9")
        self.c2_xmin.configure(highlightcolor="black")
        self.c2_xmin.configure(insertbackground="black")
        self.c2_xmin.configure(selectbackground="#c4c4c4")
        self.c2_xmin.configure(selectforeground="black")
        self.c2_xmin.configure(takefocus="0")

        self.c2_sigma = tk.Entry(self.TNotebook1_t6)
        self.c2_sigma.place(relx=0.564, rely=0.242,height=20, relwidth=0.053)
        self.c2_sigma.configure(background="white")
        self.c2_sigma.configure(disabledforeground="#a3a3a3")
        self.c2_sigma.configure(font="TkFixedFont")
        self.c2_sigma.configure(foreground="#000000")
        self.c2_sigma.configure(highlightbackground="#d9d9d9")
        self.c2_sigma.configure(highlightcolor="black")
        self.c2_sigma.configure(insertbackground="black")
        self.c2_sigma.configure(selectbackground="#c4c4c4")
        self.c2_sigma.configure(selectforeground="black")
        self.c2_sigma.configure(takefocus="0")

        self.c2_xmax = tk.Entry(self.TNotebook1_t6)
        self.c2_xmax.place(relx=0.76, rely=0.225,height=20, relwidth=0.05)
        self.c2_xmax.configure(background="white")
        self.c2_xmax.configure(disabledforeground="#a3a3a3")
        self.c2_xmax.configure(font="TkFixedFont")
        self.c2_xmax.configure(foreground="#000000")
        self.c2_xmax.configure(highlightbackground="#d9d9d9")
        self.c2_xmax.configure(highlightcolor="black")
        self.c2_xmax.configure(insertbackground="black")
        self.c2_xmax.configure(selectbackground="#c4c4c4")
        self.c2_xmax.configure(selectforeground="black")
        self.c2_xmax.configure(takefocus="0")

        self.c2_ymax = tk.Entry(self.TNotebook1_t6)
        self.c2_ymax.place(relx=0.858, rely=0.205,height=20, relwidth=0.05)
        self.c2_ymax.configure(background="white")
        self.c2_ymax.configure(disabledforeground="#a3a3a3")
        self.c2_ymax.configure(font="TkFixedFont")
        self.c2_ymax.configure(foreground="#000000")
        self.c2_ymax.configure(highlightbackground="#d9d9d9")
        self.c2_ymax.configure(highlightcolor="black")
        self.c2_ymax.configure(insertbackground="black")
        self.c2_ymax.configure(selectbackground="#c4c4c4")
        self.c2_ymax.configure(selectforeground="black")
        self.c2_ymax.configure(takefocus="0")

        self.c2_ymin = tk.Entry(self.TNotebook1_t6)
        self.c2_ymin.place(relx=0.858, rely=0.245,height=20, relwidth=0.05)
        self.c2_ymin.configure(background="white")
        self.c2_ymin.configure(disabledforeground="#a3a3a3")
        self.c2_ymin.configure(font="TkFixedFont")
        self.c2_ymin.configure(foreground="#000000")
        self.c2_ymin.configure(highlightbackground="#d9d9d9")
        self.c2_ymin.configure(highlightcolor="black")
        self.c2_ymin.configure(insertbackground="black")
        self.c2_ymin.configure(selectbackground="#c4c4c4")
        self.c2_ymin.configure(selectforeground="black")
        self.c2_ymin.configure(takefocus="0")

        self.Label1_24 = tk.Label(self.TNotebook1_t6)
        self.Label1_24.place(relx=0.515, rely=0.242, height=20, width=42)
        self.Label1_24.configure(activebackground="#f9f9f9")
        self.Label1_24.configure(activeforeground="black")
        self.Label1_24.configure(background="#86bad8")
        self.Label1_24.configure(disabledforeground="#a3a3a3")
        self.Label1_24.configure(foreground="#000000")
        self.Label1_24.configure(highlightbackground="#d9d9d9")
        self.Label1_24.configure(highlightcolor="black")
        self.Label1_24.configure(justify='left')
        self.Label1_24.configure(text='''sigma''')

        self.Label1_20 = tk.Label(self.TNotebook1_t6)
        self.Label1_20.place(relx=0.917, rely=0.1, height=21, width=79)
        self.Label1_20.configure(activebackground="#f9f9f9")
        self.Label1_20.configure(activeforeground="black")
        self.Label1_20.configure(background="#86bad8")
        self.Label1_20.configure(disabledforeground="#a3a3a3")
        self.Label1_20.configure(foreground="#000000")
        self.Label1_20.configure(highlightbackground="#d9d9d9")
        self.Label1_20.configure(highlightcolor="black")
        self.Label1_20.configure(justify='left')
        self.Label1_20.configure(text='''Distribution''')

        self.Label1_18 = tk.Label(self.TNotebook1_t6)
        self.Label1_18.place(relx=0.815, rely=0.105, height=20, width=38)
        self.Label1_18.configure(activebackground="#f9f9f9")
        self.Label1_18.configure(activeforeground="black")
        self.Label1_18.configure(background="#86bad8")
        self.Label1_18.configure(disabledforeground="#a3a3a3")
        self.Label1_18.configure(foreground="#000000")
        self.Label1_18.configure(highlightbackground="#d9d9d9")
        self.Label1_18.configure(highlightcolor="black")
        self.Label1_18.configure(justify='left')
        self.Label1_18.configure(text='''y max''')

        self.Label1_28 = tk.Label(self.TNotebook1_t6)
        self.Label1_28.place(relx=0.815, rely=0.205, height=20, width=38)
        self.Label1_28.configure(activebackground="#f9f9f9")
        self.Label1_28.configure(activeforeground="black")
        self.Label1_28.configure(background="#86bad8")
        self.Label1_28.configure(disabledforeground="#a3a3a3")
        self.Label1_28.configure(foreground="#000000")
        self.Label1_28.configure(highlightbackground="#d9d9d9")
        self.Label1_28.configure(highlightcolor="black")
        self.Label1_28.configure(justify='left')
        self.Label1_28.configure(text='''y max''')

        self.Label1_25 = tk.Label(self.TNotebook1_t6)
        self.Label1_25.place(relx=0.623, rely=0.225, height=20, width=40)
        self.Label1_25.configure(activebackground="#f9f9f9")
        self.Label1_25.configure(activeforeground="black")
        self.Label1_25.configure(background="#86bad8")
        self.Label1_25.configure(disabledforeground="#a3a3a3")
        self.Label1_25.configure(foreground="#000000")
        self.Label1_25.configure(highlightbackground="#d9d9d9")
        self.Label1_25.configure(highlightcolor="black")
        self.Label1_25.configure(justify='left')
        self.Label1_25.configure(text='''x min''')

        self.Label1_26 = tk.Label(self.TNotebook1_t6)
        self.Label1_26.place(relx=0.716, rely=0.225, height=20, width=39)
        self.Label1_26.configure(activebackground="#f9f9f9")
        self.Label1_26.configure(activeforeground="black")
        self.Label1_26.configure(background="#86bad8")
        self.Label1_26.configure(disabledforeground="#a3a3a3")
        self.Label1_26.configure(foreground="#000000")
        self.Label1_26.configure(highlightbackground="#d9d9d9")
        self.Label1_26.configure(highlightcolor="black")
        self.Label1_26.configure(justify='left')
        self.Label1_26.configure(text='''x max''')

        self.Label1_29 = tk.Label(self.TNotebook1_t6)
        self.Label1_29.place(relx=0.815, rely=0.25, height=20, width=38)
        self.Label1_29.configure(activebackground="#f9f9f9")
        self.Label1_29.configure(activeforeground="black")
        self.Label1_29.configure(background="#86bad8")
        self.Label1_29.configure(disabledforeground="#a3a3a3")
        self.Label1_29.configure(foreground="#000000")
        self.Label1_29.configure(highlightbackground="#d9d9d9")
        self.Label1_29.configure(highlightcolor="black")
        self.Label1_29.configure(justify='left')
        self.Label1_29.configure(text='''y min''')

        self.Label1_30 = tk.Label(self.TNotebook1_t6)
        self.Label1_30.place(relx=0.917, rely=0.2, height=21, width=79)
        self.Label1_30.configure(activebackground="#f9f9f9")
        self.Label1_30.configure(activeforeground="black")
        self.Label1_30.configure(background="#86bad8")
        self.Label1_30.configure(disabledforeground="#a3a3a3")
        self.Label1_30.configure(foreground="#000000")
        self.Label1_30.configure(highlightbackground="#d9d9d9")
        self.Label1_30.configure(highlightcolor="black")
        self.Label1_30.configure(justify='left')
        self.Label1_30.configure(text='''Distribution''')

        self.Label1_13 = tk.Label(self.TNotebook1_t6)
        self.Label1_13.place(relx=0.466, rely=0.108, height=21, width=49)
        self.Label1_13.configure(activebackground="#f9f9f9")
        self.Label1_13.configure(activeforeground="black")
        self.Label1_13.configure(background="#86bad8")
        self.Label1_13.configure(disabledforeground="#a3a3a3")
        self.Label1_13.configure(foreground="#000000")
        self.Label1_13.configure(highlightbackground="#d9d9d9")
        self.Label1_13.configure(highlightcolor="black")
        self.Label1_13.configure(justify='left')
        self.Label1_13.configure(text='''n(c1)''')

        self.c1_n = tk.Entry(self.TNotebook1_t6)
        self.c1_n.place(relx=0.463, rely=0.142,height=20, relwidth=0.048)
        self.c1_n.configure(background="white")
        self.c1_n.configure(disabledforeground="#a3a3a3")
        self.c1_n.configure(font="TkFixedFont")
        self.c1_n.configure(foreground="#000000")
        self.c1_n.configure(highlightbackground="#d9d9d9")
        self.c1_n.configure(highlightcolor="black")
        self.c1_n.configure(insertbackground="black")
        self.c1_n.configure(selectbackground="#c4c4c4")
        self.c1_n.configure(selectforeground="black")
        self.c1_n.configure(takefocus="0")

        self.Label1_21 = tk.Label(self.TNotebook1_t6)
        self.Label1_21.place(relx=0.466, rely=0.208, height=21, width=54)
        self.Label1_21.configure(activebackground="#f9f9f9")
        self.Label1_21.configure(activeforeground="black")
        self.Label1_21.configure(background="#86bad8")
        self.Label1_21.configure(disabledforeground="#a3a3a3")
        self.Label1_21.configure(foreground="#000000")
        self.Label1_21.configure(highlightbackground="#d9d9d9")
        self.Label1_21.configure(highlightcolor="black")
        self.Label1_21.configure(justify='left')
        self.Label1_21.configure(text='''n(c2)''')

        self.c2_n = tk.Entry(self.TNotebook1_t6)
        self.c2_n.place(relx=0.463, rely=0.242,height=20, relwidth=0.048)
        self.c2_n.configure(background="white")
        self.c2_n.configure(disabledforeground="#a3a3a3")
        self.c2_n.configure(font="TkFixedFont")
        self.c2_n.configure(foreground="#000000")
        self.c2_n.configure(highlightbackground="#d9d9d9")
        self.c2_n.configure(highlightcolor="black")
        self.c2_n.configure(insertbackground="black")
        self.c2_n.configure(selectbackground="#c4c4c4")
        self.c2_n.configure(selectforeground="black")
        self.c2_n.configure(takefocus="0")

        self.c3_n = tk.Entry(self.TNotebook1_t6)
        self.c3_n.place(relx=0.463, rely=0.342,height=20, relwidth=0.048)
        self.c3_n.configure(background="white")
        self.c3_n.configure(disabledforeground="#a3a3a3")
        self.c3_n.configure(font="TkFixedFont")
        self.c3_n.configure(foreground="#000000")
        self.c3_n.configure(highlightbackground="#d9d9d9")
        self.c3_n.configure(highlightcolor="black")
        self.c3_n.configure(insertbackground="black")
        self.c3_n.configure(selectbackground="#c4c4c4")
        self.c3_n.configure(selectforeground="black")
        self.c3_n.configure(takefocus="0")

        self.c4_n = tk.Entry(self.TNotebook1_t6)
        self.c4_n.place(relx=0.463, rely=0.447,height=20, relwidth=0.048)
        self.c4_n.configure(background="white")
        self.c4_n.configure(disabledforeground="#a3a3a3")
        self.c4_n.configure(font="TkFixedFont")
        self.c4_n.configure(foreground="#000000")
        self.c4_n.configure(highlightbackground="#d9d9d9")
        self.c4_n.configure(highlightcolor="black")
        self.c4_n.configure(insertbackground="black")
        self.c4_n.configure(selectbackground="#c4c4c4")
        self.c4_n.configure(selectforeground="black")
        self.c4_n.configure(takefocus="0")

        self.c5_n = tk.Entry(self.TNotebook1_t6)
        self.c5_n.place(relx=0.463, rely=0.535,height=20, relwidth=0.048)
        self.c5_n.configure(background="white")
        self.c5_n.configure(disabledforeground="#a3a3a3")
        self.c5_n.configure(font="TkFixedFont")
        self.c5_n.configure(foreground="#000000")
        self.c5_n.configure(highlightbackground="#d9d9d9")
        self.c5_n.configure(highlightcolor="black")
        self.c5_n.configure(insertbackground="black")
        self.c5_n.configure(selectbackground="#c4c4c4")
        self.c5_n.configure(selectforeground="black")
        self.c5_n.configure(takefocus="0")

        self.c6_n = tk.Entry(self.TNotebook1_t6)
        self.c6_n.place(relx=0.463, rely=0.633,height=20, relwidth=0.048)
        self.c6_n.configure(background="white")
        self.c6_n.configure(disabledforeground="#a3a3a3")
        self.c6_n.configure(font="TkFixedFont")
        self.c6_n.configure(foreground="#000000")
        self.c6_n.configure(highlightbackground="#d9d9d9")
        self.c6_n.configure(highlightcolor="black")
        self.c6_n.configure(insertbackground="black")
        self.c6_n.configure(selectbackground="#c4c4c4")
        self.c6_n.configure(selectforeground="black")
        self.c6_n.configure(takefocus="0")
        


        self.TSeparator1_8 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1_8.place(relx=0.461, rely=0.583, relwidth=0.539)
        self.TSeparator1_8.configure(takefocus="0")

        self.TSeparator1_9 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1_9.place(relx=0.461, rely=0.683, relwidth=0.539)
        self.TSeparator1_9.configure(takefocus="0")

        self.Label1_31 = tk.Label(self.TNotebook1_t6)
        self.Label1_31.place(relx=0.466, rely=0.308, height=21, width=54)
        self.Label1_31.configure(activebackground="#f9f9f9")
        self.Label1_31.configure(activeforeground="black")
        self.Label1_31.configure(background="#86bad8")
        self.Label1_31.configure(disabledforeground="#a3a3a3")
        self.Label1_31.configure(foreground="#000000")
        self.Label1_31.configure(highlightbackground="#d9d9d9")
        self.Label1_31.configure(highlightcolor="black")
        self.Label1_31.configure(justify='left')
        self.Label1_31.configure(text='''n(c3)''')

        self.Label1_39 = tk.Label(self.TNotebook1_t6)
        self.Label1_39.place(relx=0.466, rely=0.408, height=21, width=54)
        self.Label1_39.configure(activebackground="#f9f9f9")
        self.Label1_39.configure(activeforeground="black")
        self.Label1_39.configure(background="#86bad8")
        self.Label1_39.configure(disabledforeground="#a3a3a3")
        self.Label1_39.configure(foreground="#000000")
        self.Label1_39.configure(highlightbackground="#d9d9d9")
        self.Label1_39.configure(highlightcolor="black")
        self.Label1_39.configure(justify='left')
        self.Label1_39.configure(text='''n(c4)''')

        self.Label1_47 = tk.Label(self.TNotebook1_t6)
        self.Label1_47.place(relx=0.466, rely=0.5, height=21, width=54)
        self.Label1_47.configure(activebackground="#f9f9f9")
        self.Label1_47.configure(activeforeground="black")
        self.Label1_47.configure(background="#86bad8")
        self.Label1_47.configure(disabledforeground="#a3a3a3")
        self.Label1_47.configure(foreground="#000000")
        self.Label1_47.configure(highlightbackground="#d9d9d9")
        self.Label1_47.configure(highlightcolor="black")
        self.Label1_47.configure(justify='left')
        self.Label1_47.configure(text='''n(c5)''')

        self.Label1_55 = tk.Label(self.TNotebook1_t6)
        self.Label1_55.place(relx=0.466, rely=0.6, height=21, width=54)
        self.Label1_55.configure(activebackground="#f9f9f9")
        self.Label1_55.configure(activeforeground="black")
        self.Label1_55.configure(background="#86bad8")
        self.Label1_55.configure(disabledforeground="#a3a3a3")
        self.Label1_55.configure(foreground="#000000")
        self.Label1_55.configure(highlightbackground="#d9d9d9")
        self.Label1_55.configure(highlightcolor="black")
        self.Label1_55.configure(justify='left')
        self.Label1_55.configure(text='''n(c6)''')

        self.c3_mean = tk.Entry(self.TNotebook1_t6)
        self.c3_mean.place(relx=0.564, rely=0.292,height=20, relwidth=0.053)
        self.c3_mean.configure(background="white")
        self.c3_mean.configure(disabledforeground="#a3a3a3")
        self.c3_mean.configure(font="TkFixedFont")
        self.c3_mean.configure(foreground="#000000")
        self.c3_mean.configure(highlightbackground="#d9d9d9")
        self.c3_mean.configure(highlightcolor="black")
        self.c3_mean.configure(insertbackground="black")
        self.c3_mean.configure(selectbackground="#c4c4c4")
        self.c3_mean.configure(selectforeground="black")
        self.c3_mean.configure(takefocus="0")

        self.c4_mean = tk.Entry(self.TNotebook1_t6)
        self.c4_mean.place(relx=0.564, rely=0.392,height=20, relwidth=0.053)
        self.c4_mean.configure(background="white")
        self.c4_mean.configure(disabledforeground="#a3a3a3")
        self.c4_mean.configure(font="TkFixedFont")
        self.c4_mean.configure(foreground="#000000")
        self.c4_mean.configure(highlightbackground="#d9d9d9")
        self.c4_mean.configure(highlightcolor="black")
        self.c4_mean.configure(insertbackground="black")
        self.c4_mean.configure(selectbackground="#c4c4c4")
        self.c4_mean.configure(selectforeground="black")
        self.c4_mean.configure(takefocus="0")

        self.c5_mean = tk.Entry(self.TNotebook1_t6)
        self.c5_mean.place(relx=0.564, rely=0.495,height=20, relwidth=0.053)
        self.c5_mean.configure(background="white")
        self.c5_mean.configure(disabledforeground="#a3a3a3")
        self.c5_mean.configure(font="TkFixedFont")
        self.c5_mean.configure(foreground="#000000")
        self.c5_mean.configure(highlightbackground="#d9d9d9")
        self.c5_mean.configure(highlightcolor="black")
        self.c5_mean.configure(insertbackground="black")
        self.c5_mean.configure(selectbackground="#c4c4c4")
        self.c5_mean.configure(selectforeground="black")
        self.c5_mean.configure(takefocus="0")

        self.c6_mean = tk.Entry(self.TNotebook1_t6)
        self.c6_mean.place(relx=0.564, rely=0.592,height=20, relwidth=0.053)
        self.c6_mean.configure(background="white")
        self.c6_mean.configure(disabledforeground="#a3a3a3")
        self.c6_mean.configure(font="TkFixedFont")
        self.c6_mean.configure(foreground="#000000")
        self.c6_mean.configure(highlightbackground="#d9d9d9")
        self.c6_mean.configure(highlightcolor="black")
        self.c6_mean.configure(insertbackground="black")
        self.c6_mean.configure(selectbackground="#c4c4c4")
        self.c6_mean.configure(selectforeground="black")
        self.c6_mean.configure(takefocus="0")

        self.c3_sigma = tk.Entry(self.TNotebook1_t6)
        self.c3_sigma.place(relx=0.564, rely=0.342,height=20, relwidth=0.053)
        self.c3_sigma.configure(background="white")
        self.c3_sigma.configure(disabledforeground="#a3a3a3")
        self.c3_sigma.configure(font="TkFixedFont")
        self.c3_sigma.configure(foreground="#000000")
        self.c3_sigma.configure(highlightbackground="#d9d9d9")
        self.c3_sigma.configure(highlightcolor="black")
        self.c3_sigma.configure(insertbackground="black")
        self.c3_sigma.configure(selectbackground="#c4c4c4")
        self.c3_sigma.configure(selectforeground="black")
        self.c3_sigma.configure(takefocus="0")

        self.c4_sigma = tk.Entry(self.TNotebook1_t6)
        self.c4_sigma.place(relx=0.564, rely=0.442,height=20, relwidth=0.053)
        self.c4_sigma.configure(background="white")
        self.c4_sigma.configure(disabledforeground="#a3a3a3")
        self.c4_sigma.configure(font="TkFixedFont")
        self.c4_sigma.configure(foreground="#000000")
        self.c4_sigma.configure(highlightbackground="#d9d9d9")
        self.c4_sigma.configure(highlightcolor="black")
        self.c4_sigma.configure(insertbackground="black")
        self.c4_sigma.configure(selectbackground="#c4c4c4")
        self.c4_sigma.configure(selectforeground="black")
        self.c4_sigma.configure(takefocus="0")

        self.c5_sigma = tk.Entry(self.TNotebook1_t6)
        self.c5_sigma.place(relx=0.564, rely=0.542,height=20, relwidth=0.053)
        self.c5_sigma.configure(background="white")
        self.c5_sigma.configure(disabledforeground="#a3a3a3")
        self.c5_sigma.configure(font="TkFixedFont")
        self.c5_sigma.configure(foreground="#000000")
        self.c5_sigma.configure(highlightbackground="#d9d9d9")
        self.c5_sigma.configure(highlightcolor="black")
        self.c5_sigma.configure(insertbackground="black")
        self.c5_sigma.configure(selectbackground="#c4c4c4")
        self.c5_sigma.configure(selectforeground="black")
        self.c5_sigma.configure(takefocus="0")

        self.c6_sigma = tk.Entry(self.TNotebook1_t6)
        self.c6_sigma.place(relx=0.564, rely=0.633,height=20, relwidth=0.053)
        self.c6_sigma.configure(background="white")
        self.c6_sigma.configure(disabledforeground="#a3a3a3")
        self.c6_sigma.configure(font="TkFixedFont")
        self.c6_sigma.configure(foreground="#000000")
        self.c6_sigma.configure(highlightbackground="#d9d9d9")
        self.c6_sigma.configure(highlightcolor="black")
        self.c6_sigma.configure(insertbackground="black")
        self.c6_sigma.configure(selectbackground="#c4c4c4")
        self.c6_sigma.configure(selectforeground="black")
        self.c6_sigma.configure(takefocus="0")

        self.Label1_40 = tk.Label(self.TNotebook1_t6)
        self.Label1_40.place(relx=0.515, rely=0.392, height=21, width=38)
        self.Label1_40.configure(activebackground="#f9f9f9")
        self.Label1_40.configure(activeforeground="black")
        self.Label1_40.configure(background="#86bad8")
        self.Label1_40.configure(disabledforeground="#a3a3a3")
        self.Label1_40.configure(foreground="#000000")
        self.Label1_40.configure(highlightbackground="#d9d9d9")
        self.Label1_40.configure(highlightcolor="black")
        self.Label1_40.configure(justify='left')
        self.Label1_40.configure(text='''mean''')

        self.Label1_32 = tk.Label(self.TNotebook1_t6)
        self.Label1_32.place(relx=0.515, rely=0.292, height=21, width=38)
        self.Label1_32.configure(activebackground="#f9f9f9")
        self.Label1_32.configure(activeforeground="black")
        self.Label1_32.configure(background="#86bad8")
        self.Label1_32.configure(disabledforeground="#a3a3a3")
        self.Label1_32.configure(foreground="#000000")
        self.Label1_32.configure(highlightbackground="#d9d9d9")
        self.Label1_32.configure(highlightcolor="black")
        self.Label1_32.configure(justify='left')
        self.Label1_32.configure(text='''mean''')

        self.Label1_48 = tk.Label(self.TNotebook1_t6)
        self.Label1_48.place(relx=0.515, rely=0.492, height=21, width=38)
        self.Label1_48.configure(activebackground="#f9f9f9")
        self.Label1_48.configure(activeforeground="black")
        self.Label1_48.configure(background="#86bad8")
        self.Label1_48.configure(disabledforeground="#a3a3a3")
        self.Label1_48.configure(foreground="#000000")
        self.Label1_48.configure(highlightbackground="#d9d9d9")
        self.Label1_48.configure(highlightcolor="black")
        self.Label1_48.configure(justify='left')
        self.Label1_48.configure(text='''mean''')

        self.Label1_56 = tk.Label(self.TNotebook1_t6)
        self.Label1_56.place(relx=0.515, rely=0.592, height=21, width=38)
        self.Label1_56.configure(activebackground="#f9f9f9")
        self.Label1_56.configure(activeforeground="black")
        self.Label1_56.configure(background="#86bad8")
        self.Label1_56.configure(disabledforeground="#a3a3a3")
        self.Label1_56.configure(foreground="#000000")
        self.Label1_56.configure(highlightbackground="#d9d9d9")
        self.Label1_56.configure(highlightcolor="black")
        self.Label1_56.configure(justify='left')
        self.Label1_56.configure(text='''mean''')

        self.Label1_41 = tk.Label(self.TNotebook1_t6)
        self.Label1_41.place(relx=0.515, rely=0.442, height=20, width=42)
        self.Label1_41.configure(activebackground="#f9f9f9")
        self.Label1_41.configure(activeforeground="black")
        self.Label1_41.configure(background="#86bad8")
        self.Label1_41.configure(disabledforeground="#a3a3a3")
        self.Label1_41.configure(foreground="#000000")
        self.Label1_41.configure(highlightbackground="#d9d9d9")
        self.Label1_41.configure(highlightcolor="black")
        self.Label1_41.configure(justify='left')
        self.Label1_41.configure(text='''sigma''')

        self.Label1_49 = tk.Label(self.TNotebook1_t6)
        self.Label1_49.place(relx=0.515, rely=0.542, height=20, width=42)
        self.Label1_49.configure(activebackground="#f9f9f9")
        self.Label1_49.configure(activeforeground="black")
        self.Label1_49.configure(background="#86bad8")
        self.Label1_49.configure(disabledforeground="#a3a3a3")
        self.Label1_49.configure(foreground="#000000")
        self.Label1_49.configure(highlightbackground="#d9d9d9")
        self.Label1_49.configure(highlightcolor="black")
        self.Label1_49.configure(justify='left')
        self.Label1_49.configure(text='''sigma''')

        self.Label1_57 = tk.Label(self.TNotebook1_t6)
        self.Label1_57.place(relx=0.515, rely=0.633, height=20, width=42)
        self.Label1_57.configure(activebackground="#f9f9f9")
        self.Label1_57.configure(activeforeground="black")
        self.Label1_57.configure(background="#86bad8")
        self.Label1_57.configure(disabledforeground="#a3a3a3")
        self.Label1_57.configure(foreground="#000000")
        self.Label1_57.configure(highlightbackground="#d9d9d9")
        self.Label1_57.configure(highlightcolor="black")
        self.Label1_57.configure(justify='left')
        self.Label1_57.configure(text='''sigma''')

        self.Label1_33 = tk.Label(self.TNotebook1_t6)
        self.Label1_33.place(relx=0.515, rely=0.342, height=20, width=42)
        self.Label1_33.configure(activebackground="#f9f9f9")
        self.Label1_33.configure(activeforeground="black")
        self.Label1_33.configure(background="#86bad8")
        self.Label1_33.configure(disabledforeground="#a3a3a3")
        self.Label1_33.configure(foreground="#000000")
        self.Label1_33.configure(highlightbackground="#d9d9d9")
        self.Label1_33.configure(highlightcolor="black")
        self.Label1_33.configure(justify='left')
        self.Label1_33.configure(text='''sigma''')
        



        self.Label1_34 = tk.Label(self.TNotebook1_t6)
        self.Label1_34.place(relx=0.623, rely=0.325, height=20, width=40)
        self.Label1_34.configure(activebackground="#f9f9f9")
        self.Label1_34.configure(activeforeground="black")
        self.Label1_34.configure(background="#86bad8")
        self.Label1_34.configure(disabledforeground="#a3a3a3")
        self.Label1_34.configure(foreground="#000000")
        self.Label1_34.configure(highlightbackground="#d9d9d9")
        self.Label1_34.configure(highlightcolor="black")
        self.Label1_34.configure(justify='left')
        self.Label1_34.configure(text='''x min''')

        self.Label1_42 = tk.Label(self.TNotebook1_t6)
        self.Label1_42.place(relx=0.623, rely=0.425, height=20, width=40)
        self.Label1_42.configure(activebackground="#f9f9f9")
        self.Label1_42.configure(activeforeground="black")
        self.Label1_42.configure(background="#86bad8")
        self.Label1_42.configure(disabledforeground="#a3a3a3")
        self.Label1_42.configure(foreground="#000000")
        self.Label1_42.configure(highlightbackground="#d9d9d9")
        self.Label1_42.configure(highlightcolor="black")
        self.Label1_42.configure(justify='left')
        self.Label1_42.configure(text='''x min''')

        self.Label1_50 = tk.Label(self.TNotebook1_t6)
        self.Label1_50.place(relx=0.623, rely=0.525, height=20, width=40)
        self.Label1_50.configure(activebackground="#f9f9f9")
        self.Label1_50.configure(activeforeground="black")
        self.Label1_50.configure(background="#86bad8")
        self.Label1_50.configure(disabledforeground="#a3a3a3")
        self.Label1_50.configure(foreground="#000000")
        self.Label1_50.configure(highlightbackground="#d9d9d9")
        self.Label1_50.configure(highlightcolor="black")
        self.Label1_50.configure(justify='left')
        self.Label1_50.configure(text='''x min''')

        self.Label1_58 = tk.Label(self.TNotebook1_t6)
        self.Label1_58.place(relx=0.623, rely=0.625, height=20, width=40)
        self.Label1_58.configure(activebackground="#f9f9f9")
        self.Label1_58.configure(activeforeground="black")
        self.Label1_58.configure(background="#86bad8")
        self.Label1_58.configure(disabledforeground="#a3a3a3")
        self.Label1_58.configure(foreground="#000000")
        self.Label1_58.configure(highlightbackground="#d9d9d9")
        self.Label1_58.configure(highlightcolor="black")
        self.Label1_58.configure(justify='left')
        self.Label1_58.configure(text='''x min''')

        self.c4_xmin = tk.Entry(self.TNotebook1_t6)
        self.c4_xmin.place(relx=0.665, rely=0.425,height=20, relwidth=0.05)
        self.c4_xmin.configure(background="white")
        self.c4_xmin.configure(disabledforeground="#a3a3a3")
        self.c4_xmin.configure(font="TkFixedFont")
        self.c4_xmin.configure(foreground="#000000")
        self.c4_xmin.configure(highlightbackground="#d9d9d9")
        self.c4_xmin.configure(highlightcolor="black")
        self.c4_xmin.configure(insertbackground="black")
        self.c4_xmin.configure(selectbackground="#c4c4c4")
        self.c4_xmin.configure(selectforeground="black")
        self.c4_xmin.configure(takefocus="0")

        self.c5_xmin = tk.Entry(self.TNotebook1_t6)
        self.c5_xmin.place(relx=0.665, rely=0.525,height=20, relwidth=0.05)
        self.c5_xmin.configure(background="white")
        self.c5_xmin.configure(disabledforeground="#a3a3a3")
        self.c5_xmin.configure(font="TkFixedFont")
        self.c5_xmin.configure(foreground="#000000")
        self.c5_xmin.configure(highlightbackground="#d9d9d9")
        self.c5_xmin.configure(highlightcolor="black")
        self.c5_xmin.configure(insertbackground="black")
        self.c5_xmin.configure(selectbackground="#c4c4c4")
        self.c5_xmin.configure(selectforeground="black")
        self.c5_xmin.configure(takefocus="0")

        self.c6_xmin = tk.Entry(self.TNotebook1_t6)
        self.c6_xmin.place(relx=0.665, rely=0.625,height=20, relwidth=0.05)
        self.c6_xmin.configure(background="white")
        self.c6_xmin.configure(disabledforeground="#a3a3a3")
        self.c6_xmin.configure(font="TkFixedFont")
        self.c6_xmin.configure(foreground="#000000")
        self.c6_xmin.configure(highlightbackground="#d9d9d9")
        self.c6_xmin.configure(highlightcolor="black")
        self.c6_xmin.configure(insertbackground="black")
        self.c6_xmin.configure(selectbackground="#c4c4c4")
        self.c6_xmin.configure(selectforeground="black")
        self.c6_xmin.configure(takefocus="0")

        self.c3_xmin = tk.Entry(self.TNotebook1_t6)
        self.c3_xmin.place(relx=0.665, rely=0.325,height=20, relwidth=0.05)
        self.c3_xmin.configure(background="white")
        self.c3_xmin.configure(disabledforeground="#a3a3a3")
        self.c3_xmin.configure(font="TkFixedFont")
        self.c3_xmin.configure(foreground="#000000")
        self.c3_xmin.configure(highlightbackground="#d9d9d9")
        self.c3_xmin.configure(highlightcolor="black")
        self.c3_xmin.configure(insertbackground="black")
        self.c3_xmin.configure(selectbackground="#c4c4c4")
        self.c3_xmin.configure(selectforeground="black")
        self.c3_xmin.configure(takefocus="0")

        self.Label1_17 = tk.Label(self.TNotebook1_t6)
        self.Label1_17.place(relx=0.716, rely=0.125, height=20, width=49)
        self.Label1_17.configure(activebackground="#f9f9f9")
        self.Label1_17.configure(activeforeground="black")
        self.Label1_17.configure(background="#86bad8")
        self.Label1_17.configure(disabledforeground="#a3a3a3")
        self.Label1_17.configure(foreground="#000000")
        self.Label1_17.configure(highlightbackground="#d9d9d9")
        self.Label1_17.configure(highlightcolor="black")
        self.Label1_17.configure(justify='left')
        self.Label1_17.configure(text='''x max''')

        self.Label1_35 = tk.Label(self.TNotebook1_t6)
        self.Label1_35.place(relx=0.716, rely=0.325, height=20, width=49)
        self.Label1_35.configure(activebackground="#f9f9f9")
        self.Label1_35.configure(activeforeground="black")
        self.Label1_35.configure(background="#86bad8")
        self.Label1_35.configure(disabledforeground="#a3a3a3")
        self.Label1_35.configure(foreground="#000000")
        self.Label1_35.configure(highlightbackground="#d9d9d9")
        self.Label1_35.configure(highlightcolor="black")
        self.Label1_35.configure(justify='left')
        self.Label1_35.configure(text='''x max''')

        self.Label1_43 = tk.Label(self.TNotebook1_t6)
        self.Label1_43.place(relx=0.716, rely=0.425, height=20, width=49)
        self.Label1_43.configure(activebackground="#f9f9f9")
        self.Label1_43.configure(activeforeground="black")
        self.Label1_43.configure(background="#86bad8")
        self.Label1_43.configure(disabledforeground="#a3a3a3")
        self.Label1_43.configure(foreground="#000000")
        self.Label1_43.configure(highlightbackground="#d9d9d9")
        self.Label1_43.configure(highlightcolor="black")
        self.Label1_43.configure(justify='left')
        self.Label1_43.configure(text='''x max''')

        self.Label1_51 = tk.Label(self.TNotebook1_t6)
        self.Label1_51.place(relx=0.716, rely=0.525, height=20, width=49)
        self.Label1_51.configure(activebackground="#f9f9f9")
        self.Label1_51.configure(activeforeground="black")
        self.Label1_51.configure(background="#86bad8")
        self.Label1_51.configure(disabledforeground="#a3a3a3")
        self.Label1_51.configure(foreground="#000000")
        self.Label1_51.configure(highlightbackground="#d9d9d9")
        self.Label1_51.configure(highlightcolor="black")
        self.Label1_51.configure(justify='left')
        self.Label1_51.configure(text='''x max''')

        self.Label1_59 = tk.Label(self.TNotebook1_t6)
        self.Label1_59.place(relx=0.716, rely=0.625, height=20, width=49)
        self.Label1_59.configure(activebackground="#f9f9f9")
        self.Label1_59.configure(activeforeground="black")
        self.Label1_59.configure(background="#86bad8")
        self.Label1_59.configure(disabledforeground="#a3a3a3")
        self.Label1_59.configure(foreground="#000000")
        self.Label1_59.configure(highlightbackground="#d9d9d9")
        self.Label1_59.configure(highlightcolor="black")
        self.Label1_59.configure(justify='left')
        self.Label1_59.configure(text='''x max''')

        self.c3_xmax = tk.Entry(self.TNotebook1_t6)
        self.c3_xmax.place(relx=0.76, rely=0.325,height=20, relwidth=0.05)
        self.c3_xmax.configure(background="white")
        self.c3_xmax.configure(disabledforeground="#a3a3a3")
        self.c3_xmax.configure(font="TkFixedFont")
        self.c3_xmax.configure(foreground="#000000")
        self.c3_xmax.configure(highlightbackground="#d9d9d9")
        self.c3_xmax.configure(highlightcolor="black")
        self.c3_xmax.configure(insertbackground="black")
        self.c3_xmax.configure(selectbackground="#c4c4c4")
        self.c3_xmax.configure(selectforeground="black")
        self.c3_xmax.configure(takefocus="0")

        self.c4_xmax = tk.Entry(self.TNotebook1_t6)
        self.c4_xmax.place(relx=0.76, rely=0.425,height=20, relwidth=0.05)
        self.c4_xmax.configure(background="white")
        self.c4_xmax.configure(disabledforeground="#a3a3a3")
        self.c4_xmax.configure(font="TkFixedFont")
        self.c4_xmax.configure(foreground="#000000")
        self.c4_xmax.configure(highlightbackground="#d9d9d9")
        self.c4_xmax.configure(highlightcolor="black")
        self.c4_xmax.configure(insertbackground="black")
        self.c4_xmax.configure(selectbackground="#c4c4c4")
        self.c4_xmax.configure(selectforeground="black")
        self.c4_xmax.configure(takefocus="0")

        self.c5_xmax = tk.Entry(self.TNotebook1_t6)
        self.c5_xmax.place(relx=0.76, rely=0.525,height=20, relwidth=0.05)
        self.c5_xmax.configure(background="white")
        self.c5_xmax.configure(disabledforeground="#a3a3a3")
        self.c5_xmax.configure(font="TkFixedFont")
        self.c5_xmax.configure(foreground="#000000")
        self.c5_xmax.configure(highlightbackground="#d9d9d9")
        self.c5_xmax.configure(highlightcolor="black")
        self.c5_xmax.configure(insertbackground="black")
        self.c5_xmax.configure(selectbackground="#c4c4c4")
        self.c5_xmax.configure(selectforeground="black")
        self.c5_xmax.configure(takefocus="0")

        self.c6_xmax = tk.Entry(self.TNotebook1_t6)
        self.c6_xmax.place(relx=0.76, rely=0.625,height=20, relwidth=0.05)
        self.c6_xmax.configure(background="white")
        self.c6_xmax.configure(disabledforeground="#a3a3a3")
        self.c6_xmax.configure(font="TkFixedFont")
        self.c6_xmax.configure(foreground="#000000")
        self.c6_xmax.configure(highlightbackground="#d9d9d9")
        self.c6_xmax.configure(highlightcolor="black")
        self.c6_xmax.configure(insertbackground="black")
        self.c6_xmax.configure(selectbackground="#c4c4c4")
        self.c6_xmax.configure(selectforeground="black")
        self.c6_xmax.configure(takefocus="0")

        self.c3_ymax = tk.Entry(self.TNotebook1_t6)
        self.c3_ymax.place(relx=0.858, rely=0.305,height=20, relwidth=0.05)
        self.c3_ymax.configure(background="white")
        self.c3_ymax.configure(disabledforeground="#a3a3a3")
        self.c3_ymax.configure(font="TkFixedFont")
        self.c3_ymax.configure(foreground="#000000")
        self.c3_ymax.configure(highlightbackground="#d9d9d9")
        self.c3_ymax.configure(highlightcolor="black")
        self.c3_ymax.configure(insertbackground="black")
        self.c3_ymax.configure(selectbackground="#c4c4c4")
        self.c3_ymax.configure(selectforeground="black")
        self.c3_ymax.configure(takefocus="0")

        self.c4_ymax = tk.Entry(self.TNotebook1_t6)
        self.c4_ymax.place(relx=0.858, rely=0.405,height=20, relwidth=0.05)
        self.c4_ymax.configure(background="white")
        self.c4_ymax.configure(disabledforeground="#a3a3a3")
        self.c4_ymax.configure(font="TkFixedFont")
        self.c4_ymax.configure(foreground="#000000")
        self.c4_ymax.configure(highlightbackground="#d9d9d9")
        self.c4_ymax.configure(highlightcolor="black")
        self.c4_ymax.configure(insertbackground="black")
        self.c4_ymax.configure(selectbackground="#c4c4c4")
        self.c4_ymax.configure(selectforeground="black")
        self.c4_ymax.configure(takefocus="0")

        self.c5_ymax = tk.Entry(self.TNotebook1_t6)
        self.c5_ymax.place(relx=0.858, rely=0.505,height=20, relwidth=0.05)
        self.c5_ymax.configure(background="white")
        self.c5_ymax.configure(disabledforeground="#a3a3a3")
        self.c5_ymax.configure(font="TkFixedFont")
        self.c5_ymax.configure(foreground="#000000")
        self.c5_ymax.configure(highlightbackground="#d9d9d9")
        self.c5_ymax.configure(highlightcolor="black")
        self.c5_ymax.configure(insertbackground="black")
        self.c5_ymax.configure(selectbackground="#c4c4c4")
        self.c5_ymax.configure(selectforeground="black")
        self.c5_ymax.configure(takefocus="0")

        self.c6_ymax = tk.Entry(self.TNotebook1_t6)
        self.c6_ymax.place(relx=0.858, rely=0.605,height=20, relwidth=0.05)
        self.c6_ymax.configure(background="white")
        self.c6_ymax.configure(disabledforeground="#a3a3a3")
        self.c6_ymax.configure(font="TkFixedFont")
        self.c6_ymax.configure(foreground="#000000")
        self.c6_ymax.configure(highlightbackground="#d9d9d9")
        self.c6_ymax.configure(highlightcolor="black")
        self.c6_ymax.configure(insertbackground="black")
        self.c6_ymax.configure(selectbackground="#c4c4c4")
        self.c6_ymax.configure(selectforeground="black")
        self.c6_ymax.configure(takefocus="0")

        self.Label1_36 = tk.Label(self.TNotebook1_t6)
        self.Label1_36.place(relx=0.815, rely=0.305, height=20, width=38)
        self.Label1_36.configure(activebackground="#f9f9f9")
        self.Label1_36.configure(activeforeground="black")
        self.Label1_36.configure(background="#86bad8")
        self.Label1_36.configure(disabledforeground="#a3a3a3")
        self.Label1_36.configure(foreground="#000000")
        self.Label1_36.configure(highlightbackground="#d9d9d9")
        self.Label1_36.configure(highlightcolor="black")
        self.Label1_36.configure(justify='left')
        self.Label1_36.configure(text='''y max''')

        self.Label1_44 = tk.Label(self.TNotebook1_t6)
        self.Label1_44.place(relx=0.815, rely=0.405, height=20, width=38)
        self.Label1_44.configure(activebackground="#f9f9f9")
        self.Label1_44.configure(activeforeground="black")
        self.Label1_44.configure(background="#86bad8")
        self.Label1_44.configure(disabledforeground="#a3a3a3")
        self.Label1_44.configure(foreground="#000000")
        self.Label1_44.configure(highlightbackground="#d9d9d9")
        self.Label1_44.configure(highlightcolor="black")
        self.Label1_44.configure(justify='left')
        self.Label1_44.configure(text='''y max''')

        self.Label1_52 = tk.Label(self.TNotebook1_t6)
        self.Label1_52.place(relx=0.815, rely=0.505, height=20, width=38)
        self.Label1_52.configure(activebackground="#f9f9f9")
        self.Label1_52.configure(activeforeground="black")
        self.Label1_52.configure(background="#86bad8")
        self.Label1_52.configure(disabledforeground="#a3a3a3")
        self.Label1_52.configure(foreground="#000000")
        self.Label1_52.configure(highlightbackground="#d9d9d9")
        self.Label1_52.configure(highlightcolor="black")
        self.Label1_52.configure(justify='left')
        self.Label1_52.configure(text='''y max''')

        self.Label1_60 = tk.Label(self.TNotebook1_t6)
        self.Label1_60.place(relx=0.815, rely=0.605, height=20, width=38)
        self.Label1_60.configure(activebackground="#f9f9f9")
        self.Label1_60.configure(activeforeground="black")
        self.Label1_60.configure(background="#86bad8")
        self.Label1_60.configure(disabledforeground="#a3a3a3")
        self.Label1_60.configure(foreground="#000000")
        self.Label1_60.configure(highlightbackground="#d9d9d9")
        self.Label1_60.configure(highlightcolor="black")
        self.Label1_60.configure(justify='left')
        self.Label1_60.configure(text='''y max''')

        self.c3_ymin = tk.Entry(self.TNotebook1_t6)
        self.c3_ymin.place(relx=0.858, rely=0.345,height=20, relwidth=0.05)
        self.c3_ymin.configure(background="white")
        self.c3_ymin.configure(disabledforeground="#a3a3a3")
        self.c3_ymin.configure(font="TkFixedFont")
        self.c3_ymin.configure(foreground="#000000")
        self.c3_ymin.configure(highlightbackground="#d9d9d9")
        self.c3_ymin.configure(highlightcolor="black")
        self.c3_ymin.configure(insertbackground="black")
        self.c3_ymin.configure(selectbackground="#c4c4c4")
        self.c3_ymin.configure(selectforeground="black")
        self.c3_ymin.configure(takefocus="0")

        self.c4_ymin = tk.Entry(self.TNotebook1_t6)
        self.c4_ymin.place(relx=0.858, rely=0.445,height=20, relwidth=0.05)
        self.c4_ymin.configure(background="white")
        self.c4_ymin.configure(disabledforeground="#a3a3a3")
        self.c4_ymin.configure(font="TkFixedFont")
        self.c4_ymin.configure(foreground="#000000")
        self.c4_ymin.configure(highlightbackground="#d9d9d9")
        self.c4_ymin.configure(highlightcolor="black")
        self.c4_ymin.configure(insertbackground="black")
        self.c4_ymin.configure(selectbackground="#c4c4c4")
        self.c4_ymin.configure(selectforeground="black")
        self.c4_ymin.configure(takefocus="0")

        self.c5_ymin = tk.Entry(self.TNotebook1_t6)
        self.c5_ymin.place(relx=0.858, rely=0.545,height=20, relwidth=0.05)
        self.c5_ymin.configure(background="white")
        self.c5_ymin.configure(disabledforeground="#a3a3a3")
        self.c5_ymin.configure(font="TkFixedFont")
        self.c5_ymin.configure(foreground="#000000")
        self.c5_ymin.configure(highlightbackground="#d9d9d9")
        self.c5_ymin.configure(highlightcolor="black")
        self.c5_ymin.configure(insertbackground="black")
        self.c5_ymin.configure(selectbackground="#c4c4c4")
        self.c5_ymin.configure(selectforeground="black")
        self.c5_ymin.configure(takefocus="0")

        self.c6_ymin = tk.Entry(self.TNotebook1_t6)
        self.c6_ymin.place(relx=0.858, rely=0.645,height=20, relwidth=0.05)
        self.c6_ymin.configure(background="white")
        self.c6_ymin.configure(disabledforeground="#a3a3a3")
        self.c6_ymin.configure(font="TkFixedFont")
        self.c6_ymin.configure(foreground="#000000")
        self.c6_ymin.configure(highlightbackground="#d9d9d9")
        self.c6_ymin.configure(highlightcolor="black")
        self.c6_ymin.configure(insertbackground="black")
        self.c6_ymin.configure(selectbackground="#c4c4c4")
        self.c6_ymin.configure(selectforeground="black")
        self.c6_ymin.configure(takefocus="0")

        self.Label1_45 = tk.Label(self.TNotebook1_t6)
        self.Label1_45.place(relx=0.815, rely=0.45, height=20, width=38)
        self.Label1_45.configure(activebackground="#f9f9f9")
        self.Label1_45.configure(activeforeground="black")
        self.Label1_45.configure(background="#86bad8")
        self.Label1_45.configure(disabledforeground="#a3a3a3")
        self.Label1_45.configure(foreground="#000000")
        self.Label1_45.configure(highlightbackground="#d9d9d9")
        self.Label1_45.configure(highlightcolor="black")
        self.Label1_45.configure(justify='left')
        self.Label1_45.configure(text='''y min''')

        self.Label1_53 = tk.Label(self.TNotebook1_t6)
        self.Label1_53.place(relx=0.815, rely=0.55, height=20, width=38)
        self.Label1_53.configure(activebackground="#f9f9f9")
        self.Label1_53.configure(activeforeground="black")
        self.Label1_53.configure(anchor='n')
        self.Label1_53.configure(background="#86bad8")
        self.Label1_53.configure(disabledforeground="#a3a3a3")
        self.Label1_53.configure(foreground="#000000")
        self.Label1_53.configure(highlightbackground="#d9d9d9")
        self.Label1_53.configure(highlightcolor="black")
        self.Label1_53.configure(justify='left')
        self.Label1_53.configure(text='''y min''')

        self.Label1_37 = tk.Label(self.TNotebook1_t6)
        self.Label1_37.place(relx=0.815, rely=0.35, height=20, width=38)
        self.Label1_37.configure(activebackground="#f9f9f9")
        self.Label1_37.configure(activeforeground="black")
        self.Label1_37.configure(background="#86bad8")
        self.Label1_37.configure(disabledforeground="#a3a3a3")
        self.Label1_37.configure(foreground="#000000")
        self.Label1_37.configure(highlightbackground="#d9d9d9")
        self.Label1_37.configure(highlightcolor="black")
        self.Label1_37.configure(justify='left')
        self.Label1_37.configure(text='''y min''')

        self.Label1_61 = tk.Label(self.TNotebook1_t6)
        self.Label1_61.place(relx=0.815, rely=0.65, height=20, width=38)
        self.Label1_61.configure(activebackground="#f9f9f9")
        self.Label1_61.configure(activeforeground="black")
        self.Label1_61.configure(background="#86bad8")
        self.Label1_61.configure(disabledforeground="#a3a3a3")
        self.Label1_61.configure(foreground="#000000")
        self.Label1_61.configure(highlightbackground="#d9d9d9")
        self.Label1_61.configure(highlightcolor="black")
        self.Label1_61.configure(justify='left')
        self.Label1_61.configure(text='''y min''')

        self.Generate = tk.Button(self.TNotebook1_t6, command =self.artificial_data)
        self.Generate.place(relx=0.838, rely=0.7, height=34, width=158)
        self.Generate.configure(activebackground="#ececec")
        self.Generate.configure(activeforeground="#000000")
        self.Generate.configure(background="#ffae21")
        self.Generate.configure(disabledforeground="#a3a3a3")
        self.Generate.configure(foreground="#000000")
        self.Generate.configure(highlightbackground="#d9d9d9")
        self.Generate.configure(highlightcolor="black")
        self.Generate.configure(pady="0")
        self.Generate.configure(takefocus="0")
        self.Generate.configure(text='''Generate Artificial Sample''')

        self.ArtificialOutButton = tk.Button(self.TNotebook1_t6, command =self.artificial_out)
        self.ArtificialOutButton.place(relx=0.838, rely=0.9, height=34, width=158)
        self.ArtificialOutButton.configure(activebackground="#ececec")
        self.ArtificialOutButton.configure(activeforeground="#000000")
        self.ArtificialOutButton.configure(background="#ffae21")
        self.ArtificialOutButton.configure(disabledforeground="#a3a3a3")
        self.ArtificialOutButton.configure(foreground="#000000")
        self.ArtificialOutButton.configure(highlightbackground="#d9d9d9")
        self.ArtificialOutButton.configure(highlightcolor="black")
        self.ArtificialOutButton.configure(pady="0")
        self.ArtificialOutButton.configure(takefocus="0")
        self.ArtificialOutButton.configure(text='''Export Artificial Sample''')
        
        self.random_seed_label = tk.Label(self.TNotebook1_t6)
        self.random_seed_label.place(relx=0.42, rely=0.7, height=20, width=150)
        self.random_seed_label.configure(activebackground="#f9f9f9")
        self.random_seed_label.configure(activeforeground="black")
        self.random_seed_label.configure(background="#86bad8")
        self.random_seed_label.configure(disabledforeground="#a3a3a3")
        self.random_seed_label.configure(foreground="#000000")
        self.random_seed_label.configure(highlightbackground="#d9d9d9")
        self.random_seed_label.configure(highlightcolor="black")
        self.random_seed_label.configure(justify='left')
        self.random_seed_label.configure(text='''random seed''')
        
        self.random_seed = tk.Entry(self.TNotebook1_t6)
        self.random_seed.place(relx=0.54, rely=0.7, height=20, width=50)
        self.random_seed.configure(background="white")
        self.random_seed.configure(disabledforeground="#a3a3a3")
        self.random_seed.configure(font="TkFixedFont")
        self.random_seed.configure(foreground="#000000")
        self.random_seed.configure(highlightbackground="#d9d9d9")
        self.random_seed.configure(highlightcolor="black")
        self.random_seed.configure(insertbackground="black")
        self.random_seed.configure(selectbackground="#c4c4c4")
        self.random_seed.configure(selectforeground="black")
        self.random_seed.configure(takefocus="0")
        self.random_seed.insert('end',1234)
        
        self.use_rand_val=IntVar(self.TNotebook1_t6)
        self.use_rand_val.set(0)
        self.use_rand = tk.Checkbutton(self.TNotebook1_t6, anchor='w')
        self.use_rand.place(relx=0.45, rely=0.77, height=40, width=150)
        self.use_rand.configure(activebackground="#86bad8")
        self.use_rand.configure(activeforeground="#000000")
        self.use_rand.configure(background="#86bad8")
        self.use_rand.configure(disabledforeground="#86bad8")
        self.use_rand.configure(foreground="#000000")
        self.use_rand.configure(highlightbackground="#86bad8")
        self.use_rand.configure(highlightcolor="#000000")
        self.use_rand.configure(justify='left')
        self.use_rand.configure(takefocus="0")
        self.use_rand.configure(text='''Use Random \n Sample''')
        self.use_rand.configure(variable=self.use_rand_val)

        
        self.ResetRandom = tk.Button(self.TNotebook1_t6, command =self.reset_random)
        self.ResetRandom.place(relx=0.838, rely=0.8, height=34, width=158)
        self.ResetRandom.configure(activebackground="#ececec")
        self.ResetRandom.configure(activeforeground="#000000")
        self.ResetRandom.configure(background="red")
        self.ResetRandom.configure(disabledforeground="#a3a3a3")
        self.ResetRandom.configure(foreground="#000000")
        self.ResetRandom.configure(highlightbackground="red")
        self.ResetRandom.configure(highlightcolor="black")
        self.ResetRandom.configure(pady="0")
        self.ResetRandom.configure(takefocus="0")
        self.ResetRandom.configure(text='''Reset Artificial Sample''')

        self.Label1_38 = tk.Label(self.TNotebook1_t6)
        self.Label1_38.place(relx=0.917, rely=0.3, height=21, width=79)
        self.Label1_38.configure(activebackground="#f9f9f9")
        self.Label1_38.configure(activeforeground="black")
        self.Label1_38.configure(background="#86bad8")
        self.Label1_38.configure(disabledforeground="#a3a3a3")
        self.Label1_38.configure(foreground="#000000")
        self.Label1_38.configure(highlightbackground="#d9d9d9")
        self.Label1_38.configure(highlightcolor="black")
        self.Label1_38.configure(justify='left')
        self.Label1_38.configure(text='''Distribution''')

        self.Label1_46 = tk.Label(self.TNotebook1_t6)
        self.Label1_46.place(relx=0.917, rely=0.4, height=21, width=79)
        self.Label1_46.configure(activebackground="#f9f9f9")
        self.Label1_46.configure(activeforeground="black")
        self.Label1_46.configure(background="#86bad8")
        self.Label1_46.configure(disabledforeground="#a3a3a3")
        self.Label1_46.configure(foreground="#000000")
        self.Label1_46.configure(highlightbackground="#d9d9d9")
        self.Label1_46.configure(highlightcolor="black")
        self.Label1_46.configure(justify='left')
        self.Label1_46.configure(text='''Distribution''')

        self.Label1_54 = tk.Label(self.TNotebook1_t6)
        self.Label1_54.place(relx=0.917, rely=0.5, height=21, width=79)
        self.Label1_54.configure(activebackground="#f9f9f9")
        self.Label1_54.configure(activeforeground="black")
        self.Label1_54.configure(background="#86bad8")
        self.Label1_54.configure(disabledforeground="#a3a3a3")
        self.Label1_54.configure(foreground="#000000")
        self.Label1_54.configure(highlightbackground="#d9d9d9")
        self.Label1_54.configure(highlightcolor="black")
        self.Label1_54.configure(justify='left')
        self.Label1_54.configure(text='''Distribution''')

        self.Label1_62 = tk.Label(self.TNotebook1_t6)
        self.Label1_62.place(relx=0.917, rely=0.6, height=21, width=79)
        self.Label1_62.configure(activebackground="#f9f9f9")
        self.Label1_62.configure(activeforeground="black")
        self.Label1_62.configure(background="#86bad8")
        self.Label1_62.configure(disabledforeground="#a3a3a3")
        self.Label1_62.configure(foreground="#000000")
        self.Label1_62.configure(highlightbackground="#d9d9d9")
        self.Label1_62.configure(highlightcolor="black")
        self.Label1_62.configure(justify='left')
        self.Label1_62.configure(text='''Distribution''')

        self.c1_dist_val=StringVar(self.TNotebook1_t6)
        self.c1_dist_val.set('Uniform')
        self.c1_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c1_dist.place(relx=0.922, rely=0.14, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c1_dist.configure(values=self.value_list)
        self.c1_dist.configure(textvariable=self.c1_dist_val)

        self.c2_dist_val=StringVar(self.TNotebook1_t6)
        self.c2_dist_val.set('Uniform')
        self.c2_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c2_dist.place(relx=0.922, rely=0.24, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c2_dist.configure(values=self.value_list)
        self.c2_dist.configure(textvariable=self.c2_dist_val)


        self.c3_dist_val=StringVar(self.TNotebook1_t6)
        self.c3_dist_val.set('Uniform')
        self.c3_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c3_dist.place(relx=0.922, rely=0.34, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c3_dist.configure(values=self.value_list)
        self.c3_dist.configure(takefocus="")
        self.c3_dist.configure(textvariable=self.c3_dist_val)

        self.c4_dist_val=StringVar(self.TNotebook1_t6)
        self.c4_dist_val.set('Uniform')
        self.c4_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c4_dist.place(relx=0.922, rely=0.44, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c4_dist.configure(values=self.value_list)
        self.c4_dist.configure(textvariable=self.c4_dist_val)

        self.c5_dist_val=StringVar(self.TNotebook1_t6)
        self.c5_dist_val.set('Uniform')
        self.c5_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c5_dist.place(relx=0.922, rely=0.54, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c5_dist.configure(values=self.value_list)
        self.c5_dist.configure(textvariable=self.c5_dist_val)

        self.c6_dist_val=StringVar(self.TNotebook1_t6)
        self.c6_dist_val.set('Uniform')
        self.c6_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c6_dist.place(relx=0.922, rely=0.64, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c6_dist.configure(values=self.value_list)
        self.c6_dist.configure(textvariable=self.c6_dist_val)

        self.c1_xmin = tk.Entry(self.TNotebook1_t6)
        self.c1_xmin.place(relx=0.665, rely=0.125,height=20, relwidth=0.05)
        self.c1_xmin.configure(background="white")
        self.c1_xmin.configure(disabledforeground="#a3a3a3")
        self.c1_xmin.configure(font="TkFixedFont")
        self.c1_xmin.configure(foreground="#000000")
        self.c1_xmin.configure(highlightbackground="#d9d9d9")
        self.c1_xmin.configure(highlightcolor="black")
        self.c1_xmin.configure(insertbackground="black")
        self.c1_xmin.configure(selectbackground="#c4c4c4")
        self.c1_xmin.configure(selectforeground="black")
        self.c1_xmin.configure(takefocus="0")

        self.c1_xmax = tk.Entry(self.TNotebook1_t6)
        self.c1_xmax.place(relx=0.76, rely=0.125,height=20, relwidth=0.05)
        self.c1_xmax.configure(background="white")
        self.c1_xmax.configure(disabledforeground="#a3a3a3")
        self.c1_xmax.configure(font="TkFixedFont")
        self.c1_xmax.configure(foreground="#000000")
        self.c1_xmax.configure(highlightbackground="#d9d9d9")
        self.c1_xmax.configure(highlightcolor="black")
        self.c1_xmax.configure(insertbackground="black")
        self.c1_xmax.configure(selectbackground="#c4c4c4")
        self.c1_xmax.configure(selectforeground="black")
        self.c1_xmax.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.461, rely=0.183, relwidth=0.539)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.304, rely=0.092, relwidth=0.696)
        self.TSeparator1.configure(takefocus="0")



################################################################################
################################################################################
################################################################################


        self.PreviewCanvas = tk.Canvas(self.TNotebook1_t0)
        self.PreviewCanvas.place(relx=0.47, rely=0.035, relheight=0.8
                , relwidth=0.525)
        self.PreviewCanvas.configure(background="#d9d9d9")
        self.PreviewCanvas.configure(borderwidth="2")
        self.PreviewCanvas.configure(highlightbackground="#d9d9d9")
        self.PreviewCanvas.configure(highlightcolor="black")
        self.PreviewCanvas.configure(insertbackground="black")
        self.PreviewCanvas.configure(relief='ridge')
        self.PreviewCanvas.configure(selectbackground="#c4c4c4")
        self.PreviewCanvas.configure(selectforeground="black")
        self.PreviewCanvas.configure(width=283)
#        tkagg.NavigationToolbar2Tk(self.PreviewCanvas, self.TNotebook1_t0)
        
        self.PreviewGrid = tk.Button(self.TNotebook1_t0, command=self.plot_bin_spin)
        self.PreviewGrid.place(relx=0.157, rely=0.567, height=54, width=147)
        self.PreviewGrid.configure(activebackground="#ececec")
        self.PreviewGrid.configure(activeforeground="#000000")
        self.PreviewGrid.configure(background="#ffae21")
        self.PreviewGrid.configure(disabledforeground="#a3a3a3")
        self.PreviewGrid.configure(foreground="#000000")
        self.PreviewGrid.configure(highlightbackground="#d9d9d9")
        self.PreviewGrid.configure(highlightcolor="black")
        self.PreviewGrid.configure(pady="0")
        self.PreviewGrid.configure(takefocus="0")
        self.PreviewGrid.configure(text='''Preview Grid''')

        self.Label17 = tk.Label(self.TNotebook1_t0)
        self.Label17.place(relx=0.245, rely=0.442, height=21, width=54)
        self.Label17.configure(activebackground="#f9f9f9")
        self.Label17.configure(activeforeground="black")
        self.Label17.configure(background="#b5b5b5")
        self.Label17.configure(disabledforeground="#a3a3a3")
        self.Label17.configure(foreground="#000000")
        self.Label17.configure(highlightbackground="#d9d9d9")
        self.Label17.configure(highlightcolor="black")
        self.Label17.configure(justify='right')
        self.Label17.configure(relief='groove')

###############################################################################
        ########################################################################
        self.current_filename=tk.StringVar(self.TNotebook1_t0, value='')
        self.current_filename.set('Your Filename Here')  
#        self.current_filename.set('U:/PLAN/BCUBRICH/Python/Fracture MODO/sample.txt')  
#        self.load_file()
        self.CurrentSampleFile = tk.Entry(self.TNotebook1_t0,textvariable=self.current_filename)
###############################################################################
        self.CurrentSampleFile.place(relx=0.01, rely=0.95, height=21, width=434)
        self.CurrentSampleFile.configure(background="#b5b5b5")
        self.CurrentSampleFile.configure(foreground="#000000")
        self.CurrentSampleFile.configure(justify='right')
        self.CurrentSampleFile.configure(relief='groove')

        self.Get_Theta = tk.Button(self.TNotebook1_t0, command=self.recommend_theta)
        self.Get_Theta.place(relx=0.201, rely=0.458, height=15, width=24)
        self.Get_Theta.configure(activebackground="#ececec")
        self.Get_Theta.configure(activeforeground="#000000")
        self.Get_Theta.configure(background="#ffae21")
        self.Get_Theta.configure(disabledforeground="#a3a3a3")
        self.Get_Theta.configure(font=font14)
        self.Get_Theta.configure(foreground="#000000")
        self.Get_Theta.configure(highlightbackground="#d9d9d9")
        self.Get_Theta.configure(highlightcolor="black")
        self.Get_Theta.configure(pady="0")
        self.Get_Theta.configure(text='''GET''')


###############################################################################
        #added frame for toolbars
        self.tab1_frame = tk.Frame(self.TNotebook1_t1)
        self.tab1_beta_frame = tk.Frame(self.TNotebook1_t1)
###############################################################################
###############################################################################
        #added frame for toolbars
        self.tab2_mult_frame = tk.Frame(self.TNotebook1_t2)
        self.tab2_beta_frame = tk.Frame(self.TNotebook1_t2)
###############################################################################
        
        
        self.Mult_Contour = tk.Canvas(self.TNotebook1_t1)
        self.Mult_Contour.place(relx=0.52, rely=0.283, relheight=0.65
                , relwidth=0.454)
        self.Mult_Contour.configure(background="#d9d9d9")
        self.Mult_Contour.configure(borderwidth="2")
        self.Mult_Contour.configure(highlightbackground="#d9d9d9")
        self.Mult_Contour.configure(highlightcolor="black")
        self.Mult_Contour.configure(insertbackground="black")
        self.Mult_Contour.configure(relief='ridge')
        self.Mult_Contour.configure(selectbackground="#c4c4c4")
        self.Mult_Contour.configure(selectforeground="black")
        self.Mult_Contour.configure(takefocus="0")
        self.Mult_Contour.configure(width=463)

        self.BetaContCanvas = tk.Canvas(self.TNotebook1_t1)
        self.BetaContCanvas.place(relx=0.02, rely=0.283, relheight=0.65
                , relwidth=0.454)
        self.BetaContCanvas.configure(background="#d9d9d9")
        self.BetaContCanvas.configure(borderwidth="2")
        self.BetaContCanvas.configure(highlightbackground="#d9d9d9")
        self.BetaContCanvas.configure(highlightcolor="black")
        self.BetaContCanvas.configure(insertbackground="black")
        self.BetaContCanvas.configure(relief='ridge')
        self.BetaContCanvas.configure(selectbackground="#c4c4c4")
        self.BetaContCanvas.configure(selectforeground="black")
        self.BetaContCanvas.configure(takefocus="0")
        self.BetaContCanvas.configure(width=463)
        
        self.Artificial_Sample_Canvas = tk.Canvas(self.TNotebook1_t6)
        self.Artificial_Sample_Canvas.place(relx=0, rely=0.1, relheight=0.8
                , relwidth=0.425)
        self.Artificial_Sample_Canvas.configure(background="#d9d9d9")
        self.Artificial_Sample_Canvas.configure(borderwidth="2")
        self.Artificial_Sample_Canvas.configure(highlightbackground="#d9d9d9")
        self.Artificial_Sample_Canvas.configure(highlightcolor="black")
        self.Artificial_Sample_Canvas.configure(insertbackground="black")
        self.Artificial_Sample_Canvas.configure(relief='ridge')
        self.Artificial_Sample_Canvas.configure(selectbackground="#c4c4c4")
        self.Artificial_Sample_Canvas.configure(selectforeground="black")
        self.Artificial_Sample_Canvas.configure(takefocus="0")
        self.Artificial_Sample_Canvas.configure(width=463)

        self.Update_Plots_mult1 = tk.Button(self.TNotebook1_t1)
        self.Update_Plots_mult1.place(relx=0.059, rely=0.183, height=24
                , width=49)
        self.Update_Plots_mult1.configure(activebackground="#ececec")
        self.Update_Plots_mult1.configure(activeforeground="#000000")
        self.Update_Plots_mult1.configure(background="#ffae21")
        self.Update_Plots_mult1.configure(disabledforeground="#a3a3a3")
        self.Update_Plots_mult1.configure(foreground="#000000")
        self.Update_Plots_mult1.configure(highlightbackground="#d9d9d9")
        self.Update_Plots_mult1.configure(highlightcolor="black")
        self.Update_Plots_mult1.configure(pady="0")
        self.Update_Plots_mult1.configure(takefocus="0")
        self.Update_Plots_mult1.configure(text='''Update''')

#        self.Export_m1 = tk.Button(self.TNotebook1_t1)
#        self.Export_m1.place(relx=0.059, rely=0.233, height=24, width=49)
#        self.Export_m1.configure(activebackground="#ececec")
#        self.Export_m1.configure(activeforeground="#000000")
#        self.Export_m1.configure(background="#ffae21")
#        self.Export_m1.configure(disabledforeground="#a3a3a3")
#        self.Export_m1.configure(foreground="#000000")
#        self.Export_m1.configure(highlightbackground="#d9d9d9")
#        self.Export_m1.configure(highlightcolor="black")
#        self.Export_m1.configure(pady="0")
#        self.Export_m1.configure(takefocus="0")
#        self.Export_m1.configure(text='''Export''')

        self.Update_Plots_mult2 = tk.Button(self.TNotebook1_t1,command=self.update_mult)
        self.Update_Plots_mult2.place(relx=0.539, rely=0.175, height=24
                , width=49)
        self.Update_Plots_mult2.configure(activebackground="#ececec")
        self.Update_Plots_mult2.configure(activeforeground="#000000")
        self.Update_Plots_mult2.configure(background="#ffae21")
        self.Update_Plots_mult2.configure(disabledforeground="#a3a3a3")
        self.Update_Plots_mult2.configure(foreground="#000000")
        self.Update_Plots_mult2.configure(highlightbackground="#d9d9d9")
        self.Update_Plots_mult2.configure(highlightcolor="black")
        self.Update_Plots_mult2.configure(pady="0")
        self.Update_Plots_mult2.configure(takefocus="0")
        self.Update_Plots_mult2.configure(text='''Update''')
#
#        self.Export_m2 = tk.Button(self.TNotebook1_t1)
#        self.Export_m2.place(relx=0.539, rely=0.225, height=24, width=49)
#        self.Export_m2.configure(activebackground="#ececec")
#        self.Export_m2.configure(activeforeground="#000000")
#        self.Export_m2.configure(background="#ffae21")
#        self.Export_m2.configure(disabledforeground="#a3a3a3")
#        self.Export_m2.configure(foreground="#000000")
#        self.Export_m2.configure(highlightbackground="#d9d9d9")
#        self.Export_m2.configure(highlightcolor="black")
#        self.Export_m2.configure(pady="0")
#        self.Export_m2.configure(takefocus="0")
#        self.Export_m2.configure(text='''Export''')

        self.Label2_7 = tk.Label(self.TNotebook1_t1)
        self.Label2_7.place(relx=0.029, rely=0.017, height=31, width=216)
        self.Label2_7.configure(activebackground="#f9f9f9")
        self.Label2_7.configure(activeforeground="black")
        self.Label2_7.configure(background="#86bad8")
        self.Label2_7.configure(disabledforeground="#a3a3a3")
        self.Label2_7.configure(font=font13)
        self.Label2_7.configure(foreground="#000000")
        self.Label2_7.configure(highlightbackground="#d9d9d9")
        self.Label2_7.configure(highlightcolor="black")
        self.Label2_7.configure(text='''Beta Contour Settings''')

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t1)
        self.TSeparator1.place(relx=0.025, rely=0.067, relwidth=0.225)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator3 = ttk.Separator(self.TNotebook1_t1)
        self.TSeparator3.place(relx=0.495, rely=-0.017, relheight=1.0)
        self.TSeparator3.configure(orient="vertical")
        self.TSeparator3.configure(takefocus="0")

        self.Label2_1 = tk.Label(self.TNotebook1_t1)
        self.Label2_1.place(relx=0.025, rely=0.083, height=21, width=64)
        self.Label2_1.configure(activebackground="#f9f9f9")
        self.Label2_1.configure(activeforeground="black")
        self.Label2_1.configure(background="#86bad8")
        self.Label2_1.configure(disabledforeground="#a3a3a3")
        self.Label2_1.configure(foreground="#000000")
        self.Label2_1.configure(highlightbackground="#d9d9d9")
        self.Label2_1.configure(highlightcolor="black")
        self.Label2_1.configure(text='''Color Ramp''')

        self.Label2_6 = tk.Label(self.TNotebook1_t1)
        self.Label2_6.place(relx=0.52, rely=0.083, height=21, width=64)
        self.Label2_6.configure(activebackground="#f9f9f9")
        self.Label2_6.configure(activeforeground="black")
        self.Label2_6.configure(background="#86bad8")
        self.Label2_6.configure(disabledforeground="#a3a3a3")
        self.Label2_6.configure(foreground="#000000")
        self.Label2_6.configure(highlightbackground="#d9d9d9")
        self.Label2_6.configure(highlightcolor="black")
        self.Label2_6.configure(text='''Color Ramp''')

        self.Label2_8 = tk.Label(self.TNotebook1_t1)
        self.Label2_8.place(relx=0.52, rely=0.017, height=31, width=256)
        self.Label2_8.configure(activebackground="#f9f9f9")
        self.Label2_8.configure(activeforeground="black")
        self.Label2_8.configure(background="#86bad8")
        self.Label2_8.configure(disabledforeground="#a3a3a3")
        self.Label2_8.configure(font=font13)
        self.Label2_8.configure(foreground="#000000")
        self.Label2_8.configure(highlightbackground="#d9d9d9")
        self.Label2_8.configure(highlightcolor="black")
        self.Label2_8.configure(text='''Multinomial Contour Settings''')
        
        self.TSeparator1 = ttk.Separator(self.TNotebook1_t1)
        self.TSeparator1.place(relx=0.525, rely=0.075, relwidth=0.245)
        self.TSeparator1.configure(takefocus="0")
        
        self.user_mult_cmap=StringVar(self.TNotebook1_t1, value='gnuplot2')
        self.user_mult_cmap.trace('w',self.mult_cont_cmap)
        self.mult_cont_cmap = ttk.Combobox(self.TNotebook1_t1, textvariable=self.user_mult_cmap,values=self.cmaps)
        self.mult_cont_cmap.place(relx=0.52, rely=0.117, relheight=0.035
                , relwidth=0.101)

        self.user_beta_cmap=StringVar(self.TNotebook1_t1, value='gnuplot2')
        self.user_beta_cmap.trace('w',self.beta_cont_cmap)        
        self.beta_cont_cmap = ttk.Combobox(self.TNotebook1_t1, textvariable=self.user_beta_cmap,values=self.cmaps)
        self.beta_cont_cmap.place(relx=0.029, rely=0.117, relheight=0.035
                , relwidth=0.111)
        
###############################################################################
#                          Added slider for multinomial strike size
##############################################################################
        
        
        self.mult_strike_scale = tk.Scale(self.TNotebook1_t1, from_=1, to=100, command=self.mult_strike_size)
        self.mult_strike_scale.place(relx=0.65, rely=0.08, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.mult_strike_scale.configure(activebackground="#86bad8")
        self.mult_strike_scale.configure(background="#86bad8")
        self.mult_strike_scale.configure(font="TkTextFont")
        self.mult_strike_scale.configure(foreground="#000000")
        self.mult_strike_scale.configure(highlightbackground="#86bad8")
        self.mult_strike_scale.configure(highlightcolor="black")
        self.mult_strike_scale.configure(label="Strike Marker Size")
        self.mult_strike_scale.configure(orient="horizontal")
        self.mult_strike_scale.configure(takefocus="0")
        self.mult_strike_scale.configure(troughcolor="#f2f2f2")


        
###############################################################################
#            Added slider for multinomial point size scale on point plot
##############################################################################
        
        
        self.mult_point_scale = tk.Scale(self.TNotebook1_t2, from_=1, to=100, command=self.mult_point_size)
        self.mult_point_scale.place(relx=0.65, rely=0.08, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.mult_point_scale.configure(activebackground="#86bad8")
        self.mult_point_scale.configure(background="#86bad8")
        self.mult_point_scale.configure(font="TkTextFont")
        self.mult_point_scale.configure(foreground="#000000")
        self.mult_point_scale.configure(highlightbackground="#86bad8")
        self.mult_point_scale.configure(highlightcolor="black")
        self.mult_point_scale.configure(label="point Marker Size")
        self.mult_point_scale.configure(orient="horizontal")
        self.mult_point_scale.configure(takefocus="0")
        self.mult_point_scale.configure(troughcolor="#f2f2f2")



###############################################################################
#                          Added slider for  betastrike size
##############################################################################
        
        
        self.beta_strike_scale = tk.Scale(self.TNotebook1_t1, from_=1, to=100, command=self.beta_strike_size)
        self.beta_strike_scale.place(relx=0.167, rely=0.08, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.beta_strike_scale.configure(activebackground="#86bad8")
        self.beta_strike_scale.configure(background="#86bad8")
        self.beta_strike_scale.configure(font="TkTextFont")
        self.beta_strike_scale.configure(foreground="#000000")
        self.beta_strike_scale.configure(highlightbackground="#86bad8")
        self.beta_strike_scale.configure(highlightcolor="black")
        self.beta_strike_scale.configure(label="Strike Marker Size")
        self.beta_strike_scale.configure(orient="horizontal")
        self.beta_strike_scale.configure(takefocus="0")
        self.beta_strike_scale.configure(troughcolor="#f2f2f2")
                                         
###############################################################################
#             7/10/20 Added slider for  betastrike size
##############################################################################
        
        
        self.beta_strike_scale = tk.Scale(self.TNotebook1_t2, from_=1, to=100, command=self.beta_point_size)
        self.beta_strike_scale.place(relx=0.167, rely=0.08, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.beta_strike_scale.configure(activebackground="#86bad8")
        self.beta_strike_scale.configure(background="#86bad8")
        self.beta_strike_scale.configure(font="TkTextFont")
        self.beta_strike_scale.configure(foreground="#000000")
        self.beta_strike_scale.configure(highlightbackground="#86bad8")
        self.beta_strike_scale.configure(highlightcolor="black")
        self.beta_strike_scale.configure(label="Strike Marker Size")
        self.beta_strike_scale.configure(orient="horizontal")
        self.beta_strike_scale.configure(takefocus="0")
        self.beta_strike_scale.configure(troughcolor="#f2f2f2")



##############################################################################
##############################################################################

        self.Label2_3 = tk.Label(self.TNotebook1_t1)
        self.Label2_3.place(relx=0.289, rely=0.11, height=21, width=64)
        self.Label2_3.configure(activebackground="#f9f9f9")
        self.Label2_3.configure(activeforeground="black")
        self.Label2_3.configure(background="#86bad8")
        self.Label2_3.configure(disabledforeground="#a3a3a3")
        self.Label2_3.configure(foreground="#000000")
        self.Label2_3.configure(highlightbackground="#d9d9d9")
        self.Label2_3.configure(highlightcolor="black")
        self.Label2_3.configure(text='''Chart Title''')

        self.beta_chart_title = tk.Entry(self.TNotebook1_t1)
        self.beta_chart_title.place(relx=0.289, rely=0.14, height=20
                , relwidth=0.112)
        self.beta_chart_title.configure(background="white")
        self.beta_chart_title.configure(disabledforeground="#a3a3a3")
        self.beta_chart_title.configure(font=font10)
        self.beta_chart_title.configure(foreground="#000000")
        self.beta_chart_title.configure(highlightbackground="#d9d9d9")
        self.beta_chart_title.configure(highlightcolor="black")
        self.beta_chart_title.configure(insertbackground="black")
        self.beta_chart_title.configure(selectbackground="#c4c4c4")
        self.beta_chart_title.configure(selectforeground="black")
        self.beta_chart_title.configure(takefocus="0")

        self.label2_4 = tk.Label(self.TNotebook1_t1)
        self.label2_4.place(relx=0.167, rely=0.19, height=21, width=44)
        self.label2_4.configure(activebackground="#f9f9f9")
        self.label2_4.configure(activeforeground="black")
        self.label2_4.configure(background="#86bad8")
        self.label2_4.configure(borderwidth="0")
        self.label2_4.configure(disabledforeground="#a3a3a3")
        self.label2_4.configure(foreground="#000000")
        self.label2_4.configure(highlightbackground="#d9d9d9")
        self.label2_4.configure(highlightcolor="black")
        self.label2_4.configure(text='''X Label''')

        self.beta_chart_x_name = tk.Entry(self.TNotebook1_t1)
        self.beta_chart_x_name.place(relx=0.162, rely=0.23, height=20
                , relwidth=0.112)
        self.beta_chart_x_name.configure(background="white")
        self.beta_chart_x_name.configure(disabledforeground="#a3a3a3")
        self.beta_chart_x_name.configure(font=font10)
        self.beta_chart_x_name.configure(foreground="#000000")
        self.beta_chart_x_name.configure(highlightbackground="#d9d9d9")
        self.beta_chart_x_name.configure(highlightcolor="black")
        self.beta_chart_x_name.configure(insertbackground="black")
        self.beta_chart_x_name.configure(selectbackground="#c4c4c4")
        self.beta_chart_x_name.configure(selectforeground="black")
        self.beta_chart_x_name.configure(takefocus="0")

#        self.beta_chart_x_name = tk.Entry(self.TNotebook1_t1)
#        self.beta_chart_x_name.place(relx=0.289, rely=0.192, height=20
#                , relwidth=0.112)
#        self.beta_chart_x_name.configure(background="white")
#        self.beta_chart_x_name.configure(disabledforeground="#a3a3a3")
#        self.beta_chart_x_name.configure(font=font10)
#        self.beta_chart_x_name.configure(foreground="#000000")
#        self.beta_chart_x_name.configure(highlightbackground="#d9d9d9")
#        self.beta_chart_x_name.configure(highlightcolor="black")
#        self.beta_chart_x_name.configure(insertbackground="black")
#        self.beta_chart_x_name.configure(selectbackground="#c4c4c4")
#        self.beta_chart_x_name.configure(selectforeground="black")
#        self.beta_chart_x_name.configure(takefocus="0")

        self.beta_chart_y_label = tk.Entry(self.TNotebook1_t1)
        self.beta_chart_y_label.place(relx=0.289, rely=0.23, height=20
                , relwidth=0.112)
        self.beta_chart_y_label.configure(background="white")
        self.beta_chart_y_label.configure(disabledforeground="#a3a3a3")
        self.beta_chart_y_label.configure(font=font10)
        self.beta_chart_y_label.configure(foreground="#000000")
        self.beta_chart_y_label.configure(highlightbackground="#d9d9d9")
        self.beta_chart_y_label.configure(highlightcolor="black")
        self.beta_chart_y_label.configure(insertbackground="black")
        self.beta_chart_y_label.configure(selectbackground="#c4c4c4")
        self.beta_chart_y_label.configure(selectforeground="black")
        self.beta_chart_y_label.configure(takefocus="0")

        self.label2_5 = tk.Label(self.TNotebook1_t1)
        self.label2_5.place(relx=0.294, rely=0.19, height=21, width=44)
        self.label2_5.configure(activebackground="#f9f9f9")
        self.label2_5.configure(activeforeground="black")
        self.label2_5.configure(background="#86bad8")
        self.label2_5.configure(disabledforeground="#a3a3a3")
        self.label2_5.configure(foreground="#000000")
        self.label2_5.configure(highlightbackground="#d9d9d9")
        self.label2_5.configure(highlightcolor="black")
        self.label2_5.configure(text='''Y Label''')
        
        
        self.beta_chart_axis_label_val=IntVar(self.TNotebook1_t1)
        self.beta_chart_axis_label_val.set(1)
        self.beta_chart_axis_labels = tk.Checkbutton(self.TNotebook1_t1)
        self.beta_chart_axis_labels.place(relx=0.02, rely=0.233, relheight=0.042
                , relwidth=0.083)
        self.beta_chart_axis_labels.configure(activebackground="#ececec")
        self.beta_chart_axis_labels.configure(activeforeground="#000000")
        self.beta_chart_axis_labels.configure(background="#86bad8")
        self.beta_chart_axis_labels.configure(disabledforeground="#a3a3a3")
        self.beta_chart_axis_labels.configure(foreground="#000000")
        self.beta_chart_axis_labels.configure(highlightbackground="#d9d9d9")
        self.beta_chart_axis_labels.configure(highlightcolor="black")
        self.beta_chart_axis_labels.configure(justify='left')
        self.beta_chart_axis_labels.configure(takefocus="0")
        self.beta_chart_axis_labels.configure(text='''Axis Labels''')
        self.beta_chart_axis_labels.configure(variable=self.beta_chart_axis_label_val)

        self.label2_9 = tk.Label(self.TNotebook1_t1)
        self.label2_9.place(relx=0.775, rely=0.1, height=22, width=64)
        self.label2_9.configure(activebackground="#f9f9f9")
        self.label2_9.configure(activeforeground="black")
        self.label2_9.configure(background="#86bad8")
        self.label2_9.configure(disabledforeground="#a3a3a3")
        self.label2_9.configure(foreground="#000000")
        self.label2_9.configure(highlightbackground="#d9d9d9")
        self.label2_9.configure(highlightcolor="black")
        self.label2_9.configure(text='''Chart Title''')

        self.mult_cont_title = tk.Entry(self.TNotebook1_t1)
        self.mult_cont_title.place(relx=0.779, rely=0.14, height=20
                , relwidth=0.112)
        self.mult_cont_title.configure(background="white")
        self.mult_cont_title.configure(disabledforeground="#a3a3a3")
        self.mult_cont_title.configure(font=font10)
        self.mult_cont_title.configure(foreground="#000000")
        self.mult_cont_title.configure(highlightbackground="#d9d9d9")
        self.mult_cont_title.configure(highlightcolor="black")
        self.mult_cont_title.configure(insertbackground="black")
        self.mult_cont_title.configure(selectbackground="#c4c4c4")
        self.mult_cont_title.configure(selectforeground="black")
        self.mult_cont_title.configure(takefocus="0")

        self.mult_cont_y_label = tk.Entry(self.TNotebook1_t1)
        self.mult_cont_y_label.place(relx=0.779, rely=0.225, height=20
                , relwidth=0.112)
        self.mult_cont_y_label.configure(background="white")
        self.mult_cont_y_label.configure(disabledforeground="#a3a3a3")
        self.mult_cont_y_label.configure(font=font10)
        self.mult_cont_y_label.configure(foreground="#000000")
        self.mult_cont_y_label.configure(highlightbackground="#d9d9d9")
        self.mult_cont_y_label.configure(highlightcolor="black")
        self.mult_cont_y_label.configure(insertbackground="black")
        self.mult_cont_y_label.configure(selectbackground="#c4c4c4")
        self.mult_cont_y_label.configure(selectforeground="black")
        self.mult_cont_y_label.configure(takefocus="0")
        
        self.cont_max = tk.Entry(self.TNotebook1_t1)
        self.cont_max.place(relx=0.95, rely=0.19, height=20
                , relwidth=0.04)
        self.cont_max.configure(background="white")
        self.cont_max.configure(disabledforeground="#a3a3a3")
        self.cont_max.configure(font=font10)
        self.cont_max.configure(foreground="#000000")
        self.cont_max.configure(highlightbackground="#d9d9d9")
        self.cont_max.configure(highlightcolor="black")
        self.cont_max.configure(insertbackground="black")
        self.cont_max.configure(selectbackground="#c4c4c4")
        self.cont_max.configure(selectforeground="black")
        self.cont_max.configure(takefocus="0")
        
        self.cont_num = tk.Entry(self.TNotebook1_t1)
        self.cont_num.place(relx=0.95, rely=0.23, height=20
                , relwidth=0.04)
        self.cont_num.configure(background="white")
        self.cont_num.configure(disabledforeground="#a3a3a3")
        self.cont_num.configure(font=font10)
        self.cont_num.configure(foreground="#000000")
        self.cont_num.configure(highlightbackground="#d9d9d9")
        self.cont_num.configure(highlightcolor="black")
        self.cont_num.configure(insertbackground="black")
        self.cont_num.configure(selectbackground="#c4c4c4")
        self.cont_num.configure(selectforeground="black")
        self.cont_num.configure(takefocus="0")
        
        self.cont_max_label = tk.Label(self.TNotebook1_t1,anchor='w')
        self.cont_max_label.place(relx=0.91, rely=0.1875, height=21, width=30)
        self.cont_max_label.configure(activebackground="#f9f9f9")
        self.cont_max_label.configure(activeforeground="black")
        self.cont_max_label.configure(background="#86bad8")
        self.cont_max_label.configure(disabledforeground="#a3a3a3")
        self.cont_max_label.configure(foreground="#000000")
        self.cont_max_label.configure(highlightbackground="#d9d9d9")
        self.cont_max_label.configure(highlightcolor="black")
        self.cont_max_label.configure(text='''Max''')
        
        self.cont_num_label = tk.Label(self.TNotebook1_t1,anchor='w')
        self.cont_num_label.place(relx=0.91, rely=0.2275, height=21, width=30)
        self.cont_num_label.configure(activebackground="#f9f9f9")
        self.cont_num_label.configure(activeforeground="black")
        self.cont_num_label.configure(background="#86bad8")
        self.cont_num_label.configure(disabledforeground="#a3a3a3")
        self.cont_num_label.configure(foreground="#000000")
        self.cont_num_label.configure(highlightbackground="#d9d9d9")
        self.cont_num_label.configure(highlightcolor="black")
        self.cont_num_label.configure(text='''Num''')

        self.mult_cont_x_name = tk.Entry(self.TNotebook1_t1)
        self.mult_cont_x_name.place(relx=0.637, rely=0.225, height=20
                , relwidth=0.112)
        self.mult_cont_x_name.configure(background="white")
        self.mult_cont_x_name.configure(disabledforeground="#a3a3a3")
        self.mult_cont_x_name.configure(font=font10)
        self.mult_cont_x_name.configure(foreground="#000000")
        self.mult_cont_x_name.configure(highlightbackground="#d9d9d9")
        self.mult_cont_x_name.configure(highlightcolor="black")
        self.mult_cont_x_name.configure(insertbackground="black")
        self.mult_cont_x_name.configure(selectbackground="#c4c4c4")
        self.mult_cont_x_name.configure(selectforeground="black")
        self.mult_cont_x_name.configure(takefocus="0")

        self.label2_10 = tk.Label(self.TNotebook1_t1)
        self.label2_10.place(relx=0.784, rely=0.19, height=21, width=44)
        self.label2_10.configure(activebackground="#f9f9f9")
        self.label2_10.configure(activeforeground="black")
        self.label2_10.configure(background="#86bad8")
        self.label2_10.configure(disabledforeground="#a3a3a3")
        self.label2_10.configure(foreground="#000000")
        self.label2_10.configure(highlightbackground="#d9d9d9")
        self.label2_10.configure(highlightcolor="black")
        self.label2_10.configure(text='''Y Label''')

        self.label2_7 = tk.Label(self.TNotebook1_t1)
        self.label2_7.place(relx=0.647, rely=0.19, height=21, width=44)
        self.label2_7.configure(activebackground="#f9f9f9")
        self.label2_7.configure(activeforeground="black")
        self.label2_7.configure(background="#86bad8")
        self.label2_7.configure(disabledforeground="#a3a3a3")
        self.label2_7.configure(foreground="#000000")
        self.label2_7.configure(highlightbackground="#d9d9d9")
        self.label2_7.configure(highlightcolor="black")
        self.label2_7.configure(text='''X Label''')

#        self.mult_plot_rng_scale = tk.Checkbutton(self.TNotebook1_t1)
#        self.mult_plot_rng_scale.place(relx=0.25, rely=0.242, relheight=0.042
#                , relwidth=0.089)
#        self.mult_plot_rng_scale.configure(activebackground="#ececec")
#        self.mult_plot_rng_scale.configure(activeforeground="#000000")
#        self.mult_plot_rng_scale.configure(background="#86bad8")
#        self.mult_plot_rng_scale.configure(disabledforeground="#a3a3a3")
#        self.mult_plot_rng_scale.configure(foreground="#000000")
#        self.mult_plot_rng_scale.configure(highlightbackground="#d9d9d9")
#        self.mult_plot_rng_scale.configure(highlightcolor="black")
#        self.mult_plot_rng_scale.configure(justify='left')
#        self.mult_plot_rng_scale.configure(text='''Range Scale''')
#        self.mult_plot_rng_scale.configure(variable=GUI_support.che49)
        
        self.mult_cont_rng_scale_val=IntVar(self.TNotebook1_t1)
        self.mult_cont_rng_scale_val.set(1)
        
        self.mult_cont_rng_scale = tk.Radiobutton(self.TNotebook1_t1,value=0,variable=self.mult_cont_rng_scale_val,anchor='w')
        self.mult_cont_rng_scale.place(relx=0.9, rely=0.08, relheight=0.042
                , relwidth=0.089)
        self.mult_cont_rng_scale.configure(activebackground="#86bad8")
        self.mult_cont_rng_scale.configure(activeforeground="#000000")
        self.mult_cont_rng_scale.configure(background="#86bad8")
        self.mult_cont_rng_scale.configure(disabledforeground="#a3a3a3")
        self.mult_cont_rng_scale.configure(foreground="#000000")
        self.mult_cont_rng_scale.configure(highlightbackground="#d9d9d9")
        self.mult_cont_rng_scale.configure(highlightcolor="black")
        self.mult_cont_rng_scale.configure(justify='left')
        self.mult_cont_rng_scale.configure(text='''Max''')
        
        self.mult_cont_rng_scale1 = tk.Radiobutton(self.TNotebook1_t1,value=1,variable=self.mult_cont_rng_scale_val,anchor='w')
        self.mult_cont_rng_scale1.place(relx=0.9, rely=0.11, relheight=0.042
                , relwidth=0.089)
        self.mult_cont_rng_scale1.configure(activebackground="#86bad8")
        self.mult_cont_rng_scale1.configure(activeforeground="#000000")
        self.mult_cont_rng_scale1.configure(background="#86bad8")
        self.mult_cont_rng_scale1.configure(disabledforeground="#a3a3a3")
        self.mult_cont_rng_scale1.configure(foreground="#000000")
        self.mult_cont_rng_scale1.configure(highlightbackground="#d9d9d9")
        self.mult_cont_rng_scale1.configure(highlightcolor="black")
        self.mult_cont_rng_scale1.configure(justify='left')
        self.mult_cont_rng_scale1.configure(text='''Range''')

        self.mult_cont_rng_scale2 = tk.Radiobutton(self.TNotebook1_t1,value=2,variable=self.mult_cont_rng_scale_val,anchor='w')
        self.mult_cont_rng_scale2.place(relx=0.9, rely=0.14, relheight=0.042
                , relwidth=0.089)
        self.mult_cont_rng_scale2.configure(activebackground="#86bad8")
        self.mult_cont_rng_scale2.configure(activeforeground="#000000")
        self.mult_cont_rng_scale2.configure(background="#86bad8")
        self.mult_cont_rng_scale2.configure(disabledforeground="#a3a3a3")
        self.mult_cont_rng_scale2.configure(foreground="#000000")
        self.mult_cont_rng_scale2.configure(highlightbackground="#d9d9d9")
        self.mult_cont_rng_scale2.configure(highlightcolor="black")
        self.mult_cont_rng_scale2.configure(justify='left')
        self.mult_cont_rng_scale2.configure(text='''Custom''')


        self.mult_cont_axis_label_val=IntVar(self.TNotebook1_t1)
        self.mult_cont_axis_label_val.set(1)
        self.mult_cont_axis_labels = tk.Checkbutton(self.TNotebook1_t1, anchor='w')
        self.mult_cont_axis_labels.place(relx=0.52, rely=0.225, height=24, width=100)
        self.mult_cont_axis_labels.configure(activebackground="#ececec")
        self.mult_cont_axis_labels.configure(activeforeground="#000000")
        self.mult_cont_axis_labels.configure(background="#86bad8")
        self.mult_cont_axis_labels.configure(disabledforeground="#a3a3a3")
        self.mult_cont_axis_labels.configure(foreground="#000000")
        self.mult_cont_axis_labels.configure(highlightbackground="#d9d9d9")
        self.mult_cont_axis_labels.configure(highlightcolor="black")
        self.mult_cont_axis_labels.configure(justify='left')
        self.mult_cont_axis_labels.configure(takefocus="0")
        self.mult_cont_axis_labels.configure(text='''Axis Labels''')
        self.mult_cont_axis_labels.configure(variable=self.mult_cont_axis_label_val)

        self.Beta_Points = tk.Canvas(self.TNotebook1_t2)
        self.Beta_Points.place(relx=0.02, rely=0.283, relheight=0.65
                , relwidth=0.454)
        self.Beta_Points.configure(background="#d9d9d9")
        self.Beta_Points.configure(borderwidth="2")
        self.Beta_Points.configure(highlightbackground="#d9d9d9")
        self.Beta_Points.configure(highlightcolor="black")
        self.Beta_Points.configure(insertbackground="black")
        self.Beta_Points.configure(relief='ridge')
        self.Beta_Points.configure(selectbackground="#c4c4c4")
        self.Beta_Points.configure(selectforeground="black")
        self.Beta_Points.configure(takefocus="0")
        self.Beta_Points.configure(width=463)

        self.Mult_Points = tk.Canvas(self.TNotebook1_t2)
        self.Mult_Points.place(relx=0.52, rely=0.283, relheight=0.65,
                               relwidth=0.454)
        self.Mult_Points.configure(background="#d9d9d9")
        self.Mult_Points.configure(borderwidth="2")
        self.Mult_Points.configure(highlightbackground="#d9d9d9")
        self.Mult_Points.configure(highlightcolor="black")
        self.Mult_Points.configure(insertbackground="black")
        self.Mult_Points.configure(relief='ridge')
        self.Mult_Points.configure(selectbackground="#c4c4c4")
        self.Mult_Points.configure(selectforeground="black")
        self.Mult_Points.configure(takefocus="0")
        self.Mult_Points.configure(width=463)

        self.TSeparator3 = ttk.Separator(self.TNotebook1_t2)
        self.TSeparator3.place(relx=0.495, rely=-0.017, relheight=1.0)
        self.TSeparator3.configure(orient="vertical")
        self.TSeparator3.configure(takefocus="0")

        self.Label3betaplot = tk.Label(self.TNotebook1_t2)
        self.Label3betaplot.place(relx=0.01, rely=0.017, height=31, width=156)
        self.Label3betaplot.configure(activebackground="#f9f9f9")
        self.Label3betaplot.configure(activeforeground="black")
        self.Label3betaplot.configure(background="#86bad8")
        self.Label3betaplot.configure(disabledforeground="#a3a3a3")
        self.Label3betaplot.configure(font=font13)
        self.Label3betaplot.configure(foreground="#000000")
        self.Label3betaplot.configure(highlightbackground="#d9d9d9")
        self.Label3betaplot.configure(highlightcolor="black")
        self.Label3betaplot.configure(text='''Beta Plot Settings''')

        self.Label3betacont = tk.Label(self.TNotebook1_t2)
        self.Label3betacont.place(relx=0.51, rely=0.017, height=31, width=206)
        self.Label3betacont.configure(activebackground="#f9f9f9")
        self.Label3betacont.configure(activeforeground="black")
        self.Label3betacont.configure(background="#86bad8")
        self.Label3betacont.configure(disabledforeground="#a3a3a3")
        self.Label3betacont.configure(font=font13)
        self.Label3betacont.configure(foreground="#000000")
        self.Label3betacont.configure(highlightbackground="#d9d9d9")
        self.Label3betacont.configure(highlightcolor="black")
        self.Label3betacont.configure(text='''Beta Contour Settings''')

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t2)
        self.TSeparator1.place(relx=0.01, rely=0.067, relwidth=0.196)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t2)
        self.TSeparator1.place(relx=0.52, rely=0.067, relwidth=0.196)
        self.TSeparator1.configure(takefocus="0")

#        self.Label32 = tk.Label(self.TNotebook1_t2)
#        self.Label32.place(relx=0.167, rely=0.083, height=21, width=64)
#        self.Label32.configure(activebackground="#f9f9f9")
#        self.Label32.configure(activeforeground="black")
#        self.Label32.configure(background="#86bad8")
#        self.Label32.configure(disabledforeground="#a3a3a3")
#        self.Label32.configure(foreground="#000000")
#        self.Label32.configure(highlightbackground="#d9d9d9")
#        self.Label32.configure(highlightcolor="black")
#        self.Label32.configure(text='''Marker Size''')

        self.Label31 = tk.Label(self.TNotebook1_t2)
        self.Label31.place(relx=0.02, rely=0.083, height=21, width=64)
        self.Label31.configure(activebackground="#f9f9f9")
        self.Label31.configure(activeforeground="black")
        self.Label31.configure(background="#86bad8")
        self.Label31.configure(disabledforeground="#a3a3a3")
        self.Label31.configure(foreground="#000000")
        self.Label31.configure(highlightbackground="#d9d9d9")
        self.Label31.configure(highlightcolor="black")
        self.Label31.configure(text='''Color Ramp''')

        self.Label33 = tk.Label(self.TNotebook1_t2)
        self.Label33.place(relx=0.304, rely=0.083, height=21, width=64)
        self.Label33.configure(activebackground="#f9f9f9")
        self.Label33.configure(activeforeground="black")
        self.Label33.configure(background="#86bad8")
        self.Label33.configure(disabledforeground="#a3a3a3")
        self.Label33.configure(foreground="#000000")
        self.Label33.configure(highlightbackground="#d9d9d9")
        self.Label33.configure(highlightcolor="black")
        self.Label33.configure(text='''Chart Title''')

        self.Label35 = tk.Label(self.TNotebook1_t2)
        self.Label35.place(relx=0.304, rely=0.2, height=21, width=64)
        self.Label35.configure(activebackground="#f9f9f9")
        self.Label35.configure(activeforeground="black")
        self.Label35.configure(background="#86bad8")
        self.Label35.configure(disabledforeground="#a3a3a3")
        self.Label35.configure(foreground="#000000")
        self.Label35.configure(highlightbackground="#d9d9d9")
        self.Label35.configure(highlightcolor="black")
        self.Label35.configure(text='''Y Label''')

        self.Label36 = tk.Label(self.TNotebook1_t2)
        self.Label36.place(relx=0.525, rely=0.075, height=21, width=64)
        self.Label36.configure(activebackground="#f9f9f9")
        self.Label36.configure(activeforeground="black")
        self.Label36.configure(background="#86bad8")
        self.Label36.configure(disabledforeground="#a3a3a3")
        self.Label36.configure(foreground="#000000")
        self.Label36.configure(highlightbackground="#d9d9d9")
        self.Label36.configure(highlightcolor="black")
        self.Label36.configure(text='''Color Ramp''')

        self.Label38 = tk.Label(self.TNotebook1_t2)
        self.Label38.place(relx=0.814, rely=0.075, height=21, width=64)
        self.Label38.configure(activebackground="#f9f9f9")
        self.Label38.configure(activeforeground="black")
        self.Label38.configure(background="#86bad8")
        self.Label38.configure(disabledforeground="#a3a3a3")
        self.Label38.configure(foreground="#000000")
        self.Label38.configure(highlightbackground="#d9d9d9")
        self.Label38.configure(highlightcolor="black")
        self.Label38.configure(text='''Chart Title''')

        self.Label37 = tk.Label(self.TNotebook1_t2)
        self.Label37.place(relx=0.667, rely=0.2, height=21, width=64)
        self.Label37.configure(activebackground="#f9f9f9")
        self.Label37.configure(activeforeground="black")
        self.Label37.configure(background="#86bad8")
        self.Label37.configure(disabledforeground="#a3a3a3")
        self.Label37.configure(foreground="#000000")
        self.Label37.configure(highlightbackground="#d9d9d9")
        self.Label37.configure(highlightcolor="black")
        self.Label37.configure(text='''X Label''')

        self.Label39 = tk.Label(self.TNotebook1_t2)
        self.Label39.place(relx=0.809, rely=0.2, height=21, width=64)
        self.Label39.configure(activebackground="#f9f9f9")
        self.Label39.configure(activeforeground="black")
        self.Label39.configure(background="#86bad8")
        self.Label39.configure(disabledforeground="#a3a3a3")
        self.Label39.configure(foreground="#000000")
        self.Label39.configure(highlightbackground="#d9d9d9")
        self.Label39.configure(highlightcolor="black")
        self.Label39.configure(text='''Y Label''')

        self.beta_point_plot_axis_check = tk.Checkbutton(self.TNotebook1_t2)
        self.beta_point_plot_axis_check.place(relx=0.01, rely=0.233, relheight=0.042
                , relwidth=0.083)
        self.beta_point_plot_axis_check.configure(activebackground="#ececec")
        self.beta_point_plot_axis_check.configure(activeforeground="#000000")
        self.beta_point_plot_axis_check.configure(background="#86bad8")
        self.beta_point_plot_axis_check.configure(disabledforeground="#a3a3a3")
        self.beta_point_plot_axis_check.configure(foreground="#000000")
        self.beta_point_plot_axis_check.configure(highlightbackground="#d9d9d9")
        self.beta_point_plot_axis_check.configure(highlightcolor="black")
        self.beta_point_plot_axis_check.configure(justify='left')
        self.beta_point_plot_axis_check.configure(takefocus="0")
        self.beta_point_plot_axis_check.configure(text='''Axis Labels''')
        self.beta_point_plot_axis_check.configure(variable=GUI_support.che63)

        self.mult_point_axis_check = tk.Checkbutton(self.TNotebook1_t2)
        self.mult_point_axis_check.place(relx=0.51, rely=0.225, relheight=0.042
                , relwidth=0.083)
        self.mult_point_axis_check.configure(activebackground="#ececec")
        self.mult_point_axis_check.configure(activeforeground="#000000")
        self.mult_point_axis_check.configure(background="#86bad8")
        self.mult_point_axis_check.configure(disabledforeground="#a3a3a3")
        self.mult_point_axis_check.configure(foreground="#000000")
        self.mult_point_axis_check.configure(highlightbackground="#d9d9d9")
        self.mult_point_axis_check.configure(highlightcolor="black")
        self.mult_point_axis_check.configure(justify='left')
        self.mult_point_axis_check.configure(takefocus="0")
        self.mult_point_axis_check.configure(text='''Axis Labels''')
        self.mult_point_axis_check.configure(variable=GUI_support.che64)

#        self.mult_plot_rng_scale = tk.Checkbutton(self.TNotebook1_t2)
#        self.mult_plot_rng_scale.place(relx=0.255, rely=0.233, relheight=0.042
#                , relwidth=0.089)
#        self.mult_plot_rng_scale.configure(activebackground="#ececec")
#        self.mult_plot_rng_scale.configure(activeforeground="#000000")
#        self.mult_plot_rng_scale.configure(background="#86bad8")
#        self.mult_plot_rng_scale.configure(disabledforeground="#a3a3a3")
#        self.mult_plot_rng_scale.configure(foreground="#000000")
#        self.mult_plot_rng_scale.configure(highlightbackground="#d9d9d9")
#        self.mult_plot_rng_scale.configure(highlightcolor="black")
#        self.mult_plot_rng_scale.configure(justify='left')
#        self.mult_plot_rng_scale.configure(text='''Range Scale''')
#        self.mult_plot_rng_scale.configure(variable=GUI_support.che65)
#
#        self.mult_plot_rng_scale = tk.Checkbutton(self.TNotebook1_t2)
#        self.mult_plot_rng_scale.place(relx=0.775, rely=0.225, relheight=0.042
#                , relwidth=0.089)
#        self.mult_plot_rng_scale.configure(activebackground="#ececec")
#        self.mult_plot_rng_scale.configure(activeforeground="#000000")
#        self.mult_plot_rng_scale.configure(background="#86bad8")
#        self.mult_plot_rng_scale.configure(disabledforeground="#a3a3a3")
#        self.mult_plot_rng_scale.configure(foreground="#000000")
#        self.mult_plot_rng_scale.configure(highlightbackground="#d9d9d9")
#        self.mult_plot_rng_scale.configure(highlightcolor="black")
#        self.mult_plot_rng_scale.configure(justify='left')
#        self.mult_plot_rng_scale.configure(text='''Range Scale''')
#        self.mult_plot_rng_scale.configure(variable=GUI_support.che66)

#        self.beta_plot_marker_size = tk.Entry(self.TNotebook1_t2)
#        self.beta_plot_marker_size.place(relx=0.167, rely=0.117, height=20
#                , relwidth=0.112)
#        self.beta_plot_marker_size.configure(background="white")
#        self.beta_plot_marker_size.configure(disabledforeground="#a3a3a3")
#        self.beta_plot_marker_size.configure(font=font10)
#        self.beta_plot_marker_size.configure(foreground="#000000")
#        self.beta_plot_marker_size.configure(highlightbackground="#d9d9d9")
#        self.beta_plot_marker_size.configure(highlightcolor="black")
#        self.beta_plot_marker_size.configure(insertbackground="black")
#        self.beta_plot_marker_size.configure(selectbackground="#c4c4c4")
#        self.beta_plot_marker_size.configure(selectforeground="black")
#        self.beta_plot_marker_size.configure(takefocus="0")

        self.beta_plot_title = tk.Entry(self.TNotebook1_t2)
        self.beta_plot_title.place(relx=0.304, rely=0.117, height=20
                , relwidth=0.112)
        self.beta_plot_title.configure(background="white")
        self.beta_plot_title.configure(disabledforeground="#a3a3a3")
        self.beta_plot_title.configure(font=font10)
        self.beta_plot_title.configure(foreground="#000000")
        self.beta_plot_title.configure(highlightbackground="#d9d9d9")
        self.beta_plot_title.configure(highlightcolor="black")
        self.beta_plot_title.configure(insertbackground="black")
        self.beta_plot_title.configure(selectbackground="#c4c4c4")
        self.beta_plot_title.configure(selectforeground="black")
        self.beta_plot_title.configure(takefocus="0")

        self.beta_plot_x_label = tk.Entry(self.TNotebook1_t2)
        self.beta_plot_x_label.place(relx=0.167, rely=0.238, height=20
                , relwidth=0.112)
        self.beta_plot_x_label.configure(background="white")
        self.beta_plot_x_label.configure(disabledforeground="#a3a3a3")
        self.beta_plot_x_label.configure(font=font10)
        self.beta_plot_x_label.configure(foreground="#000000")
        self.beta_plot_x_label.configure(highlightbackground="#d9d9d9")
        self.beta_plot_x_label.configure(highlightcolor="black")
        self.beta_plot_x_label.configure(insertbackground="black")
        self.beta_plot_x_label.configure(selectbackground="#c4c4c4")
        self.beta_plot_x_label.configure(selectforeground="black")
        self.beta_plot_x_label.configure(takefocus="0")

        self.beta_plot_y_label = tk.Entry(self.TNotebook1_t2)
        self.beta_plot_y_label.place(relx=0.304, rely=0.238, height=20
                , relwidth=0.112)
        self.beta_plot_y_label.configure(background="white")
        self.beta_plot_y_label.configure(disabledforeground="#a3a3a3")
        self.beta_plot_y_label.configure(font=font10)
        self.beta_plot_y_label.configure(foreground="#000000")
        self.beta_plot_y_label.configure(highlightbackground="#d9d9d9")
        self.beta_plot_y_label.configure(highlightcolor="black")
        self.beta_plot_y_label.configure(insertbackground="black")
        self.beta_plot_y_label.configure(selectbackground="#c4c4c4")
        self.beta_plot_y_label.configure(selectforeground="black")
        self.beta_plot_y_label.configure(takefocus="0")

        self.Label34 = tk.Label(self.TNotebook1_t2)
        self.Label34.place(relx=0.167, rely=0.2, height=21, width=64)
        self.Label34.configure(activebackground="#f9f9f9")
        self.Label34.configure(activeforeground="black")
        self.Label34.configure(background="#86bad8")
        self.Label34.configure(disabledforeground="#a3a3a3")
        self.Label34.configure(foreground="#000000")
        self.Label34.configure(highlightbackground="#d9d9d9")
        self.Label34.configure(highlightcolor="black")
        self.Label34.configure(text='''X Label''')

        self.Update_Plots_beta1 = tk.Button(self.TNotebook1_t2)
        self.Update_Plots_beta1.place(relx=0.054, rely=0.183, height=24
                , width=49)
        self.Update_Plots_beta1.configure(activebackground="#ececec")
        self.Update_Plots_beta1.configure(activeforeground="#000000")
        self.Update_Plots_beta1.configure(background="#ffae21")
        self.Update_Plots_beta1.configure(disabledforeground="#a3a3a3")
        self.Update_Plots_beta1.configure(foreground="#000000")
        self.Update_Plots_beta1.configure(highlightbackground="#d9d9d9")
        self.Update_Plots_beta1.configure(highlightcolor="black")
        self.Update_Plots_beta1.configure(pady="0")
        self.Update_Plots_beta1.configure(takefocus="0")
        self.Update_Plots_beta1.configure(text='''Update''')

        self.Update_Plots_beta2 = tk.Button(self.TNotebook1_t2)
        self.Update_Plots_beta2.place(relx=0.569, rely=0.167, height=24
                , width=49)
        self.Update_Plots_beta2.configure(activebackground="#ececec")
        self.Update_Plots_beta2.configure(activeforeground="#000000")
        self.Update_Plots_beta2.configure(background="#ffae21")
        self.Update_Plots_beta2.configure(disabledforeground="#a3a3a3")
        self.Update_Plots_beta2.configure(foreground="#000000")
        self.Update_Plots_beta2.configure(highlightbackground="#d9d9d9")
        self.Update_Plots_beta2.configure(highlightcolor="black")
        self.Update_Plots_beta2.configure(pady="0")
        self.Update_Plots_beta2.configure(takefocus="0")
        self.Update_Plots_beta2.configure(text='''Update''')

#        self.Export_b11 = tk.Button(self.TNotebook1_t2)
#        self.Export_b11.place(relx=0.054, rely=0.233, height=24, width=49)
#        self.Export_b11.configure(activebackground="#ececec")
#        self.Export_b11.configure(activeforeground="#000000")
#        self.Export_b11.configure(background="#ffae21")
#        self.Export_b11.configure(disabledforeground="#a3a3a3")
#        self.Export_b11.configure(foreground="#000000")
#        self.Export_b11.configure(highlightbackground="#d9d9d9")
#        self.Export_b11.configure(highlightcolor="black")
#        self.Export_b11.configure(pady="0")
#        self.Export_b11.configure(takefocus="0")
#        self.Export_b11.configure(text='''Export''')

#        self.Export_b2 = tk.Button(self.TNotebook1_t2)
#        self.Export_b2.place(relx=0.569, rely=0.217, height=24, width=49)
#        self.Export_b2.configure(activebackground="#ececec")
#        self.Export_b2.configure(activeforeground="#000000")
#        self.Export_b2.configure(background="#ffae21")
#        self.Export_b2.configure(disabledforeground="#a3a3a3")
#        self.Export_b2.configure(foreground="#000000")
#        self.Export_b2.configure(highlightbackground="#d9d9d9")
#        self.Export_b2.configure(highlightcolor="black")
#        self.Export_b2.configure(pady="0")
#        self.Export_b2.configure(takefocus="0")
#        self.Export_b2.configure(text='''Export''')

        self.user_beta_point_cmap=StringVar(self.TNotebook1_t2, value='gnuplot2')
        self.user_beta_point_cmap.trace('w',self.beta_point_cmap)        
        self.beta_point_cmap = ttk.Combobox(self.TNotebook1_t2, textvariable=self.user_beta_point_cmap,values=self.cmaps)
        self.beta_point_cmap.place(relx=0.01, rely=0.117, relheight=0.035
                , relwidth=0.111)
        
        
        #This is the dropdown menu for multinomial point plot cmap
        self.user_mult_point_cmap=StringVar(self.TNotebook1_t2, value='gnuplot2')
        self.user_mult_point_cmap.trace('w',self.mult_point_cmap)        
        self.mult_point_cmap = ttk.Combobox(self.TNotebook1_t2, textvariable=self.user_mult_point_cmap,values=self.cmaps)
        self.mult_point_cmap.place(relx=0.52, rely=0.117, relheight=0.035
                , relwidth=0.101)
        
        self.beta_cont_title = tk.Entry(self.TNotebook1_t2)
        self.beta_cont_title.place(relx=0.809, rely=0.117, height=20
                , relwidth=0.112)
        self.beta_cont_title.configure(background="white")
        self.beta_cont_title.configure(disabledforeground="#a3a3a3")
        self.beta_cont_title.configure(font=font10)
        self.beta_cont_title.configure(foreground="#000000")
        self.beta_cont_title.configure(highlightbackground="#d9d9d9")
        self.beta_cont_title.configure(highlightcolor="black")
        self.beta_cont_title.configure(insertbackground="black")
        self.beta_cont_title.configure(selectbackground="#c4c4c4")
        self.beta_cont_title.configure(selectforeground="black")
        self.beta_cont_title.configure(takefocus="0")

        self.beta_cont_x_label = tk.Entry(self.TNotebook1_t2)
        self.beta_cont_x_label.place(relx=0.657, rely=0.233, height=20
                , relwidth=0.112)
        self.beta_cont_x_label.configure(background="white")
        self.beta_cont_x_label.configure(disabledforeground="#a3a3a3")
        self.beta_cont_x_label.configure(font=font10)
        self.beta_cont_x_label.configure(foreground="#000000")
        self.beta_cont_x_label.configure(highlightbackground="#d9d9d9")
        self.beta_cont_x_label.configure(highlightcolor="black")
        self.beta_cont_x_label.configure(insertbackground="black")
        self.beta_cont_x_label.configure(selectbackground="#c4c4c4")
        self.beta_cont_x_label.configure(selectforeground="black")
        self.beta_cont_x_label.configure(takefocus="0")

        self.beta_cont_y_label = tk.Entry(self.TNotebook1_t2)
        self.beta_cont_y_label.place(relx=0.809, rely=0.233, height=20
                , relwidth=0.112)
        self.beta_cont_y_label.configure(background="white")
        self.beta_cont_y_label.configure(disabledforeground="#a3a3a3")
        self.beta_cont_y_label.configure(font=font10)
        self.beta_cont_y_label.configure(foreground="#000000")
        self.beta_cont_y_label.configure(highlightbackground="#d9d9d9")
        self.beta_cont_y_label.configure(highlightcolor="black")
        self.beta_cont_y_label.configure(insertbackground="black")
        self.beta_cont_y_label.configure(selectbackground="#c4c4c4")
        self.beta_cont_y_label.configure(selectforeground="black")
        self.beta_cont_y_label.configure(takefocus="0")

        self.FractureDensityCanvas = tk.Canvas(self.TNotebook1_t3)
        self.FractureDensityCanvas.place(relx=0.01, rely=0.058, relheight=0.542
                , relwidth=0.319)
        self.FractureDensityCanvas.configure(background="#d9d9d9")
        self.FractureDensityCanvas.configure(borderwidth="2")
        self.FractureDensityCanvas.configure(highlightbackground="#d9d9d9")
        self.FractureDensityCanvas.configure(highlightcolor="black")
        self.FractureDensityCanvas.configure(insertbackground="black")
        self.FractureDensityCanvas.configure(relief='ridge')
        self.FractureDensityCanvas.configure(selectbackground="#c4c4c4")
        self.FractureDensityCanvas.configure(selectforeground="black")
        self.FractureDensityCanvas.configure(takefocus="0")
        self.FractureDensityCanvas.configure(width=423)

        self.LogFracDensityCanvas = tk.Canvas(self.TNotebook1_t3)
        self.LogFracDensityCanvas.place(relx=0.353, rely=0.058, relheight=0.542
                , relwidth=0.319)
        self.LogFracDensityCanvas.configure(background="#d9d9d9")
        self.LogFracDensityCanvas.configure(borderwidth="2")
        self.LogFracDensityCanvas.configure(highlightbackground="#d9d9d9")
        self.LogFracDensityCanvas.configure(highlightcolor="black")
        self.LogFracDensityCanvas.configure(insertbackground="black")
        self.LogFracDensityCanvas.configure(relief='ridge')
        self.LogFracDensityCanvas.configure(selectbackground="#c4c4c4")
        self.LogFracDensityCanvas.configure(selectforeground="black")
        self.LogFracDensityCanvas.configure(takefocus="0")
        self.LogFracDensityCanvas.configure(width=423)

        self.UniformStrikeBeta = tk.Canvas(self.TNotebook1_t3)
        self.UniformStrikeBeta.place(relx=0.706, rely=0.542, relheight=0.458
                , relwidth=0.27)
        self.UniformStrikeBeta.configure(background="#d9d9d9")
        self.UniformStrikeBeta.configure(borderwidth="2")
        self.UniformStrikeBeta.configure(highlightbackground="#d9d9d9")
        self.UniformStrikeBeta.configure(highlightcolor="black")
        self.UniformStrikeBeta.configure(insertbackground="black")
        self.UniformStrikeBeta.configure(relief='ridge')
        self.UniformStrikeBeta.configure(selectbackground="#c4c4c4")
        self.UniformStrikeBeta.configure(selectforeground="black")
        self.UniformStrikeBeta.configure(takefocus="0")
        self.UniformStrikeBeta.configure(width=325)

        self.Label4_1 = tk.Label(self.TNotebook1_t3)
        self.Label4_1.place(relx=0.01, rely=0.017, height=21, width=91)
        self.Label4_1.configure(activebackground="#f9f9f9")
        self.Label4_1.configure(activeforeground="black")
        self.Label4_1.configure(background="#86bad8")
        self.Label4_1.configure(disabledforeground="#a3a3a3")
        self.Label4_1.configure(foreground="#000000")
        self.Label4_1.configure(highlightbackground="#d9d9d9")
        self.Label4_1.configure(highlightcolor="black")
        self.Label4_1.configure(text='''Fracture Density''')

        self.Label4_2 = tk.Label(self.TNotebook1_t3)
        self.Label4_2.place(relx=0.358, rely=0.017, height=21, width=111)
        self.Label4_2.configure(activebackground="#f9f9f9")
        self.Label4_2.configure(activeforeground="black")
        self.Label4_2.configure(background="#86bad8")
        self.Label4_2.configure(cursor="fleur")
        self.Label4_2.configure(disabledforeground="#a3a3a3")
        self.Label4_2.configure(foreground="#000000")
        self.Label4_2.configure(highlightbackground="#d9d9d9")
        self.Label4_2.configure(highlightcolor="black")
        self.Label4_2.configure(text='''Log Fracture Density''')

        self.Label4_3 = tk.Label(self.TNotebook1_t3)
        self.Label4_3.place(relx=0.701, rely=0.0, height=21, width=151)
        self.Label4_3.configure(activebackground="#f9f9f9")
        self.Label4_3.configure(activeforeground="black")
        self.Label4_3.configure(background="#86bad8")
        self.Label4_3.configure(disabledforeground="#a3a3a3")
        self.Label4_3.configure(foreground="#000000")
        self.Label4_3.configure(highlightbackground="#d9d9d9")
        self.Label4_3.configure(highlightcolor="black")
        self.Label4_3.configure(text='''Uniform Strike Multinomial''')

        self.UniformReroll = tk.Button(self.TNotebook1_t3, command=self.reroll_random)
        self.UniformReroll.place(relx=0.858, rely=0.0, height=24, width=115)
        self.UniformReroll.configure(activebackground="#ececec")
        self.UniformReroll.configure(activeforeground="#000000")
        self.UniformReroll.configure(background="#ffae21")
        self.UniformReroll.configure(disabledforeground="#a3a3a3")
        self.UniformReroll.configure(foreground="#000000")
        self.UniformReroll.configure(highlightbackground="#d9d9d9")
        self.UniformReroll.configure(highlightcolor="black")
        self.UniformReroll.configure(pady="0")
        self.UniformReroll.configure(text='''Reroll Uniform Data''')

        self.UniformStrikeMultinomial = tk.Canvas(self.TNotebook1_t3)
        self.UniformStrikeMultinomial.place(relx=0.706, rely=0.042
                , relheight=0.458, relwidth=0.27)
        self.UniformStrikeMultinomial.configure(background="#d9d9d9")
        self.UniformStrikeMultinomial.configure(borderwidth="2")
        self.UniformStrikeMultinomial.configure(highlightbackground="#d9d9d9")
        self.UniformStrikeMultinomial.configure(highlightcolor="black")
        self.UniformStrikeMultinomial.configure(insertbackground="black")
        self.UniformStrikeMultinomial.configure(relief='ridge')
        self.UniformStrikeMultinomial.configure(selectbackground="#c4c4c4")
        self.UniformStrikeMultinomial.configure(selectforeground="black")
        self.UniformStrikeMultinomial.configure(takefocus="0")
        self.UniformStrikeMultinomial.configure(width=325)

        self.Label4_6 = tk.Label(self.TNotebook1_t3)
        self.Label4_6.place(relx=0.701, rely=0.5, height=21, width=121)
        self.Label4_6.configure(activebackground="#f9f9f9")
        self.Label4_6.configure(activeforeground="black")
        self.Label4_6.configure(background="#86bad8")
        self.Label4_6.configure(disabledforeground="#a3a3a3")
        self.Label4_6.configure(foreground="#000000")
        self.Label4_6.configure(highlightbackground="#d9d9d9")
        self.Label4_6.configure(highlightcolor="black")
        self.Label4_6.configure(text='''Uniform Strike Beta''')
        self.Label4_6.configure(width=121)

        self.FracDenseMultCanvas = tk.Canvas(self.TNotebook1_t3)
        self.FracDenseMultCanvas.place(relx=0.01, rely=0.667, relheight=0.32
                , relwidth=0.196)
        self.FracDenseMultCanvas.configure(background="#d9d9d9")
        self.FracDenseMultCanvas.configure(borderwidth="2")
        self.FracDenseMultCanvas.configure(highlightbackground="#d9d9d9")
        self.FracDenseMultCanvas.configure(highlightcolor="black")
        self.FracDenseMultCanvas.configure(insertbackground="black")
        self.FracDenseMultCanvas.configure(relief='ridge')
        self.FracDenseMultCanvas.configure(selectbackground="#c4c4c4")
        self.FracDenseMultCanvas.configure(selectforeground="black")
#        self.FracDenseMultCanvas.configure(width=323)

        self.FracBetaCanvas = tk.Canvas(self.TNotebook1_t3)
        self.FracBetaCanvas.place(relx=0.25, rely=0.667, relheight=0.322
                , relwidth=0.2)
        self.FracBetaCanvas.configure(background="#d9d9d9")
        self.FracBetaCanvas.configure(borderwidth="2")
        self.FracBetaCanvas.configure(highlightbackground="#d9d9d9")
        self.FracBetaCanvas.configure(highlightcolor="black")
        self.FracBetaCanvas.configure(insertbackground="black")
        self.FracBetaCanvas.configure(relief='ridge')
        self.FracBetaCanvas.configure(selectbackground="#c4c4c4")
        self.FracBetaCanvas.configure(selectforeground="black")
        
        
        self.Label64_5 = tk.Label(self.TNotebook1_t3)
        self.Label64_5.place(relx=0.25, rely=0.625, height=21, width=200)
        self.Label64_5.configure(activebackground="#f9f9f9")
        self.Label64_5.configure(activeforeground="black")
        self.Label64_5.configure(background="#86bad8")
        self.Label64_5.configure(disabledforeground="#a3a3a3")
        self.Label64_5.configure(foreground="#000000")
        self.Label64_5.configure(highlightbackground="#d9d9d9")
        self.Label64_5.configure(highlightcolor="black")
        self.Label64_5.configure(text='''Fracture Density Vs Beta''')
#        self.FracBetaCanvas.configure(width=323)

#        self.FracDensityExport = tk.Button(self.TNotebook1_t3)
#        self.FracDensityExport.place(relx=0.279, rely=0.017, height=24, width=44)

#        self.FracDensityExport.configure(activebackground="#ececec")
#        self.FracDensityExport.configure(activeforeground="#000000")
#        self.FracDensityExport.configure(background="#ffae21")
#        self.FracDensityExport.configure(disabledforeground="#a3a3a3")
#        self.FracDensityExport.configure(foreground="#000000")
#        self.FracDensityExport.configure(highlightbackground="#d9d9d9")
#        self.FracDensityExport.configure(highlightcolor="black")
#        self.FracDensityExport.configure(pady="0")
#        self.FracDensityExport.configure(text='''Export''')

#        self.LogFracDensityExport = tk.Button(self.TNotebook1_t3)
#        self.LogFracDensityExport.place(relx=0.623, rely=0.017, height=24
#                , width=44)
#        self.LogFracDensityExport.configure(activebackground="#ececec")
#        self.LogFracDensityExport.configure(activeforeground="#000000")
#        self.LogFracDensityExport.configure(background="#ffae21")
#        self.LogFracDensityExport.configure(disabledforeground="#a3a3a3")
#        self.LogFracDensityExport.configure(foreground="#000000")
#        self.LogFracDensityExport.configure(highlightbackground="#d9d9d9")
#        self.LogFracDensityExport.configure(highlightcolor="black")
#        self.LogFracDensityExport.configure(pady="0")
#        self.LogFracDensityExport.configure(text='''Export''')

#        self.UniformExport = tk.Button(self.TNotebook1_t3)
#        self.UniformExport.place(relx=0.926, rely=0.5, height=24, width=44)
#        self.UniformExport.configure(activebackground="#ececec")
#        self.UniformExport.configure(activeforeground="#000000")
#        self.UniformExport.configure(background="#ffae21")
#        self.UniformExport.configure(disabledforeground="#a3a3a3")
#        self.UniformExport.configure(foreground="#000000")
#        self.UniformExport.configure(highlightbackground="#d9d9d9")
#        self.UniformExport.configure(highlightcolor="black")
#        self.UniformExport.configure(pady="0")
#        self.UniformExport.configure(text='''Export''')

#        self.LogFracDensityExport = tk.Button(self.TNotebook1_t3)
#        self.LogFracDensityExport.place(relx=0.157, rely=0.617, height=24
#                , width=44)
#        self.LogFracDensityExport.configure(activebackground="#ececec")
#        self.LogFracDensityExport.configure(activeforeground="#000000")
#        self.LogFracDensityExport.configure(background="#ffae21")
#        self.LogFracDensityExport.configure(disabledforeground="#a3a3a3")
#        self.LogFracDensityExport.configure(foreground="#000000")
#        self.LogFracDensityExport.configure(highlightbackground="#d9d9d9")
#        self.LogFracDensityExport.configure(highlightcolor="black")
#        self.LogFracDensityExport.configure(pady="0")
#        self.LogFracDensityExport.configure(text='''Export''')

#        self.LogFracDensityExport = tk.Button(self.TNotebook1_t3)
#        self.LogFracDensityExport.place(relx=0.623, rely=0.625, height=24
#                , width=44)
#        self.LogFracDensityExport.configure(activebackground="#ececec")
#        self.LogFracDensityExport.configure(activeforeground="#000000")
#        self.LogFracDensityExport.configure(background="#ffae21")
#        self.LogFracDensityExport.configure(disabledforeground="#a3a3a3")
#        self.LogFracDensityExport.configure(foreground="#000000")
#        self.LogFracDensityExport.configure(highlightbackground="#d9d9d9")
#        self.LogFracDensityExport.configure(highlightcolor="black")
#        self.LogFracDensityExport.configure(pady="0")
#        self.LogFracDensityExport.configure(text='''Export''')

        self.Label4_4 = tk.Label(self.TNotebook1_t3, anchor='w')
        self.Label4_4.place(relx=0.01, rely=0.625, height=21, width=200)
        self.Label4_4.configure(activebackground="#f9f9f9")
        self.Label4_4.configure(activeforeground="black")
        self.Label4_4.configure(background="#86bad8")
        self.Label4_4.configure(disabledforeground="#a3a3a3")
        self.Label4_4.configure(foreground="#000000")
        self.Label4_4.configure(highlightbackground="#d9d9d9")
        self.Label4_4.configure(highlightcolor="black")
        self.Label4_4.configure(text='''Fracture Density vs Multinomial''')


        
        self.CorrToolbarFrame = tk.Frame(self.TNotebook1_t4)
        self.HistToolbarFrame = tk.Frame(self.TNotebook1_t4)
        
        self.CorrelationCanvas = tk.Canvas(self.TNotebook1_t4)
        self.CorrelationCanvas.place(relx=0.029, rely=0.18, relheight=0.75
                , relwidth=0.441)
        self.CorrelationCanvas.configure(background="#d9d9d9")
        self.CorrelationCanvas.configure(borderwidth="2")
        self.CorrelationCanvas.configure(highlightbackground="#d9d9d9")
        self.CorrelationCanvas.configure(highlightcolor="black")
        self.CorrelationCanvas.configure(insertbackground="black")
        self.CorrelationCanvas.configure(relief='ridge')
        self.CorrelationCanvas.configure(selectbackground="#c4c4c4")
        self.CorrelationCanvas.configure(selectforeground="black")
        self.CorrelationCanvas.configure(width=125)

        self.HistogramCanvas = tk.Canvas(self.TNotebook1_t4)
        self.HistogramCanvas.place(relx=0.529, rely=0.18, relheight=0.75
                , relwidth=0.441)
        self.HistogramCanvas.configure(background="#d9d9d9")
        self.HistogramCanvas.configure(borderwidth="2")
        self.HistogramCanvas.configure(highlightbackground="#d9d9d9")
        self.HistogramCanvas.configure(highlightcolor="black")
        self.HistogramCanvas.configure(insertbackground="black")
        self.HistogramCanvas.configure(relief='ridge')
        self.HistogramCanvas.configure(selectbackground="#c4c4c4")
        self.HistogramCanvas.configure(selectforeground="black")
        self.HistogramCanvas.configure(width=125)

        self.Label5_1 = tk.Label(self.TNotebook1_t4, anchor='w')
        self.Label5_1.place(relx=0.025, rely=0.04, height=21, width=350)
        self.Label5_1.configure(activebackground="#f9f9f9")
        self.Label5_1.configure(activeforeground="black")
        self.Label5_1.configure(background="#86bad8")
        self.Label5_1.configure(disabledforeground="#a3a3a3")
        self.Label5_1.configure(foreground="#000000")
        self.Label5_1.configure(highlightbackground="#d9d9d9")
        self.Label5_1.configure(highlightcolor="black")
        self.Label5_1.configure(text='''Correlation of Beta and Multinomial''')
        self.Label5_1.configure(font=font17)
        
        self.PearsonLabel = tk.Label(self.TNotebook1_t4,justify='left', anchor="w")
        self.PearsonLabel.place(relx=0.025, rely=0.08, height=21, width=350)
        self.PearsonLabel.configure(activebackground="#f9f9f9")
        self.PearsonLabel.configure(activeforeground="black")
        self.PearsonLabel.configure(background="#86bad8")
        self.PearsonLabel.configure(disabledforeground="#a3a3a3")
        self.PearsonLabel.configure(foreground="#000000")
        self.PearsonLabel.configure(highlightbackground="#d9d9d9")
        self.PearsonLabel.configure(highlightcolor="black")
        self.PearsonLabel.configure(text='''Pearson Correlation (Beta vs Multinomial):''')

        self.SpearmanLabel = tk.Label(self.TNotebook1_t4,justify='left', anchor="w")
        self.SpearmanLabel.place(relx=0.025, rely=0.12, height=21, width=350)
        self.SpearmanLabel.configure(activebackground="#f9f9f9")
        self.SpearmanLabel.configure(activeforeground="black")
        self.SpearmanLabel.configure(background="#86bad8")
        self.SpearmanLabel.configure(disabledforeground="#a3a3a3")
        self.SpearmanLabel.configure(foreground="#000000")
        self.SpearmanLabel.configure(highlightbackground="#d9d9d9")
        self.SpearmanLabel.configure(highlightcolor="black")
        self.SpearmanLabel.configure(text='''Spearman Correlation (Beta vs Multinomial):''')


        self.HistogramLabel = tk.Label(self.TNotebook1_t4,anchor='w')
        self.HistogramLabel.place(relx=0.529, rely=0.12, height=21, width=350)
        self.HistogramLabel.configure(activebackground="#f9f9f9")
        self.HistogramLabel.configure(activeforeground="black")
        self.HistogramLabel.configure(background="#86bad8")
        self.HistogramLabel.configure(disabledforeground="#a3a3a3")
        self.HistogramLabel.configure(foreground="#000000")
        self.HistogramLabel.configure(highlightbackground="#d9d9d9")
        self.HistogramLabel.configure(highlightcolor="black")
        self.HistogramLabel.configure(text='''Histogram of Sample vs Uniform''')
        self.HistogramLabel.configure(font=font17)
        self.HistogramLabel.configure(width=186)

#        self.CorrelationExport = tk.Button(self.TNotebook1_t4)
#        self.CorrelationExport.place(relx=0.422, rely=0.167, height=24, width=44)
#        self.CorrelationExport.configure(activebackground="#ececec")
#        self.CorrelationExport.configure(activeforeground="#000000")
#        self.CorrelationExport.configure(background="#ffae21")
#        self.CorrelationExport.configure(disabledforeground="#a3a3a3")
#        self.CorrelationExport.configure(foreground="#000000")
#        self.CorrelationExport.configure(highlightbackground="#d9d9d9")
#        self.CorrelationExport.configure(highlightcolor="black")
#        self.CorrelationExport.configure(pady="0")
#        self.CorrelationExport.configure(text='''Export''')

#        self.HistogramExport = tk.Button(self.TNotebook1_t4)
#        self.HistogramExport.place(relx=0.922, rely=0.167, height=24, width=44)
#        self.HistogramExport.configure(activebackground="#ececec")
#        self.HistogramExport.configure(activeforeground="#000000")
#        self.HistogramExport.configure(background="#ffae21")
#        self.HistogramExport.configure(disabledforeground="#a3a3a3")
#        self.HistogramExport.configure(foreground="#000000")
#        self.HistogramExport.configure(highlightbackground="#d9d9d9")
#        self.HistogramExport.configure(highlightcolor="black")
#        self.HistogramExport.configure(pady="0")
#        self.HistogramExport.configure(text='''Export''')

        self.Label6_1 = tk.Label(self.TNotebook1_t5)
        self.Label6_1.place(relx=0.01, rely=0.033, height=21, width=272)
        self.Label6_1.configure(activebackground="#f9f9f9")
        self.Label6_1.configure(activeforeground="black")
        self.Label6_1.configure(background="#d9d9d9")
        self.Label6_1.configure(disabledforeground="#a3a3a3")
        self.Label6_1.configure(foreground="#000000")
        self.Label6_1.configure(highlightbackground="#d9d9d9")
        self.Label6_1.configure(highlightcolor="black")
        self.Label6_1.configure(text='''Don't Need Any Settings for Now...But Just in Case''')

        self.LabelSetting1 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting1.place(relx=0.01, rely=0.1, height=21, width=34)
        self.LabelSetting1.configure(activebackground="#f9f9f9")
        self.LabelSetting1.configure(activeforeground="black")
        self.LabelSetting1.configure(background="#d9d9d9")
        self.LabelSetting1.configure(disabledforeground="#a3a3a3")
        self.LabelSetting1.configure(foreground="#000000")
        self.LabelSetting1.configure(highlightbackground="#d9d9d9")
        self.LabelSetting1.configure(highlightcolor="black")
        self.LabelSetting1.configure(text='''Label''')

        self.LabelSetting2 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting2.place(relx=0.01, rely=0.15, height=21, width=34)
        self.LabelSetting2.configure(activebackground="#f9f9f9")
        self.LabelSetting2.configure(activeforeground="black")
        self.LabelSetting2.configure(background="#d9d9d9")
        self.LabelSetting2.configure(disabledforeground="#a3a3a3")
        self.LabelSetting2.configure(foreground="#000000")
        self.LabelSetting2.configure(highlightbackground="#d9d9d9")
        self.LabelSetting2.configure(highlightcolor="black")
        self.LabelSetting2.configure(text='''Label''')

        self.LabelSetting3 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting3.place(relx=0.01, rely=0.2, height=21, width=34)
        self.LabelSetting3.configure(activebackground="#f9f9f9")
        self.LabelSetting3.configure(activeforeground="black")
        self.LabelSetting3.configure(background="#d9d9d9")
        self.LabelSetting3.configure(disabledforeground="#a3a3a3")
        self.LabelSetting3.configure(foreground="#000000")
        self.LabelSetting3.configure(highlightbackground="#d9d9d9")
        self.LabelSetting3.configure(highlightcolor="black")
        self.LabelSetting3.configure(text='''Label''')

        self.Label12 = tk.Label(self.TNotebook1_t5)
        self.Label12.place(relx=0.01, rely=0.25, height=21, width=34)
        self.Label12.configure(activebackground="#f9f9f9")
        self.Label12.configure(activeforeground="black")
        self.Label12.configure(background="#d9d9d9")
        self.Label12.configure(disabledforeground="#a3a3a3")
        self.Label12.configure(foreground="#000000")
        self.Label12.configure(highlightbackground="#d9d9d9")
        self.Label12.configure(highlightcolor="black")
        self.Label12.configure(text='''Label''')

        self.LabelSetting5 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting5.place(relx=0.01, rely=0.3, height=21, width=34)
        self.LabelSetting5.configure(activebackground="#f9f9f9")
        self.LabelSetting5.configure(activeforeground="black")
        self.LabelSetting5.configure(background="#d9d9d9")
        self.LabelSetting5.configure(disabledforeground="#a3a3a3")
        self.LabelSetting5.configure(foreground="#000000")
        self.LabelSetting5.configure(highlightbackground="#d9d9d9")
        self.LabelSetting5.configure(highlightcolor="black")
        self.LabelSetting5.configure(text='''Label''')

        self.LabelSetting7 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting7.place(relx=0.01, rely=0.35, height=21, width=34)
        self.LabelSetting7.configure(activebackground="#f9f9f9")
        self.LabelSetting7.configure(activeforeground="black")
        self.LabelSetting7.configure(background="#d9d9d9")
        self.LabelSetting7.configure(disabledforeground="#a3a3a3")
        self.LabelSetting7.configure(foreground="#000000")
        self.LabelSetting7.configure(highlightbackground="#d9d9d9")
        self.LabelSetting7.configure(highlightcolor="black")
        self.LabelSetting7.configure(text='''Label''')

        self.LabelSetting8_ = tk.Label(self.TNotebook1_t5)
        self.LabelSetting8_.place(relx=0.01, rely=0.45, height=21, width=34)
        self.LabelSetting8_.configure(activebackground="#f9f9f9")
        self.LabelSetting8_.configure(activeforeground="black")
        self.LabelSetting8_.configure(background="#d9d9d9")
        self.LabelSetting8_.configure(disabledforeground="#a3a3a3")
        self.LabelSetting8_.configure(foreground="#000000")
        self.LabelSetting8_.configure(highlightbackground="#d9d9d9")
        self.LabelSetting8_.configure(highlightcolor="black")
        self.LabelSetting8_.configure(text='''Label''')

        self.EntrySetting1 = tk.Entry(self.TNotebook1_t5)
        self.EntrySetting1.place(relx=0.118, rely=0.1, height=20, relwidth=0.161)

        self.EntrySetting1.configure(background="white")
        self.EntrySetting1.configure(disabledforeground="#a3a3a3")
        self.EntrySetting1.configure(font=font10)
        self.EntrySetting1.configure(foreground="#000000")
        self.EntrySetting1.configure(highlightbackground="#d9d9d9")
        self.EntrySetting1.configure(highlightcolor="black")
        self.EntrySetting1.configure(insertbackground="black")
        self.EntrySetting1.configure(selectbackground="#c4c4c4")
        self.EntrySetting1.configure(selectforeground="black")

        self.EntrySetting2 = tk.Entry(self.TNotebook1_t5)
        self.EntrySetting2.place(relx=0.118, rely=0.15, height=20
                , relwidth=0.161)
        self.EntrySetting2.configure(background="white")
        self.EntrySetting2.configure(disabledforeground="#a3a3a3")
        self.EntrySetting2.configure(font=font10)
        self.EntrySetting2.configure(foreground="#000000")
        self.EntrySetting2.configure(highlightbackground="#d9d9d9")
        self.EntrySetting2.configure(highlightcolor="black")
        self.EntrySetting2.configure(insertbackground="black")
        self.EntrySetting2.configure(selectbackground="#c4c4c4")
        self.EntrySetting2.configure(selectforeground="black")

        self.EntrySetting3 = tk.Entry(self.TNotebook1_t5)
        self.EntrySetting3.place(relx=0.118, rely=0.2, height=20, relwidth=0.161)

        self.EntrySetting3.configure(background="white")
        self.EntrySetting3.configure(disabledforeground="#a3a3a3")
        self.EntrySetting3.configure(font=font10)
        self.EntrySetting3.configure(foreground="#000000")
        self.EntrySetting3.configure(highlightbackground="#d9d9d9")
        self.EntrySetting3.configure(highlightcolor="black")
        self.EntrySetting3.configure(insertbackground="black")
        self.EntrySetting3.configure(selectbackground="#c4c4c4")
        self.EntrySetting3.configure(selectforeground="black")

        self.EntrySetting4 = tk.Entry(self.TNotebook1_t5)
        self.EntrySetting4.place(relx=0.118, rely=0.25, height=20
                , relwidth=0.161)
        self.EntrySetting4.configure(background="white")
        self.EntrySetting4.configure(disabledforeground="#a3a3a3")
        self.EntrySetting4.configure(font=font10)
        self.EntrySetting4.configure(foreground="#000000")
        self.EntrySetting4.configure(highlightbackground="#d9d9d9")
        self.EntrySetting4.configure(highlightcolor="black")
        self.EntrySetting4.configure(insertbackground="black")
        self.EntrySetting4.configure(selectbackground="#c4c4c4")
        self.EntrySetting4.configure(selectforeground="black")

        self.TComboboxSetting5 = ttk.Combobox(self.TNotebook1_t5)
        self.TComboboxSetting5.place(relx=0.118, rely=0.3, relheight=0.035
                , relwidth=0.14)
        self.TComboboxSetting5.configure(takefocus="")

        self.TComboboxSetting6 = ttk.Combobox(self.TNotebook1_t5)
        self.TComboboxSetting6.place(relx=0.118, rely=0.35, relheight=0.035
                , relwidth=0.14)
        self.TComboboxSetting6.configure(takefocus="")

        self.TCombobox3 = ttk.Combobox(self.TNotebook1_t5)
        self.TCombobox3.place(relx=0.118, rely=0.4, relheight=0.035
                , relwidth=0.14)
        self.TCombobox3.configure(takefocus="")

        self.TComboboxSetting8 = ttk.Combobox(self.TNotebook1_t5)
        self.TComboboxSetting8.place(relx=0.118, rely=0.45, relheight=0.035
                , relwidth=0.14)
        self.TComboboxSetting8.configure(takefocus="")

        self.SettingCheck1 = tk.Checkbutton(self.TNotebook1_t5)
        self.SettingCheck1.place(relx=0.01, rely=0.517, relheight=0.042
                , relwidth=0.06)
        self.SettingCheck1.configure(activebackground="#ececec")
        self.SettingCheck1.configure(activeforeground="#000000")
        self.SettingCheck1.configure(background="#d9d9d9")
        self.SettingCheck1.configure(disabledforeground="#a3a3a3")
        self.SettingCheck1.configure(foreground="#000000")
        self.SettingCheck1.configure(highlightbackground="#d9d9d9")
        self.SettingCheck1.configure(highlightcolor="black")
        self.SettingCheck1.configure(justify='left')
        self.SettingCheck1.configure(text='''Check''')
        self.SettingCheck1.configure(variable=GUI_support.che103)

        self.SettingCheck2 = tk.Checkbutton(self.TNotebook1_t5)
        self.SettingCheck2.place(relx=0.01, rely=0.567, relheight=0.042
                , relwidth=0.06)
        self.SettingCheck2.configure(activebackground="#ececec")
        self.SettingCheck2.configure(activeforeground="#000000")
        self.SettingCheck2.configure(background="#d9d9d9")
        self.SettingCheck2.configure(disabledforeground="#a3a3a3")
        self.SettingCheck2.configure(foreground="#000000")
        self.SettingCheck2.configure(highlightbackground="#d9d9d9")
        self.SettingCheck2.configure(highlightcolor="black")
        self.SettingCheck2.configure(justify='left')
        self.SettingCheck2.configure(text='''Check''')
        self.SettingCheck2.configure(variable=GUI_support.che104)

        self.SettingCheck3 = tk.Checkbutton(self.TNotebook1_t5)
        self.SettingCheck3.place(relx=0.01, rely=0.617, relheight=0.042
                , relwidth=0.06)
        self.SettingCheck3.configure(activebackground="#ececec")
        self.SettingCheck3.configure(activeforeground="#000000")
        self.SettingCheck3.configure(background="#d9d9d9")
        self.SettingCheck3.configure(disabledforeground="#a3a3a3")
        self.SettingCheck3.configure(foreground="#000000")
        self.SettingCheck3.configure(highlightbackground="#d9d9d9")
        self.SettingCheck3.configure(highlightcolor="black")
        self.SettingCheck3.configure(justify='left')
        self.SettingCheck3.configure(text='''Check''')
        self.SettingCheck3.configure(variable=GUI_support.che105)

        self.SettingCheck4 = tk.Checkbutton(self.TNotebook1_t5)
        self.SettingCheck4.place(relx=0.01, rely=0.667, relheight=0.042
                , relwidth=0.06)
        self.SettingCheck4.configure(activebackground="#ececec")
        self.SettingCheck4.configure(activeforeground="#000000")
        self.SettingCheck4.configure(background="#d9d9d9")
        self.SettingCheck4.configure(disabledforeground="#a3a3a3")
        self.SettingCheck4.configure(foreground="#000000")
        self.SettingCheck4.configure(highlightbackground="#d9d9d9")
        self.SettingCheck4.configure(highlightcolor="black")
        self.SettingCheck4.configure(justify='left')
        self.SettingCheck4.configure(text='''Check''')
        self.SettingCheck4.configure(variable=GUI_support.che107)

        self.Radiobutton1 = tk.Radiobutton(self.TNotebook1_t5)
        self.Radiobutton1.place(relx=0.52, rely=0.15, relheight=0.042
                , relwidth=0.057)
        self.Radiobutton1.configure(activebackground="#ececec")
        self.Radiobutton1.configure(activeforeground="#000000")
        self.Radiobutton1.configure(background="#d9d9d9")
        self.Radiobutton1.configure(disabledforeground="#a3a3a3")
        self.Radiobutton1.configure(foreground="#000000")
        self.Radiobutton1.configure(highlightbackground="#d9d9d9")
        self.Radiobutton1.configure(highlightcolor="black")
        self.Radiobutton1.configure(justify='left')
        self.Radiobutton1.configure(text='''Radio''')

        self.Radiobutton2 = tk.Radiobutton(self.TNotebook1_t5)
        self.Radiobutton2.place(relx=0.52, rely=0.2, relheight=0.042
                , relwidth=0.057)
        self.Radiobutton2.configure(activebackground="#ececec")
        self.Radiobutton2.configure(activeforeground="#000000")
        self.Radiobutton2.configure(background="#d9d9d9")
        self.Radiobutton2.configure(disabledforeground="#a3a3a3")
        self.Radiobutton2.configure(foreground="#000000")
        self.Radiobutton2.configure(highlightbackground="#d9d9d9")
        self.Radiobutton2.configure(highlightcolor="black")
        self.Radiobutton2.configure(justify='left')
        self.Radiobutton2.configure(text='''Radio''')

        self.Radiobutton3 = tk.Radiobutton(self.TNotebook1_t5)
        self.Radiobutton3.place(relx=0.52, rely=0.25, relheight=0.042
                , relwidth=0.057)
        self.Radiobutton3.configure(activebackground="#ececec")
        self.Radiobutton3.configure(activeforeground="#000000")
        self.Radiobutton3.configure(background="#d9d9d9")
        self.Radiobutton3.configure(disabledforeground="#a3a3a3")
        self.Radiobutton3.configure(foreground="#000000")
        self.Radiobutton3.configure(highlightbackground="#d9d9d9")
        self.Radiobutton3.configure(highlightcolor="black")
        self.Radiobutton3.configure(justify='left')
        self.Radiobutton3.configure(text='''Radio''')

        self.Radiobutton4 = tk.Radiobutton(self.TNotebook1_t5)
        self.Radiobutton4.place(relx=0.52, rely=0.3, relheight=0.042
                , relwidth=0.057)
        self.Radiobutton4.configure(activebackground="#ececec")
        self.Radiobutton4.configure(activeforeground="#000000")
        self.Radiobutton4.configure(background="#d9d9d9")
        self.Radiobutton4.configure(disabledforeground="#a3a3a3")
        self.Radiobutton4.configure(foreground="#000000")
        self.Radiobutton4.configure(highlightbackground="#d9d9d9")
        self.Radiobutton4.configure(highlightcolor="black")
        self.Radiobutton4.configure(justify='left')
        self.Radiobutton4.configure(text='''Radio''')

        self.LabelSetting7 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting7.place(relx=0.01, rely=0.4, height=21, width=34)
        self.LabelSetting7.configure(activebackground="#f9f9f9")
        self.LabelSetting7.configure(activeforeground="black")
        self.LabelSetting7.configure(background="#d9d9d9")
        self.LabelSetting7.configure(disabledforeground="#a3a3a3")
        self.LabelSetting7.configure(foreground="#000000")
        self.LabelSetting7.configure(highlightbackground="#d9d9d9")
        self.LabelSetting7.configure(highlightcolor="black")
        self.LabelSetting7.configure(text='''Label''')

        self.Label6_10 = tk.Label(self.TNotebook1_t5)
        self.Label6_10.place(relx=0.51, rely=0.117, height=21, width=34)
        self.Label6_10.configure(activebackground="#f9f9f9")
        self.Label6_10.configure(activeforeground="black")
        self.Label6_10.configure(background="#d9d9d9")
        self.Label6_10.configure(disabledforeground="#a3a3a3")
        self.Label6_10.configure(foreground="#000000")
        self.Label6_10.configure(highlightbackground="#d9d9d9")
        self.Label6_10.configure(highlightcolor="black")
        self.Label6_10.configure(text='''Label''')
        
        
        self.c1_n.delete(0, 'end')
        self.c1_mean.delete(0, 'end')
        self.c1_sigma.delete(0, 'end')
        self.c1_xmin.delete(0, 'end')
        self.c1_xmax.delete(0, 'end')
        self.c1_ymin.delete(0, 'end')
        self.c1_ymax.delete(0, 'end')
        
        self.c2_n.delete(0, 'end')
        self.c2_mean.delete(0, 'end')
        self.c2_sigma.delete(0, 'end')
        self.c2_xmin.delete(0, 'end')
        self.c2_xmax.delete(0, 'end')
        self.c2_ymin.delete(0, 'end')
        self.c2_ymax.delete(0, 'end')
        
        self.c3_n.delete(0, 'end')
        self.c3_mean.delete(0, 'end')
        self.c3_sigma.delete(0, 'end')
        self.c3_xmin.delete(0, 'end')
        self.c3_xmax.delete(0, 'end')
        self.c3_ymin.delete(0, 'end')
        self.c3_ymax.delete(0, 'end')
        
        self.c4_n.delete(0, 'end')
        self.c4_mean.delete(0, 'end')
        self.c4_sigma.delete(0, 'end')
        self.c4_xmin.delete(0, 'end')
        self.c4_xmax.delete(0, 'end')
        self.c4_ymin.delete(0, 'end')
        self.c4_ymax.delete(0, 'end')
        
        self.c5_n.delete(0, 'end')
        self.c5_mean.delete(0, 'end')
        self.c5_sigma.delete(0, 'end')
        self.c5_xmin.delete(0, 'end')
        self.c5_xmax.delete(0, 'end')
        self.c5_ymin.delete(0, 'end')
        self.c5_ymax.delete(0, 'end')
        
        self.c6_n.delete(0, 'end')
        self.c6_mean.delete(0, 'end')
        self.c6_sigma.delete(0, 'end')
        self.c6_xmin.delete(0, 'end')
        self.c6_xmax.delete(0, 'end')
        self.c6_ymin.delete(0, 'end')
        self.c6_ymax.delete(0, 'end')
        
        
        self.c1_n.insert('end',0)
        self.c1_mean.insert('end',0)
        self.c1_sigma.insert('end',0)
        self.c1_xmin.insert('end',0)
        self.c1_xmax.insert('end',0)
        self.c1_ymin.insert('end',0)
        self.c1_ymax.insert('end',0)
        
        self.c2_n.insert('end',0)
        self.c2_mean.insert('end',0)
        self.c2_sigma.insert('end',0)
        self.c2_xmin.insert('end',0)
        self.c2_xmax.insert('end',0)
        self.c2_ymin.insert('end',0)
        self.c2_ymax.insert('end',0)
        
        self.c3_n.insert('end',0)
        self.c3_mean.insert('end',0)
        self.c3_sigma.insert('end',0)
        self.c3_xmin.insert('end',0)
        self.c3_xmax.insert('end',0)
        self.c3_ymin.insert('end',0)
        self.c3_ymax.insert('end',0)
        
        self.c4_n.insert('end',0)
        self.c4_mean.insert('end',0)
        self.c4_sigma.insert('end',0)
        self.c4_xmin.insert('end',0)
        self.c4_xmax.insert('end',0)
        self.c4_ymin.insert('end',0)
        self.c4_ymax.insert('end',0)
        
        self.c5_n.insert('end',0)
        self.c5_mean.insert('end',0)
        self.c5_sigma.insert('end',0)
        self.c5_xmin.insert('end',0)
        self.c5_xmax.insert('end',0)
        self.c5_ymin.insert('end',0)
        self.c5_ymax.insert('end',0)
        
        self.c6_n.insert('end',0)
        self.c6_mean.insert('end',0)
        self.c6_sigma.insert('end',0)
        self.c6_xmin.insert('end',0)
        self.c6_xmax.insert('end',0)
        self.c6_ymin.insert('end',0)
        self.c6_ymax.insert('end',0)
    
        
        
        
###############################################################################
###############################################################################
#need to add in 
        
        
        self._job = None               #use to tell if need to update

###############################################################################
###############################################################################

        
    def updateValue(self, event):                 #get updated value of silder1
        if self._job:
            self.TNotebook1_t0.after_cancel(self._job)
        self._job = self.TNotebook1_t0.after(1, self._update_bar2)

###############################################################################
###############################################################################

    
    def keep_original(self, event):                 #get updated value of silder1
        if self.current_filename.get()!='Your Filename Here':
            self.dx=(self.max_gx-self.min_gx)/self.s1.get()
            self.s2.set(int(np.around((self.max_gy-self.min_gy)/self.dx)))
            self.s3.set(self.s1.get()*self.s2.get())
#        self.dx+=self.dx/4
#        floor=(np.floor(np.log10(self.dx)))
#        if floor<0:
#            self.dx=np.around(self.dx+self.dx/5,decimals=int(np.abs(floor)))
#            print(self.dx)

###############################################################################
###############################################################################        
      
    
    def _update_bar2(self):                          #update value of bar2
        self._job = None
        dx=(self.max_gx-self.min_gx)/self.s1.get()
        self.s2.set(int(np.around((self.max_gy-self.min_gy)/dx)))
        self.s3.set(self.s1.get()*self.s2.get())
        self.plot_grid()

###############################################################################
###############################################################################

        
    def load_file(self):

        
        '''
        -----------------------------------------------------------------------
        This next section of code handles reading in a sample file. You can choose
        a csv, tab delimited text, or both .xls and .xlsx type excel files. Some
        errors are raised if there is a problem with the text file, but it is not
        all encompassing. 
        -----------------------------------------------------------------------
        '''
        
        
        if self.use_rand_val.get()==1: 
            self.sample=self.random_sample.copy()
        else:
            ###############################################
            #activeate this in the final version. easier ot hardcode for now
    #        filename = tk.filedialog.askopenfilename(title = "Select X, Y, Strike data")      # Open single file
            self.current_filename.set(tk.filedialog.askopenfilename(title = "Select X, Y, Strike data")  )
            ################################################
            
            if ".txt" in self.current_filename.get() or ".csv" in self.current_filename.get():
#                print(type(self.current_filename.get()))
                with open(self.current_filename.get()) as self.f:
                    try:
                        self.content = self.f.read()
                    except IndexError as err:
                        messagebox.showerror("File Type Error", "Selected File Is Not of the Correct Type \n\n Select One of The Following Types [.csv, .txt, .xlsx, .xls] \n\n This is the actual error for debugging purposes: \n{}".format(err))
                if '\t' in self.content:               
                    self.sample=pd.read_csv(self.current_filename.get(), sep='\t').values.T
                else: 
                    self.sample=pd.read_csv(self.current_filename.get()).values.T
            
            elif ".xls" in self.current_filename.get() or ".xlsx" in self.current_filename.get():
                try:
                    self.sample=pd.read_excel(self.current_filename.get()).values.T
                except:
                    messagebox.showerror("File Error", "An Unknown Error Occurred Loading and Excel File")
                    
            else:
                messagebox.showerror("File Error", "An Unknown Error Occurred Loading File \n\n Check That File Is Correct Type \n\n Select One of The Following Types [.csv, .txt, .xlsx, .xls]")
                 
                
            '''
            7/10/20
            -----------------------------------
            Ideally I would eventually add something here to actually make sure you gotta data in
            '''
#                try:
#            self.col_len=len(self.sample[:,0])
                    
#            if len(self.sample)==0: 
#                raise Exception('Your filetype appears to ".csv" or ".txt" but no tab delimited or comma delimited data was found')
            
                
        
        '''
        7/10/20
        --------------
        Commenting code form about a year ago. The following section handles 
        the creation of a grid around the sample points. The idea is to expand 
        the grid to be 1% larger than the maximum extents of the sample data. 
        I had to modify this on 7/10/20 because the old method didnt work if the
        scale of the data was a lot smaller than the overall scale being used 
        (like UTM)
        '''
        
        self.bulk_mean_val.set(np.round(np.median(self.sample[2,:]), decimals=1))
        self.bulk_sigma_val.set(np.round(np.std(self.sample[2,:]), decimals=1))
        self.recommend_theta()
        self.bin_center.set(self.bulk_mean_val.get())
        
        x=self.sample[0]
        y=self.sample[1]
        self.min_x=min(x)
        self.min_y=min(y)
        
        self.max_x=max(x)
        self.max_y=max(y)
        self.x_scale=self.max_x-self.min_x
        self.y_scale=self.max_y-self.min_y
        
        self.min_gx=min(x)-0.01*self.x_scale
        self.min_gy=min(y)-0.01*self.y_scale
        self.max_gx=max(x)+0.01*self.x_scale
        self.max_gy=max(y)+0.01*self.y_scale
        self.dx=(self.max_gx-self.min_gx)/self.s1.get()
#        self.dy=(self.max_gy-self.min_gy)/self.s2.get()
        
        self.plot_bin_spin()
        self.plot_grid()

###############################################################################
###############################################################################

    
    def recommend_theta(self):
        theta=np.round(4*self.bulk_sigma_val.get()/self.neighbors_val.get(),decimals=1)
        self.Label17.config(text=theta)
        #hold

###############################################################################
###############################################################################
    
    def quitit(self):
        
        root.quit()
        root.destroy()
        sys.exit("Script No Longer Running")
    

###############################################################################
###############################################################################

    
    def plotbins(self):
        plot_bins=[0,30,60,90,120,150,180,210,240,270,300,330,360]
        
        
        
        if self.custom_bin_check.get()==1:
            plot_bins=np.deg2rad(np.array(plot_bins))
            plot_bins+=np.deg2rad(float(self.bin_center.get())-15)
            plot_bins=np.around(np.rad2deg(plot_bins),0).tolist()
            plot_bins.append(0)
            plot_bins.append(180)
        
#        plot_bins=[x-360 if x>360 else x for x in plot_bins]
        plot_bins=[int(x-360) if x>360 else int(x) for x in plot_bins]
        plot_bins=[int(x+360) if x<0 else int(x) for x in plot_bins]
        plot_bins=list(set(plot_bins))
        plot_bins.sort()
        return plot_bins

###############################################################################
###############################################################################
    
    def analyse(self):
        #this function pretty much calls everything else
        global test_df
        global test_out_df
        
        neighbors=self.neighbors_val.get()
        theta=self.theta_val.get()
        bins=self.plotbins()
        grid_n=self.s3.get()
        self.uniform_sample=self.sample.copy()
        
#        print(self.uniform_sample.shape)
#        np.random.seed(1)
#        print(len(self.uniform_sample[2,:]))
#        print(np.random.uniform(low=0,high=180, size=len(self.sample[2,:])))
        self.uniform_sample[2,:]=np.random.uniform(low=0,high=180, size=len(self.sample[2,:]))
        
        
        self.output_df=MODOAnalysis.analysis(self.sample, neighbors, bins, theta,grid_n, self.grid_xy)
        self.pointwise_mult=MODOAnalysis.analysis(self.sample, neighbors, bins, theta,grid_n, self.sample[0:2,:].T)
        self.uniform_df=MODOAnalysis.analysis(self.uniform_sample, neighbors, bins, theta,grid_n, self.grid_xy)
        if self.cuttoff.get()==1:
            self.output_df['Cuttoff']=np.where(self.output_df['Max Dist']<float(self.cuttoff_r.get()),'Keep','Cut')
        self.plot_bin_spin()
        self.plot_grid()
        self.plot_multinomial()
        self.plot_beta_cont()
        self.plot_beta_mult()
        self.plot_hist()
        self.plot_fdense()
        self.plot_log_fdense()
        self.plot_unitform_mult()
        self.plot_unitform_beta()
        self.plot_frac_dense_mult()
        self.plot_frac_dense_beta()
        self.plot_multinomial_points()
        self.plot_beta_points()
        self.plot_bin_spin_art()
        np.random.seed(1234)

###############################################################################
###############################################################################

 
    def export_text(self):
        filename=asksaveasfilename(defaultextension=".xlsx",
                                   filetypes=(("Excel Workbook", "*.xlsx"),
                                              ("Comma Separated Values", "*.csv"),
                                              ("1997-2003 Excel Workbook", "*.xls") ))
        
#        print(filename)
        #Try to check that we get the write filename, then write the File
        if str(filename).split('.')[0]==str(filename).split('.')[-1]:
            messagebox.showerror("File Extension Error", "No File Extension Selected")
        elif 'xl' in str(filename).split('.')[-1]:
            self.output_df.to_excel(str(filename),index=False)
        elif 'csv' in str(filename).split('.')[-1]: 
            self.output_df.to_csv(str(filename),index=False) 
        else:
            messagebox.showerror("Filename Error", "Inappropriate File Extension or Path")


###############################################################################
###############################################################################
        
    def update_mult(self):
        if self.init==True:
            self.plot_multinomial()
            
###############################################################################
###############################################################################
            
    def plot_multinomial(self):
        self.init=True
        if self.mult_cont_fig==None:
            self.mult_cont_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.mult_cont_fig.clf()
#        self.mult_cont_ax.cla()
        self.mult_cont_ax=self.mult_cont_fig.add_subplot(111)
#        xy=np.vstack([self.output_df['x'].values,self.output_df['y'].values]) #i think this is needed for other gridding algorithms
        
        
        if self.mult_slide==False:
            self.y_num=int(np.around((self.max_gy-self.min_gy)/((self.max_gx-self.min_gx)/50)))
    #        if grid_n>y_num*50
            self.cont_grid_xy = np.array(list(itertools.product(
                    np.linspace(self.min_gx,self.max_gx,num=50),
                    np.linspace(self.min_gy,self.max_gy,num=self.y_num)))) 
#            self.cont_grid_x=self.cont_grid_xy[:,0]
#            self.cont_grid_y=self.cont_grid_xy[:,1]
            
            #-----------------------------------------------------
            #needed to add this to solve contouring problems
            self.cont_grid_x_total=self.cont_grid_xy[:,0]
            self.cont_grid_y_total=self.cont_grid_xy[:,1]
            self.cont_grid_x=np.linspace(min(self.cont_grid_x_total),max(self.cont_grid_x_total),100)
            self.cont_grid_y=np.linspace(min(self.cont_grid_y_total),max(self.cont_grid_y_total),100)
            #-----------------------------------------------------------------
            
            self.mult_zi = griddata(self.output_df['x'].values,self.output_df['y'].values,
                          self.output_df['Multinomial'].values,
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')
            
        if self.mult_cont_rng_scale_val.get()==1:
#            print('test')
            cont_max=np.max(self.output_df['Multinomial'])
            num=11
        elif self.mult_cont_rng_scale_val.get()==2:
            cont_max=float(self.cont_max.get())
            num=int(np.around(float(self.cont_num.get())))
        else:
            cont_max=int(np.around(self.neighbors_val.get()*0.7782 + 3E-14,0))+2
            num=11
        
        #print(self.cont_grid_y)    
        self.contour=self.mult_cont_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.mult_zi,
                                  levels=np.linspace(start=0,stop=cont_max, num=num, endpoint=True),
                                  cmap=cm.get_cmap(self.user_mult_cmap.get()))
        self.mult_cont_cbar=self.mult_cont_fig.colorbar(self.contour)
        
        if self.mult_cont_axis_label_val.get()==1:
            self.mult_cont_ax.set_title(self.mult_cont_title.get())
            self.mult_cont_ax.set_xlabel(self.mult_cont_x_name.get())
            self.mult_cont_ax.set_ylabel(self.mult_cont_y_label.get())
        
        
        '''this rotates the strikes so they are drawn correctly'''
        angles=-1*self.sample[2,:]+90
        
        self.mult_cont_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.mult_strike_marker,
          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.mult_cont_canvas==None:
            self.mult_cont_canvas =  FigureCanvasTkAgg(self.mult_cont_fig, master=self.Mult_Contour)        
        self.mult_cont_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.mult_cont_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.mult_cont_canvas.draw()
        self.mult_slide=False
        
        if self.mult_toolbar==None:
            self.mult_toolbar=tkagg.NavigationToolbar2Tk(self.mult_cont_canvas, self.tab1_frame)
        
        self.mult_toolbar.update()
        self.tab1_frame.place(relx=0.52, rely=0.928, relheight=0.05
                , relwidth=0.454)
        self.mult_cont_canvas.get_tk_widget().pack(fill="both", expand=True)

##############################################################################
##############################################################################

    ##############################################################################
    '''
    Handle Plotting point plots at sample locations
    '''
    ##############################################################################

    def plot_multinomial_points(self):
        self.init=True
        if self.mult_point_fig==None:
            self.mult_point_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.mult_point_fig.clf()
#        self.mult_point_ax.cla()
        self.mult_point_ax=self.mult_point_fig.add_subplot(111)


        '''
        will probably need this
        '''
#        if self.mult_point_axis_label_val.get()==1:
#            self.mult_point_ax.set_title(self.mult_point_title.get())
#            self.mult_point_ax.set_xlabel(self.mult_point_x_label.get())
#            self.mult_point_ax.set_ylabel(self.mult_point_y_label.get())
        
        #create scatterplot
        self.mult_point_ax_scatter=self.mult_point_ax.scatter(self.sample[0,:], self.sample[1,:],
                                   c=self.pointwise_mult.Multinomial,
                                   vmin=0,
                                   vmax=max(self.pointwise_mult.Multinomial),
                                   cmap=self.user_mult_point_cmap.get(),
                                   s=self.mult_point_marker)
        
        self.mult_point_fig.colorbar(self.mult_point_ax_scatter,ax=self.mult_point_ax)
        
        if self.mult_point_canvas==None:
            self.mult_point_canvas =  FigureCanvasTkAgg(self.mult_point_fig, master=self.Mult_Points)        
        self.mult_point_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        
        self.mult_point_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.mult_point_canvas.draw()
        
        
        
        self.mult_point_slide=False
        
        if self.mult_point_toolbar==None:
            self.mult_point_toolbar=tkagg.NavigationToolbar2Tk(self.mult_point_canvas, self.tab2_mult_frame)
        
        self.mult_point_toolbar.update()
        self.tab2_mult_frame.place(relx=0.52, rely=0.928, relheight=0.05
                , relwidth=0.454)
        self.mult_point_canvas.get_tk_widget().pack(fill="both", expand=True)



###############################################################################
###############################################################################



    def mult_strike_size(self,val):
        self.mult_strike_marker=int(val)/8
        self.mult_slide=True
        
        self.plot_multinomial()

###############################################################################
###############################################################################



    def mult_point_size(self,val):
        self.mult_point_marker=int(val)/8
        self.mult_point_slide=True
        
        self.plot_multinomial_points()

###############################################################################
###############################################################################


    def beta_strike_size(self,val):
        self.beta_strike_marker=int(val)/8
        self.beta_slide=True
        
        self.plot_beta_cont()

###############################################################################
###############################################################################

    def beta_point_size(self,val):
        self.beta_point_marker=int(val)/8
        self.beta_point_slide=True
        
        self.plot_beta_points()

###############################################################################
###############################################################################






    def mult_cont_cmap(self,x,y,z):
        #update multinomial contour plot with new cmap
       self.plot_multinomial() 
###############################################################################
###############################################################################


    def mult_point_cmap(self,x,y,z):
        #update multinomial contour plot with new cmap
       self.plot_multinomial_points() 

###############################################################################
###############################################################################
    def beta_point_cmap(self,x,y,z):
        #update multinomial contour plot with new cmap
       self.plot_beta_points() 

###############################################################################
###############################################################################

    def plot_beta_cont(self):
        #this is the code that handles the beta contour plot
        if self.beta_cont_fig==None:
            self.beta_cont_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.beta_cont_fig.clf()
        self.beta_cont_ax=self.beta_cont_fig.add_subplot(111)
        
        
        if self.beta_slide==False:
            
            self.beta_zi = griddata(self.output_df['x'].values,self.output_df['y'].values,
                          self.output_df['Beta'].values,
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')

        self.beta_contour=self.beta_cont_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.beta_zi,
                                  levels=np.linspace(start=0,stop=1, num=11, endpoint=True),
                                  cmap=cm.get_cmap(self.user_beta_cmap.get()))


        self.beta_cont_cbar=self.beta_cont_fig.colorbar(self.beta_contour)
        
        #if the checkbox is clicked then plot the axis labels
        if self.beta_chart_axis_label_val.get()==1:
            self.beta_cont_ax.set_title(self.beta_chart_title.get())
            self.beta_cont_ax.set_xlabel(self.beta_chart_x_name.get())
            self.beta_cont_ax.set_ylabel(self.beta_chart_y_label.get())

        '''this is how the strikes are drawn'''
        angles=-1*self.sample[2,:]+90
        self.beta_cont_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.beta_strike_marker,
          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.beta_cont_canvas==None:
            self.beta_cont_canvas =  FigureCanvasTkAgg(self.beta_cont_fig, master=self.BetaContCanvas)        
        self.beta_cont_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.beta_cont_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.beta_cont_canvas.draw()
        self.beta_slide=False

       #neeed to figure out htis toolbar part
        if self.beta_toolbar==None:
            self.beta_toolbar=tkagg.NavigationToolbar2Tk(self.beta_cont_canvas, self.tab1_beta_frame)
        
        self.beta_toolbar.update()
        self.tab1_beta_frame.place(relx=0.020, rely=0.928, relheight=0.05
                , relwidth=0.454)
        self.beta_cont_canvas.get_tk_widget().pack(fill="both", expand=True)

###############################################################################
###############################################################################

    ##############################################################################
    '''
    Handle plotting beta plots at sample locations
    '''
    ##############################################################################

    def plot_beta_points(self):
        self.init=True
        if self.beta_point_fig==None:
            self.beta_point_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.beta_point_fig.clf()
#        self.beta_point_ax.cla()
        self.beta_point_ax=self.beta_point_fig.add_subplot(111)


        '''
        will probably need this
        '''
#        if self.beta_point_axis_label_val.get()==1:
#            self.beta_point_ax.set_title(self.beta_point_title.get())
#            self.beta_point_ax.set_xlabel(self.beta_point_x_label.get())
#            self.beta_point_ax.set_ylabel(self.beta_point_y_label.get())
        
        
        
        #create scatterplot
        self.beta_point_ax_scatter=self.beta_point_ax.scatter(self.sample[0,:], self.sample[1,:],
                                   c=self.pointwise_mult.Beta,
                                   vmin=0,
                                   vmax=1,
                                   cmap=self.user_beta_point_cmap.get(),
                                   s=self.beta_point_marker)
        
        self.beta_point_fig.colorbar(self.beta_point_ax_scatter,ax=self.beta_point_ax)
        
        if self.beta_point_canvas==None:
            self.beta_point_canvas =  FigureCanvasTkAgg(self.beta_point_fig, master=self.Beta_Points)        
        self.beta_point_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        
        self.beta_point_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.beta_point_canvas.draw()
        
        
        
#        self.mult_slide=False
        
        if self.beta_point_toolbar==None:
            self.beta_point_toolbar=tkagg.NavigationToolbar2Tk(self.beta_point_canvas, self.tab2_beta_frame)
        
        self.beta_point_toolbar.update()
        self.tab2_beta_frame.place(relx=0.020, rely=0.928, relheight=0.05
                , relwidth=0.454)
        self.beta_point_canvas.get_tk_widget().pack(fill="both", expand=True)
###############################################################################
###############################################################################
      

    def plot_unitform_mult(self):
        #this is the code that handles the fracture density contour plot
        if self.uniform_mult_fig==None:
            self.uniform_mult_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.uniform_mult_fig.clf()
        self.uniform_mult_ax=self.uniform_mult_fig.add_subplot(111)
        
        
        self.uniform_mult_zi = griddata(self.uniform_df['x'].values,self.uniform_df['y'].values,
                          self.uniform_df['Multinomial'].values,
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')
        cont_max=int(np.around(self.neighbors_val.get()*0.7782 + 3E-14,0))+2
        self.uniform_mult_contour=self.uniform_mult_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.uniform_mult_zi,
                                  levels=np.linspace(start=0,stop=cont_max, num=11, endpoint=True),
                                  cmap=cm.get_cmap(self.user_mult_cmap.get()))


        self.uniform_mult_cbar=self.uniform_mult_fig.colorbar(self.uniform_mult_contour)


        '''this is how the strikes are drawn'''
#        angles=self.sample[2,:]+90
#        self.uniform_mult_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.uniform_mult_strike_marker,
#          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        
        if self.uniform_mult_canvas==None:
            self.uniform_mult_canvas =  FigureCanvasTkAgg(self.uniform_mult_fig, master=self.UniformStrikeMultinomial)        
        self.uniform_mult_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.uniform_mult_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.uniform_mult_canvas.draw()

       #right now I don't want a toolbar for this
#        if self.fdense_toolbar==None:
#            self.fdense_toolbar=tkagg.NavigationToolbar2Tk(self.fdense_canvas, self.tab1_fdense_frame)
#        
#        self.fdense_toolbar.update()
#        self.tab1_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05
#                , relwidth=0.454)
#        self.fdense_canvas.get_tk_widget().pack(fill="both", expand=True)

       
###############################################################################
###############################################################################
       

    def plot_unitform_beta(self):
        #this is the code that handles the fracture density contour plot
        if self.uniform_beta_fig==None:
            self.uniform_beta_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.uniform_beta_fig.clf()
        self.uniform_beta_ax=self.uniform_beta_fig.add_subplot(111)
        
        
        self.uniform_beta_zi = griddata(self.uniform_df['x'].values,self.uniform_df['y'].values,
                          self.uniform_df['Beta'].values,
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')

        self.uniform_beta_contour=self.uniform_beta_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.uniform_beta_zi,
                                  levels=np.linspace(start=0,stop=1, num=11, endpoint=True),
                                  cmap=cm.get_cmap(self.user_beta_cmap.get()))


        self.uniform_beta_cbar=self.uniform_beta_fig.colorbar(self.uniform_beta_contour)


        '''this is how the strikes are drawn'''
#        angles=self.sample[2,:]+90
#        self.uniform_beta_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.uniform_beta_strike_marker,
#          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        
        if self.uniform_beta_canvas==None:
            self.uniform_beta_canvas =  FigureCanvasTkAgg(self.uniform_beta_fig, master=self.UniformStrikeBeta)        
        self.uniform_beta_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.uniform_beta_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.uniform_beta_canvas.draw()

       #right now I don't want a toolbar for this
#        if self.fdense_toolbar==None:
#            self.fdense_toolbar=tkagg.NavigationToolbar2Tk(self.fdense_canvas, self.tab1_fdense_frame)
#        
#        self.fdense_toolbar.update()
#        self.tab1_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05
#                , relwidth=0.454)
#        self.fdense_canvas.get_tk_widget().pack(fill="both", expand=True)

       
###############################################################################
###############################################################################
      

    def plot_fdense(self):
        #this is the code that handles the fracture density contour plot
        if self.fdense_fig==None:
            self.fdense_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.fdense_fig.clf()
        self.fdense_ax=self.fdense_fig.add_subplot(111)
        

        self.fdense_zi = griddata(self.output_df['x'].values,self.output_df['y'].values,
                          self.output_df['Fracture Density'].values,
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')

        self.fdense_contour=self.fdense_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.fdense_zi,
                                  levels=np.linspace(start=np.min(self.output_df['Fracture Density']),stop=np.max(self.output_df['Fracture Density']), num=11, endpoint=True),
                                  cmap=cm.get_cmap(self.user_mult_cmap.get()))


        self.fdense_cbar=self.fdense_fig.colorbar(self.fdense_contour)


        '''this is how the strikes are drawn'''
#        angles=self.sample[2,:]+90
#        self.fdense_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.fdense_strike_marker,
#          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        
        if self.fdense_canvas==None:
            self.fdense_canvas =  FigureCanvasTkAgg(self.fdense_fig, master=self.FractureDensityCanvas)        
        self.fdense_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.fdense_canvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        self.fdense_canvas.draw()

       #right now I don't want a toolbar for this
#        if self.fdense_toolbar==None:
#            self.fdense_toolbar=tkagg.NavigationToolbar2Tk(self.fdense_canvas, self.tab1_fdense_frame)
#        
#        self.fdense_toolbar.update()
#        self.tab1_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05
#                , relwidth=0.454)
#        self.fdense_canvas.get_tk_widget().pack(fill="both", expand=True)

###############################################################################
###############################################################################
      

    def plot_log_fdense(self):
        #this is the code that handles the fracture density contour plot
        if self.log_fdense_fig==None:
            self.log_fdense_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.log_fdense_fig.clf()
        self.log_fdense_ax=self.log_fdense_fig.add_subplot(111)
        

        self.log_fdense_zi = griddata(self.output_df['x'].values,self.output_df['y'].values,
                          np.log(self.output_df['Fracture Density'].values),
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')

        self.log_fdense_contour=self.log_fdense_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.log_fdense_zi,
                                  levels=np.linspace(start=np.min(np.log(self.output_df['Fracture Density'])),
                                                     stop=np.max(np.log(self.output_df['Fracture Density'])),
                                                     num=11, endpoint=True),
                                                     cmap=cm.get_cmap(self.user_mult_cmap.get()))


        self.log_fdense_cbar=self.log_fdense_fig.colorbar(self.log_fdense_contour)


        '''this is how the strikes are drawn'''
#        angles=self.sample[2,:]+90
#        self.log_fdense_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.log_fdense_strike_marker,
#          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        
        if self.log_fdense_canvas==None:
            self.log_fdense_canvas =  FigureCanvasTkAgg(self.log_fdense_fig, master=self.LogFracDensityCanvas)        
        self.log_fdense_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.log_fdense_canvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        self.log_fdense_canvas.draw()

       #right now I don't want a toolbar for this
#        if self.log_fdense_toolbar==None:
#            self.log_fdense_toolbar=tkagg.NavigationToolbar2Tk(self.log_fdense_canvas, self.tab1_log_fdense_frame)
#        
#        self.log_fdense_toolbar.update()
#        self.tab1_log_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05
#                , relwidth=0.454)
#        self.log_fdense_canvas.get_tk_widget().pack(fill="both", expand=True)

###############################################################################
###############################################################################


    def beta_cont_cmap(self,x,y,z):
        #this function updates the plot with a new type of cmap
       self.plot_beta_cont() 

##############################################################################
###############################################################################       
    def plot_bin_spin(self):
        '''Updates bin spin visualization'''
        '''Learned a very important lesson on this one
        1. Plot elements need to be part of the class 'TopLevel1'
        or you cannot refer to them to update them
        2. Need to make sure not re redefine any plot 
        element like 'self.binspin_fig = Figure()' more 
        than once. This will precent you from being able to update
        that plot element later. The first if statements after this
        comment are examples of preventing this error.
        
        '''
        if self.binspin_fig==None:         
            self.binspin_fig = Figure()
        if self.ax==None: 
            self.ax = self.binspin_fig.add_subplot(111, projection='polar')
        
        self.ax.cla()
        self.ax.set_theta_zero_location("N")
        self.ax.set_theta_direction(-1)

        plot_bins=self.plotbins()
        ticks=[]
        counter=0
        for item in plot_bins:
            if len(plot_bins)==13:
                if item in [0,180,90]:
                    ticks.append(str(item)+'\u00b0')
                else:
                    ticks.append('')
            else:    
                if counter in [0,3,5,7]:
                    ticks.append(str(item)+'\u00b0')
                else:
                    ticks.append('')
                counter+=1
#        print(plot_bins)
        self.ax.set_thetagrids(plot_bins,zorder=1) 
        self.ax.set_xticklabels(ticks)
        
        labels= [label for label in self.ax.xaxis.get_majorticklabels()]
        if len(plot_bins)==13:
            labels[0].set_transform(labels[0].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0, -10/72, self.binspin_fig.dpi_scale_trans))
            labels[3].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -4/72, -8/72, self.binspin_fig.dpi_scale_trans))
            labels[6].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -10/72, -13/72, self.binspin_fig.dpi_scale_trans))
            self.binspin_fig.subplots_adjust(left=0.05, bottom=0.1, top=0.90, right=0.85)
        else:
            labels[0].set_transform(labels[0].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0, -10/72, self.binspin_fig.dpi_scale_trans))
            labels[3].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -1/72, -5/72, self.binspin_fig.dpi_scale_trans))
            labels[5].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0/72, -13/72, self.binspin_fig.dpi_scale_trans))
            labels[7].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -10/72, -17/72, self.binspin_fig.dpi_scale_trans))
            self.binspin_fig.subplots_adjust(left=0.05, bottom=0.05, top=0.95, right=0.85)
#        
        bins=list(np.arange(0,181,1))
#        print(bins)
        hist=np.histogram(self.sample[2,:],bins=bins)
        self.ax.set_ylim(0,np.max(hist[0]*1.05))
        
        
        plot_hist=hist[0].tolist()
        plot_hist.extend(plot_hist)
        
        plot_bins=np.arange(0,360,1)
        
        width=((2*np.pi)/360)
        self.ax.bar(np.deg2rad(plot_bins),plot_hist, width=width, facecolor='r',zorder=2)
        
        if self.canvas==None:
            self.canvas =  FigureCanvasTkAgg(self.binspin_fig, master=self.BinSpin)
        
        self.canvas.get_tk_widget().pack()
        self.canvas.draw()
        

        #also plot the rose on the smaple summary page 
#        if self.rose_canvas==None:
#            self.rose_canvas =  FigureCanvasTkAgg(self.binspin_fig, master=self.RoseCanvas)
#        
#        self.rose_canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=1)
#        self.rose_canvas.draw()
        self.plot_grid()


##############################################################################
###############################################################################       
    def plot_bin_spin_art(self):
        '''Updates bin spin visualization for the artificial data'''
        
        if self.artificial_binspin_fig==None:         
            self.artificial_binspin_fig = Figure()
        if self.artificial_rose_ax==None: 
            self.artificial_rose_ax = self.artificial_binspin_fig.add_subplot(111, projection='polar')
        
        self.artificial_rose_ax.cla()
        self.artificial_rose_ax.set_theta_zero_location("N")
        self.artificial_rose_ax.set_theta_direction(-1)

        plot_bins=self.plotbins()
        ticks=[]
        counter=0
        for item in plot_bins:
            if len(plot_bins)==13:
                if item in [0,180,90]:
                    ticks.append(str(item)+'\u00b0')
                else:
                    ticks.append('')
            else:    
                if counter in [0,3,5,7]:
                    ticks.append(str(item)+'\u00b0')
                else:
                    ticks.append('')
                counter+=1
#        print(plot_bins)
        self.artificial_rose_ax.set_thetagrids(plot_bins,zorder=1) 
        self.artificial_rose_ax.set_xticklabels(ticks)
        
        labels= [label for label in self.artificial_rose_ax.xaxis.get_majorticklabels()]
        if len(plot_bins)==13:
            labels[0].set_transform(labels[0].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0, -10/72, self.artificial_binspin_fig.dpi_scale_trans))
            labels[3].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -4/72, -8/72, self.artificial_binspin_fig.dpi_scale_trans))
            labels[6].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -10/72, -13/72, self.artificial_binspin_fig.dpi_scale_trans))
            self.artificial_binspin_fig.subplots_adjust(left=0.05, bottom=0.1, top=0.90, right=0.85)
        else:
            labels[0].set_transform(labels[0].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0, -10/72, self.artificial_binspin_fig.dpi_scale_trans))
            labels[3].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -1/72, -5/72, self.artificial_binspin_fig.dpi_scale_trans))
            labels[5].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0/72, -13/72, self.artificial_binspin_fig.dpi_scale_trans))
            labels[7].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -10/72, -17/72, self.artificial_binspin_fig.dpi_scale_trans))
            self.artificial_binspin_fig.subplots_adjust(left=0.05, bottom=0.05, top=0.95, right=0.85)
#        
        bins=list(np.arange(0,181,1))
#        print(bins)
        hist=np.histogram(self.sample[2,:],bins=bins)
        self.artificial_rose_ax.set_ylim(0,np.max(hist[0]*1.05))
        
        
        plot_hist=hist[0].tolist()
        plot_hist.extend(plot_hist)
        
        plot_bins=np.arange(0,360,1)
        
        width=((2*np.pi)/360)
        self.artificial_rose_ax.bar(np.deg2rad(plot_bins),plot_hist, width=width, facecolor='r',zorder=2)
        
        if self.artifical_bin_canvas==None:
            self.artifical_bin_canvas =  FigureCanvasTkAgg(self.artificial_binspin_fig, master=self.BinSpin_a)
        
        self.artifical_bin_canvas.get_tk_widget().pack()
        self.artifical_bin_canvas.draw()
        

        #also plot the rose on the smaple summary page 
#        if self.rose_canvas==None:
#            self.rose_canvas =  FigureCanvasTkAgg(self.artificial_binspin_fig, master=self.RoseCanvas)
#        
#        self.rose_canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=1)
#        self.rose_canvas.draw()
        #self.plot_grid()
        
                
        
###############################################################################
###############################################################################    
    def plot_grid(self):
        
        if self.preview_fig==None:
            self.preview_fig=Figure()
        if self.preview_ax==None:
            self.preview_ax=self.preview_fig.add_subplot(111)
        
        #------------------------------------------------------------------------------
        #This next line is very important, it uses permuations to get the grid locs
        self.grid_xy = np.array(list(itertools.product(
                np.linspace(self.min_gx,self.max_gx,num=self.s1.get()),
                np.linspace(self.min_gy,self.max_gy,num=self.s2.get())))) 
#        print(np.shape(self.grid_xy))
        
        sample_x=self.sample[0,:]
        sample_y=self.sample[1,:]
        
        
        

        
        if self.output_df is not None and self.cuttoff.get()==1:
            grid_x=self.output_df[self.output_df['Max Dist']<float(self.cuttoff_r.get())]['x']
            grid_y=self.output_df[self.output_df['Max Dist']<float(self.cuttoff_r.get())]['y']
            
        else:
            grid_x=self.grid_xy[:,0]
            grid_y=self.grid_xy[:,1]

        if self.output_df is not None:
             average_max_d=self.output_df['Max Dist'].mean()
             self.Average_Dist_Label.configure(text='''Average Distance to {}th Fracture: {:.5f}'''.format(self.neighbors_val.get(),average_max_d))
             self.Average_Dist_Label.configure(font=self.font15)
        
        self.preview_ax.cla()
        self.preview_ax.scatter(sample_x,sample_y,s=6,marker='o',c='g',alpha=0.6,edgecolors ='none', label='Sample Locations')
        self.preview_ax.scatter(grid_x,grid_y,s=50,marker='+',c='0',alpha=0.5,linewidth=1, label='Grid Locations')
#        self.preview_ax.set_aspect(aspect='equal')
        self.preview_ax.set_title('Sample and Grid Locations')
        self.preview_ax.legend(loc=1)
        
        self.preview_ax.set_aspect(aspect=((self.max_gx-self.min_gx)/(self.max_gy-self.min_gy)))
        
        if self.previewcanvas==None:
            self.previewcanvas =  FigureCanvasTkAgg(self.preview_fig, master=self.PreviewCanvas)        
        self.previewcanvas.get_tk_widget().pack()
        
        self.previewcanvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        
        self.previewcanvas.draw()
        if self.preview_toolbar==None:
            self.preview_toolbar=tkagg.NavigationToolbar2Tk(self.previewcanvas, self.tab0_frame)
        
        self.preview_toolbar.update()
        self.tab0_frame.place(relx=0.47, rely=0.835, relheight=0.05
                , relwidth=0.525)
        self.previewcanvas.get_tk_widget().pack(fill="both", expand=True)

###############################################################################
###############################################################################
    def plot_hist(self):
        if self.hist_fig==None:
            self.hist_fig=Figure()
        if self.hist_ax==None:
            self.hist_ax=self.hist_fig.add_subplot(111)
        
        self.hist_ax.cla()
#        print(self.output_df['Multinomial']==self.uniform_df['Multinomial'])
        
        sns.kdeplot(self.uniform_df['Multinomial'],ax=self.hist_ax, shade=True,legend=False,color='b')
        sns.kdeplot(self.output_df['Multinomial'],ax=self.hist_ax, shade=True,legend=False, color='g',zorder=0)
        self.hist_ax.legend(labels=['Uniform', 'Sample'])
#        g._legend.texts.set_text('test')
            
            
        self.hist_ax.set_title('Histogram')
        self.hist_ax.set_ylabel('Multinomial')
        self.hist_ax.set_xlabel('Frequency')
        
        if self.hist_canvas==None:
            self.hist_canvas =  FigureCanvasTkAgg(self.hist_fig, master=self.HistogramCanvas)  
        
        self.hist_canvas.get_tk_widget().pack()
        
        self.hist_canvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        
        self.hist_canvas.draw()
        
        self.hist_canvas.draw()
        if self.hist_toolbar==None:
            self.hist_toolbar=tkagg.NavigationToolbar2Tk(self.hist_canvas, self.HistToolbarFrame)
        
        self.hist_toolbar.update()
        self.HistToolbarFrame.place(relx=0.53, rely=0.93, relheight=0.05
                , relwidth=0.44)
        self.hist_canvas.get_tk_widget().pack(fill="both", expand=True)
    
###############################################################################
###############################################################################   
    
    def plot_beta_mult(self):
        if self.beta_mult_fig==None:
            self.beta_mult_fig=Figure()
        if self.beta_mult_ax==None:
            self.beta_mult_ax=self.beta_mult_fig.add_subplot(111)
            
        self.beta_mult_ax.cla() #clear the figure to start afresh
        
        #this is the actual scatter plot of the Beta Vs Multinomial
        self.beta_mult_ax.scatter(self.output_df['Beta'], 
                                  self.output_df['Multinomial'], 
                                  alpha=0.5, c='g',
                                  edgecolors='none')
        self.beta_mult_ax.set_title('Correlation of Beta vs Multinomial')
        self.beta_mult_ax.set_ylabel('Multinomial')
        self.beta_mult_ax.set_xlabel('Beta')
        
        corr=np.corrcoef(self.output_df['Beta'], self.output_df['Multinomial'])[0,1]
        spearmanr=stats.spearmanr(self.output_df['Beta'], self.output_df['Multinomial'])[0]
        
        self.PearsonLabel.configure(text='Pearson Correlation (Beta vs Multinomial):{:+.2f}'.format(corr))
        self.FrontPearsonLabel.configure(text='Multinomial vs. Beta Pearson R:{:+.2f}'.format(corr))
        self.SpearmanLabel.configure(text='''Spearman Correlation (Beta vs Multinomial)::{:+.2f}'''.format(spearmanr))
#        self.beta_mult_ax.text(0.5,6,corr)
#        self.beta_mult_ax.text(0.5,7,spearmanr)
        
        if self.beta_mult_canvas==None:
            self.beta_mult_canvas =  FigureCanvasTkAgg(self.beta_mult_fig, master=self.CorrelationCanvas)  
        
        self.beta_mult_canvas.get_tk_widget().pack()
        
        self.beta_mult_canvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        
        self.beta_mult_canvas.draw()
        
        self.beta_mult_canvas.draw()
        if self.beta_mult_toolbar==None:
            self.beta_mult_toolbar=tkagg.NavigationToolbar2Tk(self.beta_mult_canvas, self.CorrToolbarFrame)
        
        self.beta_mult_toolbar.update()
        self.CorrToolbarFrame.place(relx=0.03, rely=0.93, relheight=0.05
                , relwidth=0.44)
        self.beta_mult_canvas.get_tk_widget().pack(fill="both", expand=True)
        
#        print('this is where I work')
        #self.HistogramCanvas

###############################################################################
###############################################################################

    def reroll_random(self):
        np.random.seed(None)
        self.analyse()
        np.random.seed(1234)

###############################################################################
###############################################################################

    def preview_equal_aspect(self):
        self.preview_ax.set_aspect(aspect='equal')
        self.previewcanvas.draw()

###############################################################################
###############################################################################
    
    
    def mult_equal_aspect(self):
        self.mult_cont_ax.set_aspect(aspect='equal')
        self.mult_cont_canvas.draw()



     

###############################################################################
###############################################################################
        
    def artificial_data(self):
        c1=(int(float(self.c1_n.get())),float(self.c1_mean.get()),float(self.c1_sigma.get()),
            float(self.c1_xmin.get()), float(self.c1_xmax.get()),float(self.c1_ymin.get()),
            float(self.c1_ymax.get()),self.c1_dist_val.get().lower())
        c2=(int(float(self.c2_n.get())),float(self.c2_mean.get()),float(self.c2_sigma.get()),
            float(self.c2_xmin.get()), float(self.c2_xmax.get()),float(self.c2_ymin.get()),
            float(self.c2_ymax.get()),self.c2_dist_val.get().lower())
        c3=(int(float(self.c3_n.get())),float(self.c3_mean.get()),float(self.c3_sigma.get()),
            float(self.c3_xmin.get()), float(self.c3_xmax.get()),float(self.c3_ymin.get()),
            float(self.c3_ymax.get()),self.c3_dist_val.get().lower())
        c4=(int(float(self.c4_n.get())),float(self.c4_mean.get()),float(self.c4_sigma.get()),
            float(self.c4_xmin.get()), float(self.c4_xmax.get()),float(self.c4_ymin.get()),
            float(self.c4_ymax.get()),self.c4_dist_val.get().lower())
        c5=(int(float(self.c5_n.get())),float(self.c5_mean.get()),float(self.c5_sigma.get()),
            float(self.c5_xmin.get()), float(self.c5_xmax.get()),float(self.c5_ymin.get()),
            float(self.c5_ymax.get()),self.c5_dist_val.get().lower())
        c6=(int(float(self.c6_n.get())),float(self.c6_mean.get()),float(self.c6_sigma.get()),
            float(self.c6_xmin.get()), float(self.c6_xmax.get()),float(self.c6_ymin.get()),
            float(self.c6_ymax.get()),self.c6_dist_val.get().lower())
        
#        print(getattr(np.random, 'uniform')(0,100,100))
        
        
        def generate_random(n,mean,sigma,xmin,xmax,ymin,ymax,dist):
            #this is where I generate an artificial smaple from user inputs
            
            if dist=='normal':
                ran_strike=np.random.normal(loc=mean, scale=sigma, size=n)
            elif dist=='uniform':
                ran_strike=np.random.uniform(low=mean-sigma, high=mean+sigma, size=n)
            
            ran_strike=[x+180  if x<0 else x for x in ran_strike]
            x=np.random.uniform(xmin,xmax,n)
            y=np.random.uniform(ymin,ymax,n)
            np.random.seed(1234)
            
            return np.array([x,y,ran_strike]).T
            
            
        np.random.seed(int(np.around(float(self.random_seed.get()),0)))
        self.c1=generate_random(*c1) if c1[0]>0 else None
        np.random.seed(int(np.around(float(self.random_seed.get()),0)+1))
        self.c2=generate_random(*c2) if c2[0]>0 else  None
        np.random.seed(int(np.around(float(self.random_seed.get()),0)+2))
        self.c3=generate_random(*c3) if c3[0]>0 else  None
        np.random.seed(int(np.around(float(self.random_seed.get()),0)+3))
        self.c4=generate_random(*c4) if c4[0]>0 else None
        np.random.seed(int(np.around(float(self.random_seed.get()),0)+4))
        self.c5=generate_random(*c5) if c5[0]>0 else  None
        np.random.seed(int(np.around(float(self.random_seed.get()),0)+5))
        self.c6=generate_random(*c6) if c6[0]>0 else  None
        
        if self.c1 is not None:
            self.random_sample=self.c1
        elif self.c2 is not None:
            self.random_sample=self.c2
        elif self.c3 is not None:
            self.random_sample=self.c3
        elif self.c4 is not None:
            self.random_sample=self.c4
        elif self.c5 is not None:
            self.random_sample=self.c5
        elif self.c6 is not None:
            self.random_sample=self.c6
            
        
        
        if self.c2 is not None: self.random_sample=np.append(self.random_sample,self.c2, axis=0)
        if self.c3 is not None: self.random_sample=np.append(self.random_sample,self.c3, axis=0)
        if self.c4 is not None: self.random_sample=np.append(self.random_sample,self.c4, axis=0)
        if self.c5 is not None: self.random_sample=np.append(self.random_sample,self.c5, axis=0)
        if self.c6 is not None: self.random_sample=np.append(self.random_sample,self.c6, axis=0)
        
        
        
        self.random_sample=self.random_sample.T
        
        self.artificial_sample_plot()
        self.plot_bin_spin_art()
        
###############################################################################
###############################################################################

 
    def artificial_sample_plot(self):
        
        if self.artificial_fig==None:
            self.artificial_fig=Figure()
        if self.artificial_ax==None:
            self.artificial_ax=self.artificial_fig.add_subplot(111)
        
#        sample_x=self.random_sample[0,:]
#        sample_y=self.random_sample[1,:]
        
        self.artificial_ax.cla()
#        self.artificial_ax.scatter(sample_x,sample_y,s=0.5,marker='o',c='g',alpha=0.8)
        if self.c1 is not None: self.artificial_ax.quiver(self.c1[:,0], self.c1[:,1], 1,1, angles=-1*self.c1[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.c2 is not None: self.artificial_ax.quiver(self.c2[:,0], self.c2[:,1], 1,1, angles=-1*self.c2[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.c3 is not None: self.artificial_ax.quiver(self.c3[:,0], self.c3[:,1], 1,1, angles=-1*self.c3[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.c4 is not None: self.artificial_ax.quiver(self.c4[:,0], self.c4[:,1], 1,1, angles=-1*self.c4[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.c5 is not None: self.artificial_ax.quiver(self.c5[:,0], self.c5[:,1], 1,1, angles=-1*self.c5[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.c6 is not None: self.artificial_ax.quiver(self.c6[:,0], self.c6[:,1], 1,1, angles=-1*self.c6[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        self.artificial_ax.set_ylabel('y')
        self.artificial_ax.set_xlabel('x')
        self.artificial_ax.set_title('Randomly Generated Sample')
        
        self.artificial_ax.set_aspect(aspect='equal')
        if self.artifical_canvas==None:
            self.artifical_canvas =  FigureCanvasTkAgg(self.artificial_fig, master=self.Artificial_Sample_Canvas)        
        self.artifical_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.artifical_canvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        self.artifical_canvas.draw()
        if self.use_rand_val.get()==1: self.load_file()
        
###############################################################################
###############################################################################
        

    def reset_random(self):
        self.c1_n.delete(0, 'end')
        self.c1_mean.delete(0, 'end')
        self.c1_sigma.delete(0, 'end')
        self.c1_xmin.delete(0, 'end')
        self.c1_xmax.delete(0, 'end')
        self.c1_ymin.delete(0, 'end')
        self.c1_ymax.delete(0, 'end')
        
        self.c2_n.delete(0, 'end')
        self.c2_mean.delete(0, 'end')
        self.c2_sigma.delete(0, 'end')
        self.c2_xmin.delete(0, 'end')
        self.c2_xmax.delete(0, 'end')
        self.c2_ymin.delete(0, 'end')
        self.c2_ymax.delete(0, 'end')
        
        self.c3_n.delete(0, 'end')
        self.c3_mean.delete(0, 'end')
        self.c3_sigma.delete(0, 'end')
        self.c3_xmin.delete(0, 'end')
        self.c3_xmax.delete(0, 'end')
        self.c3_ymin.delete(0, 'end')
        self.c3_ymax.delete(0, 'end')
        
        self.c4_n.delete(0, 'end')
        self.c4_mean.delete(0, 'end')
        self.c4_sigma.delete(0, 'end')
        self.c4_xmin.delete(0, 'end')
        self.c4_xmax.delete(0, 'end')
        self.c4_ymin.delete(0, 'end')
        self.c4_ymax.delete(0, 'end')
        
        self.c5_n.delete(0, 'end')
        self.c5_mean.delete(0, 'end')
        self.c5_sigma.delete(0, 'end')
        self.c5_xmin.delete(0, 'end')
        self.c5_xmax.delete(0, 'end')
        self.c5_ymin.delete(0, 'end')
        self.c5_ymax.delete(0, 'end')
        
        self.c6_n.delete(0, 'end')
        self.c6_mean.delete(0, 'end')
        self.c6_sigma.delete(0, 'end')
        self.c6_xmin.delete(0, 'end')
        self.c6_xmax.delete(0, 'end')
        self.c6_ymin.delete(0, 'end')
        self.c6_ymax.delete(0, 'end')
        
        
        self.c1_n.insert('end',0)
        self.c1_mean.insert('end',0)
        self.c1_sigma.insert('end',0)
        self.c1_xmin.insert('end',0)
        self.c1_xmax.insert('end',0)
        self.c1_ymin.insert('end',0)
        self.c1_ymax.insert('end',0)
        
        self.c2_n.insert('end',0)
        self.c2_mean.insert('end',0)
        self.c2_sigma.insert('end',0)
        self.c2_xmin.insert('end',0)
        self.c2_xmax.insert('end',0)
        self.c2_ymin.insert('end',0)
        self.c2_ymax.insert('end',0)
        
        self.c3_n.insert('end',0)
        self.c3_mean.insert('end',0)
        self.c3_sigma.insert('end',0)
        self.c3_xmin.insert('end',0)
        self.c3_xmax.insert('end',0)
        self.c3_ymin.insert('end',0)
        self.c3_ymax.insert('end',0)
        
        self.c4_n.insert('end',0)
        self.c4_mean.insert('end',0)
        self.c4_sigma.insert('end',0)
        self.c4_xmin.insert('end',0)
        self.c4_xmax.insert('end',0)
        self.c4_ymin.insert('end',0)
        self.c4_ymax.insert('end',0)
        
        self.c5_n.insert('end',0)
        self.c5_mean.insert('end',0)
        self.c5_sigma.insert('end',0)
        self.c5_xmin.insert('end',0)
        self.c5_xmax.insert('end',0)
        self.c5_ymin.insert('end',0)
        self.c5_ymax.insert('end',0)
        
        self.c6_n.insert('end',0)
        self.c6_mean.insert('end',0)
        self.c6_sigma.insert('end',0)
        self.c6_xmin.insert('end',0)
        self.c6_xmax.insert('end',0)
        self.c6_ymin.insert('end',0)
        self.c6_ymax.insert('end',0)
    
###############################################################################
###############################################################################

    def plot_frac_dense_mult(self):
        if self.frac_mult_fig==None:
            self.frac_mult_fig=Figure()
        if self.frac_mult_ax==None:
            self.frac_mult_ax=self.frac_mult_fig.add_subplot(111)
            
        self.frac_mult_ax.cla() #clear the figure to start afresh
        
        #this is the actual scatter plot of the Beta Vs Multinomial
        self.frac_mult_ax.scatter(self.output_df['Fracture Density'].values, 
                                  self.output_df['Multinomial'].values, 
                                  alpha=0.1, c='r',
                                  edgecolors='none', s=10)
        corr=np.corrcoef(self.output_df['Fracture Density'], self.output_df['Multinomial'])[0,1]
        self.frac_mult_ax.set_title('Correlation={:+.3f}'.format(corr), fontsize=9)
        self.frac_mult_ax.set_ylabel('Multinomial')
        self.frac_mult_ax.set_xlabel('Fracture Density')
        
#        spearmanr=stats.spearmanr(self.output_df['Beta'], self.output_df['Multinomial'])[0]
#        
#        self.PearsonLabel.configure(text='Pearson Correlation (Beta vs Multinomial):{:+.2f}'.format(corr))
#        self.FrontPearsonLabel.configure(text='Multinomial vs. Beta Pearson R:{:+.2f}'.format(corr))
#        self.SpearmanLabel.configure(text='''Spearman Correlation (Beta vs Multinomial)::{:+.2f}'''.format(spearmanr))
#        self.frac_mult_ax.text(0.5,6,corr)
#        self.frac_mult_ax.text(0.5,7,spearmanr)
        
        if self.frac_mult_canvas==None:
            self.frac_mult_canvas =  FigureCanvasTkAgg(self.frac_mult_fig, master=self.FracDenseMultCanvas)  
        
        self.frac_mult_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.frac_mult_canvas._tkcanvas.config(highlightthickness=1, highlightcolor ='black')
        
        self.frac_mult_canvas.draw()
        
#        self.frac_mult_canvas.draw()
#        if self.frac_mult_toolbar==None:
#            self.frac_mult_toolbar=tkagg.NavigationToolbar2Tk(self.frac_mult_canvas, self.FracDenseMultCanvas)
#        
#        self.frac_mult_toolbar.update()
#        self.CorrToolbarFrame.place(relx=0.03, rely=0.93, relheight=0.05
#                , relwidth=0.44)
#        self.frac_mult_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        
###############################################################################
###############################################################################

    def plot_frac_dense_beta(self):
        if self.frac_beta_fig==None:
            self.frac_beta_fig=Figure()
        if self.frac_beta_ax==None:
            self.frac_beta_ax=self.frac_beta_fig.add_subplot(111)
            
        self.frac_beta_ax.cla() #clear the figure to start afresh
        
        #this is the actual scatter plot of the Beta Vs betainomial
        self.frac_beta_ax.scatter(self.output_df['Fracture Density'].values, 
                                  self.output_df['Beta'].values, 
                                  alpha=0.1, c='r',
                                  edgecolors='none', s=10)
        corr=np.corrcoef(self.output_df['Fracture Density'], self.output_df['Beta'])[0,1]
        self.frac_beta_ax.set_title('Correlation={:+.3f}'.format(corr), fontsize=9)
        self.frac_beta_ax.set_ylabel('Beta')
        self.frac_beta_ax.set_xlabel('Fracture Density')
        
        
        if self.frac_beta_canvas==None:
            self.frac_beta_canvas =  FigureCanvasTkAgg(self.frac_beta_fig, master=self.FracBetaCanvas)  
        
        self.frac_beta_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.frac_beta_canvas._tkcanvas.config(highlightthickness=1, highlightcolor ='black')
        
        self.frac_beta_canvas.draw()
        
#        self.frac_mult_canvas.draw()
#        if self.frac_mult_toolbar==None:
#            self.frac_mult_toolbar=tkagg.NavigationToolbar2Tk(self.frac_mult_canvas, self.FracDenseMultCanvas)
#        
#        self.frac_mult_toolbar.update()
#        self.CorrToolbarFrame.place(relx=0.03, rely=0.93, relheight=0.05
#                , relwidth=0.44)
#        self.frac_mult_canvas.get_tk_widget().pack(fill="both", expand=True)
        
###############################################################################
###############################################################################

    def artificial_out(self):
        if self.random_sample is not None:
            pd.DataFrame(self.random_sample,index=['x','y','strike']).T.to_csv(asksaveasfilename())
        
        
        
    def testit(self,x,y,z):
        '''Use this to test out functions'''
        print('ran')
#        self.ax.set_theta_direction(1)
#        self.binspin_fig.add_subplot(111, projection='polar')
#        self.canvas.draw()
        

        
###############################################################################
###############################################################################   


if __name__ == '__main__':
    vp_start_gui()






#! /usr/bin/env python
#  -*- coding: utf-8 -*-
#
# GUI module generated by PAGE version 4.20
#  in conjunction with Tcl version 8.6
#    Feb 01, 2019 12:08:48 PM MST  platform: Windows NT

###############################################################################
###############################################################################
#need to add in
import MODOAnalysis
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import matplotlib
matplotlib.use('TkAgg')
import matplotlib.backends.backend_tkagg as tkagg
from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg
from tkinter.filedialog import askopenfilename
from tkinter.filedialog import asksaveasfilename
from matplotlib.figure import Figure
import matplotlib.transforms
import itertools
#from pykrige.uk import UniversalKriging
from matplotlib.mlab import griddata
from matplotlib import cm
from scipy import stats
import seaborn as sns
np.random.seed(1234)

import warnings
warnings.filterwarnings("ignore")

#from tkinter import *
###############################################################################
###############################################################################



import sys

try:
    import Tkinter as tk
except ImportError:
    import tkinter as tk

try:
    import ttk
    py3 = False
except ImportError:
    import tkinter.ttk as ttk
    py3 = True

import GUI_support

from tkinter import *

def vp_start_gui():
    '''Starting point when module is the main routine.'''
    global val, w, root
    root = tk.Tk()
#    root.resizable(False, False)
    root.resizable(True, True)
    GUI_support.set_Tk_var()
    top = Toplevel1 (root)
    GUI_support.init(root, top)
    root.mainloop()

w = None
def create_Toplevel1(root, *args, **kwargs):
    '''Starting point when module is imported by another program.'''
    global w, w_win, rt
    rt = root
    w = tk.Toplevel (root)
    GUI_support.set_Tk_var()
    top = Toplevel1 (w)
    GUI_support.init(w, top, *args, **kwargs)
    return (w, top)

def destroy_Toplevel1():
    global w
    w.quit()
    w.destroy()
    sys.exit('ladskflsdg')
    w = None

class Toplevel1:
    def __init__(self, top=None):
        #gotta initialize a bunch of vars so I can check if they exist later
        self.canvas=None
        self.binspin_fig=None
        self.artificial_binspin_fig=None
        self.artificial_rose_ax=None
        self.artifical_bin_canvas=None
        self.ax=None
        self.output_df=None
        self.previewcanvas=None
        self.preview_fig=None
        self.preview_ax=None
        self.min_x=None
        self.min_y=None
        self.max_x=None
        self.max_y=None
        self.min_gx=None
        self.min_gy=None
        self.max_gx=None
        self.max_gy=None
        self.grid_xy=None
        self.dx=None
        self.dx=None
        self.artificial_fig=None
        self.artifical_canvas=None
        self.artificial_ax=None
        
        ################################################
        ################################################
        
        self.mult_cont_fig=None
        self.mult_cont_ax=None
        self.mult_cont_canvas=None
        self.preview_toolbar=None
        self.mult_slide=False
        self.beta_slide=False
        self.mult_toolbar=None
        self.sample=None
        self.contour=None
        
        ################################################
        ################################################
        
        self.mult_point_canvas=None
        self.mult_point_fig=None
        self.mult_point_toolbar=None
        self.mult_point_marker=1
        ################################################
        ################################################
        
        self.beta_point_canvas=None
        self.beta_point_fig=None
        self.beta_point_toolbar=None
        self.beta_point_marker=1
        
        ################################################
        ################################################
        
        self.beta_cont_fig=None
        self.y_num=None
        self.cont_grid_xy = None
        self.cont_grid_x=None
        self.cont_grid_y=None
        self.mult_zi = None
        self.mult_strike_marker=1
        self.beta_strike_marker=1
        self.beta_toolbar=None
        self.beta_cont_canvas=None
        self.beta_contour=None
        self.beta_zi=None
        self.hist_fig=None
        self.hist_ax=None
        self.beta_mult_fig=None
        self.beta_mult_ax=None
        self.beta_mult_canvas=None
        self.uniform_df=None
        self.hist_canvas=None
        self.init=False
        self.hist_toolbar=None
        self.corr_toolbar=None
        self.beta_mult_toolbar=None
        self.rose_canvas=None
        self.fdense_fig=None
        self.fdense_zi=None
        self.fdense_contour=None
        self.fdense_cbar=None
        self.fdense_canvas=None
        self.fdense_ax=None
        self.log_fdense_fig=None
        self.log_fdense_zi=None
        self.log_fdense_contour=None
        self.log_fdense_cbar=None
        self.log_fdense_canvas=None
        self.log_fdense_ax=None
        self.uniform_mult_fig=None
        self.uniform_mult_zi=None
        self.uniform_mult_contour=None
        self.uniform_mult_cbar=None
        self.uniform_mult_canvas=None
        self.uniform_mult_ax=None
        self.uniform_beta_fig=None
        self.uniform_beta_zi=None
        self.uniform_beta_contour=None
        self.uniform_beta_cbar=None
        self.uniform_beta_canvas=None
        self.uniform_beta_ax=None
        self.frac_mult_fig=None
        self.frac_mult_zi=None
        self.frac_mult_contour=None
        self.frac_mult_cbar=None
        self.frac_mult_canvas=None
        self.frac_mult_ax=None
        
        self.frac_beta_fig=None
        self.frac_beta_zi=None
        self.frac_beta_contour=None
        self.frac_beta_cbar=None
        self.frac_beta_canvas=None
        self.frac_beta_ax=None

        self.c1=None
        self.c2=None
        self.c3=None
        self.c4=None
        self.c5=None
        self.c6=None
        self.random_sample=None
        self.cmaps = ['viridis', 'plasma', 'inferno', 'magma', 'Greys', 'Purples',
                      'Blues', 'Greens', 'Oranges', 'Reds', 'YlOrBr', 'YlOrRd',
                      'OrRd', 'PuRd', 'RdPu', 'BuPu', 'GnBu', 'PuBu', 'YlGnBu',
                      'PuBuGn', 'BuGn', 'YlGn','binary', 'gist_yarg', 
                      'gist_gray', 'gray', 'bone', 'pink','spring', 'summer', 
                      'autumn', 'winter', 'cool', 'Wistia','hot', 'afmhot',
                      'gist_heat', 'copper','PiYG', 'PRGn', 'BrBG', 
                      'PuOr', 'RdGy', 'RdBu', 'RdYlBu', 'RdYlGn', 'Spectral',
                      'coolwarm', 'bwr', 'Pastel1', 'Pastel2', 'Paired', 'Accent',
                      'Dark2', 'Set1', 'Set2', 'Set3', 'tab10', 'tab20', 'tab20b',
                      'tab20c', 'flag', 'prism', 'ocean', 'gist_earth', 'terrain',
                      'gist_stern','gnuplot', 'gnuplot2', 'CMRmap', 'cubehelix', 
                      'brg', 'hsv','gist_rainbow', 'rainbow', 'jet',
                      'nipy_spectral', 'gist_ncar']
        '''This class configures and populates the toplevel window.
           top is the toplevel containing window.'''
        _bgcolor = '#d9d9d9'  # X11 color: 'gray85'
        _fgcolor = '#000000'  # X11 color: 'black'
        _compcolor = '#d9d9d9' # X11 color: 'gray85'
        _ana1color = '#d9d9d9' # X11 color: 'gray85' 
        _ana2color = '#ececec' # Closest X11 color: 'gray92' 
        font10 = "-family {Courier New} -size 10 -weight normal -slant"  \
            " roman -underline 0 -overstrike 0"
        font11 = "-family {Segoe UI} -size 8 -weight normal -slant "  \
            "roman -underline 0 -overstrike 0"
        font12 = "-family {Segoe UI} -size 12 -weight bold -slant "  \
            "roman -underline 0 -overstrike 0"
        font13 = "-family {Segoe UI} -size 14 -weight normal -slant "  \
            "roman -underline 0 -overstrike 0"
        font14 = "-family {Segoe UI} -size 7 -weight normal -slant "  \
            "roman -underline 0 -overstrike 0"
        font17="-family {Segoe UI} -size 12 -weight bold -slant "  \
            "roman -underline 0 -overstrike 0"
        self.font15 = "-family {Segoe UI} -size 12 -weight bold -slant "  \
            "roman -underline 0 -overstrike 0"
        self.style = ttk.Style()
        if sys.platform == "win32":
            self.style.theme_use('winnative')
        self.style.configure('.',background=_bgcolor)
        self.style.configure('.',foreground=_fgcolor)
        self.style.configure('.',font="TkDefaultFont")
        self.style.map('.',background=
            [('selected', _compcolor), ('active',_ana2color)])

        top.geometry("1049x700+543+128")
        top.title("MODO ko MODO")
        top.configure(background="#52d883")
        top.configure(highlightbackground="#d9d9d9")
        top.configure(highlightcolor="black")

        self.style.configure('TNotebook.Tab', background=_bgcolor)
        self.style.configure('TNotebook.Tab', foreground=_fgcolor)
        self.style.map('TNotebook.Tab', background=
            [('selected', _compcolor), ('active',_ana2color)])
        self.TNotebook1 = ttk.Notebook(top)
        self.TNotebook1.place(relx=0.01, rely=0.015, relheight=0.953
                , relwidth=0.976)
        self.TNotebook1.configure(width=1024)
#        self.TNotebook1.configure(height=1024)
        self.TNotebook1.configure(takefocus="")
        self.TNotebook1_t0 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t0, padding=3)
        self.TNotebook1.tab(0, text="Main",compound="left",underline="-1",)
        self.TNotebook1_t0.configure(background="#86bad8")
        self.TNotebook1_t0.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t0.configure(highlightcolor="black")
        self.TNotebook1_t1 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t1, padding=3)
        self.TNotebook1.tab(1, text="Contour Plots", compound="left"
                ,underline="-1", )
        self.TNotebook1_t1.configure(background="#86bad8")
        self.TNotebook1_t1.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t1.configure(highlightcolor="black")
        
###############################################################################
#             Want to get rid of this tab cuz not using it for now
###############################################################################  
        self.TNotebook1_t2 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t2, padding=3)
        self.TNotebook1.tab(2, text="Colored Point Plots", compound="none", underline="-1"
                ,)
        self.TNotebook1_t2.configure(background="#86bad8")
        self.TNotebook1_t2.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t2.configure(highlightcolor="black")
        self.TNotebook1_t3 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t3, padding=3)
        self.TNotebook1.tab(3, text="Sample Plots", compound="none"
                ,underline="-1", )
        self.TNotebook1_t3.configure(background="#86bad8")
        self.TNotebook1_t3.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t3.configure(highlightcolor="black")
        self.TNotebook1_t4 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t4, padding=3)
        self.TNotebook1.tab(4, text="Summary Stats", compound="none"
                ,underline="-1", )
        
        self.TNotebook1_t4.configure(background="#86bad8")
        self.TNotebook1_t4.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t4.configure(highlightcolor="black")
        self.TNotebook1_t5 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t5, padding=3)
        self.TNotebook1.tab(5, text="Settings",compound="none",underline="-1",)
        self.TNotebook1_t5.configure(background="#d9d9d9")
        self.TNotebook1_t5.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t5.configure(highlightcolor="black")
        
        self.TNotebook1_t6 = tk.Frame(self.TNotebook1)
        self.TNotebook1.add(self.TNotebook1_t6, padding=3)
        self.TNotebook1.tab(6, text="Artificial Data",compound="none",underline="-1",)
        self.TNotebook1_t6.configure(background="#86bad8")
        self.TNotebook1_t6.configure(highlightbackground="#d9d9d9")
        self.TNotebook1_t6.configure(highlightcolor="black")
###############################################################################
###############################################################################
#make sure this has command updateValue
        self.s1 = tk.Scale(self.TNotebook1_t0, from_=10.0, to=500.0, command=self.updateValue)
###############################################################################
###############################################################################
        self.s1.place(relx=0.02, rely=0.25, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.s1.configure(activebackground="#ececec")
        self.s1.configure(background="#d9d9d9")
        self.s1.configure(font="TkTextFont")
        self.s1.configure(foreground="#000000")
        self.s1.configure(highlightbackground="#d9d9d9")
        self.s1.configure(highlightcolor="black")
        self.s1.configure(label="X Grid Nodes")
        self.s1.configure(orient="horizontal")
        self.s1.configure(takefocus="0")
        self.s1.configure(troughcolor="#f2f2f2")

###############################################################################
###############################################################################
        #make sure this has command keep original
        self.s2 = tk.Scale(self.TNotebook1_t0, from_=0.0, to=500.0, command=self.keep_original)
###############################################################################
###############################################################################
        self.s2.place(relx=0.02, rely=0.342, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.s2.configure(activebackground="#ececec")
        self.s2.configure(background="#d9d9d9")
        self.s2.configure(font="TkTextFont")
        self.s2.configure(foreground="#000000")
        self.s2.configure(highlightbackground="#d9d9d9")
        self.s2.configure(highlightcolor="black")
        self.s2.configure(label="Y Grid Nodes")
        self.s2.configure(orient="horizontal")
        self.s2.configure(takefocus="0")
        self.s2.configure(troughcolor="#afafaf")
        self.s2.set(10)

###############################################################################
###############################################################################
        #addded a scale here to show number of grid node
        #and a fram to put the tool bar in
        self.s3 = tk.Scale(self.TNotebook1_t0, from_=0.0, 
                           to=250000.0, command=self.keep_original)
        self.tab0_frame = tk.Frame(self.TNotebook1_t0)
###############################################################################
###############################################################################
        self.s3.place(relx=0.02, rely=0.433, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.s3.configure(activebackground="#ececec")
        self.s3.configure(background="#d9d9d9")
        self.s3.configure(font="TkTextFont")
        self.s3.configure(foreground="#000000")
        self.s3.configure(highlightbackground="#d9d9d9")
        self.s3.configure(highlightcolor="black")
        self.s3.configure(label="Total Grid Nodes")
        self.s3.configure(orient="horizontal")
        self.s3.configure(takefocus="0")
        self.s3.configure(troughcolor="#afafaf")
        self.s3.set(100)                  


        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.0, rely=0.033, relwidth=0.147)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator2 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator2.place(relx=0.147, rely=0.033, relheight=0.517)
        self.TSeparator2.configure(orient="vertical")
        self.TSeparator2.configure(takefocus="0")

        self.TSeparator2 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator2.place(relx=-0.005, rely=0.033, relheight=0.517)
        self.TSeparator2.configure(orient="vertical")
        self.TSeparator2.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=-0.01, rely=0.55, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.Label1_1 = tk.Label(self.TNotebook1_t0)
        self.Label1_1.place(relx=0.005, rely=0.042, height=33, width=142)
        self.Label1_1.configure(activebackground="#f9f9f9")
        self.Label1_1.configure(activeforeground="black")
        self.Label1_1.configure(background="#c1c1c1")
        self.Label1_1.configure(disabledforeground="#a3a3a3")
        self.Label1_1.configure(font=font12)
        self.Label1_1.configure(foreground="#000000")
        self.Label1_1.configure(highlightbackground="#d9d9d9")
        self.Label1_1.configure(highlightcolor="black")
        self.Label1_1.configure(text='''Grid Parameters''')
        
        self.Average_Dist_Label = tk.Label(self.TNotebook1_t0,anchor='w')
        self.Average_Dist_Label.place(relx=0.65, rely=0.95, height=33, width=350)
        self.Average_Dist_Label.configure(activebackground="#f9f9f9")
        self.Average_Dist_Label.configure(activeforeground="black")
        self.Average_Dist_Label.configure(background="#86bad8")
        self.Average_Dist_Label.configure(disabledforeground="#a3a3a3")
        self.Average_Dist_Label.configure(foreground="#000000")
        self.Average_Dist_Label.configure(highlightbackground="#d9d9d9")
        self.Average_Dist_Label.configure(highlightcolor="black")
        self.Average_Dist_Label.configure(font=self.font15)
        self.Average_Dist_Label.configure(text='''Average Distance to nth Fracture:''')
        
        self.FrontPearsonLabel = tk.Label(self.TNotebook1_t0,anchor='w')
        self.FrontPearsonLabel.place(relx=0.65, rely=0.91, height=33, width=350)
        self.FrontPearsonLabel.configure(activebackground="#f9f9f9")
        self.FrontPearsonLabel.configure(activeforeground="black")
        self.FrontPearsonLabel.configure(background="#86bad8")
        self.FrontPearsonLabel.configure(disabledforeground="#a3a3a3")
        self.FrontPearsonLabel.configure(foreground="#000000")
        self.FrontPearsonLabel.configure(highlightbackground="#d9d9d9")
        self.FrontPearsonLabel.configure(highlightcolor="black")
        self.FrontPearsonLabel.configure(font=self.font15)
        self.FrontPearsonLabel.configure(text='''Multinomial vs. Beta Pearson R:''')

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=-0.01, rely=0.1, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=-0.01, rely=0.225, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.Label2 = tk.Label(self.TNotebook1_t0)
        self.Label2.place(relx=0.0, rely=0.108, height=71, width=144)
        self.Label2.configure(activebackground="#f9f9f9")
        self.Label2.configure(activeforeground="black")
        self.Label2.configure(background="#d9d9d9")
        self.Label2.configure(disabledforeground="#a3a3a3")
        self.Label2.configure(font=font11)
        self.Label2.configure(foreground="#000000")
        self.Label2.configure(highlightbackground="#d9d9d9")
        self.Label2.configure(highlightcolor="black")
        self.Label2.configure(text='''Note: Only need to change the x value. The rest will update to keep aspect ratio.''')
        self.Label2.configure(wraplength="125")

        self.Label1_2 = tk.Label(self.TNotebook1_t0)
        self.Label1_2.place(relx=0.157, rely=0.042, height=43, width=142)
        self.Label1_2.configure(activebackground="#f9f9f9")
        self.Label1_2.configure(activeforeground="black")
        self.Label1_2.configure(background="#c1c1c1")
        self.Label1_2.configure(disabledforeground="#a3a3a3")
        self.Label1_2.configure(font=font12)
        self.Label1_2.configure(foreground="#000000")
        self.Label1_2.configure(highlightbackground="#d9d9d9")
        self.Label1_2.configure(highlightcolor="black")
        self.Label1_2.configure(text='''Multinomial Parameters''')
        self.Label1_2.configure(wraplength="150")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.55, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.033, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator2 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator2.place(relx=0.304, rely=0.033, relheight=0.617)
        self.TSeparator2.configure(orient="vertical")
        self.TSeparator2.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.133, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")
        
        self.neighbors_val=IntVar(self.TNotebook1_t0)
        self.neighbors_val.set(12)
        self.neighbors = ttk.Combobox(self.TNotebook1_t0)
        self.neighbors.place(relx=0.25, rely=0.133, relheight=0.035
                , relwidth=0.042)
        self.value_list = [10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,]
        self.neighbors.configure(values=self.value_list)
        self.neighbors.configure(textvariable=self.neighbors_val)
        self.neighbors.configure(takefocus="")

        self.Label1_3 = tk.Label(self.TNotebook1_t0)
        self.Label1_3.place(relx=0.152, rely=0.133, height=21, width=99)
        self.Label1_3.configure(activebackground="#f9f9f9")
        self.Label1_3.configure(activeforeground="black")
        self.Label1_3.configure(background="#86bad8")
        self.Label1_3.configure(disabledforeground="#a3a3a3")
        self.Label1_3.configure(foreground="#000000")
        self.Label1_3.configure(highlightbackground="#d9d9d9")
        self.Label1_3.configure(highlightcolor="black")
        self.Label1_3.configure(text='''Neighbors to Avg''')

#######################################################################################
#    Changing label to cuttof checkbox
######################################################################################
#        self.Label1_4 = tk.Label(self.TNotebook1_t0)
#        self.Label1_4.place(relx=0.157, rely=0.183, height=21, width=49)
#        self.Label1_4.configure(activebackground="#86bad8")
#        self.Label1_4.configure(activeforeground="black")
#        self.Label1_4.configure(background="#86bad8")
#        self.Label1_4.configure(disabledforeground="#a3a3a3")
#        self.Label1_4.configure(foreground="#000000")
#        self.Label1_4.configure(highlightbackground="#d9d9d9")
#        self.Label1_4.configure(highlightcolor="black")
#        self.Label1_4.configure(justify='left')
#        self.Label1_4.configure(text='''Cuttoff r''')

        self.cuttoff=IntVar(self.TNotebook1_t0)
        self.Cuttoff_Check_Box = tk.Checkbutton(self.TNotebook1_t0)
        self.Cuttoff_Check_Box.place(relx=0.15, rely=0.19, height=21, width=80)
        self.Cuttoff_Check_Box.configure(activebackground="#86bad8")
        self.Cuttoff_Check_Box.configure(activeforeground="#000000")
        self.Cuttoff_Check_Box.configure(background="#86bad8")
        self.Cuttoff_Check_Box.configure(disabledforeground="#86bad8")
        self.Cuttoff_Check_Box.configure(foreground="#000000")
        self.Cuttoff_Check_Box.configure(highlightbackground="#86bad8")
        self.Cuttoff_Check_Box.configure(highlightcolor="#000000")
        self.Cuttoff_Check_Box.configure(justify='left')
        self.Cuttoff_Check_Box.configure(takefocus="0")
        self.Cuttoff_Check_Box.configure(text='''Cuttoff r''')
        self.Cuttoff_Check_Box.configure(variable=self.cuttoff)

#        self.cuttoff_r=DoubleVar(self.TNotebook1_t0)
        self.cuttoff_r = tk.Entry(self.TNotebook1_t0)
        self.cuttoff_r.place(relx=0.246, rely=0.192,height=20, relwidth=0.052)
        self.cuttoff_r.configure(background="white")
        self.cuttoff_r.configure(disabledforeground="#a3a3a3")
        self.cuttoff_r.configure(font="TkFixedFont")
        self.cuttoff_r.configure(foreground="#000000")
        self.cuttoff_r.configure(highlightbackground="#d9d9d9")
        self.cuttoff_r.configure(highlightcolor="black")
        self.cuttoff_r.configure(insertbackground="black")
        self.cuttoff_r.configure(selectbackground="#c4c4c4")
        self.cuttoff_r.configure(selectforeground="black")
        self.cuttoff_r.configure(takefocus="0")
#        self.cuttoff_r.configure(variable=self.cuttoff_r)

        self.TSeparator2 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator2.place(relx=0.461, rely=0.033, relheight=0.967)
        self.TSeparator2.configure(orient="vertical")
        self.TSeparator2.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.304, rely=0.65, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.304, rely=0.033, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.225, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.Label1_8 = tk.Label(self.TNotebook1_t0)
        self.Label1_8.place(relx=0.157, rely=0.242, height=33, width=142)
        self.Label1_8.configure(activebackground="#f9f9f9")
        self.Label1_8.configure(activeforeground="black")
        self.Label1_8.configure(background="#c1c1c1")
        self.Label1_8.configure(disabledforeground="#a3a3a3")
        self.Label1_8.configure(font=font12)
        self.Label1_8.configure(foreground="#000000")
        self.Label1_8.configure(highlightbackground="#d9d9d9")
        self.Label1_8.configure(highlightcolor="black")
        self.Label1_8.configure(text='''Beta Parameters''')

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.308, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")
        
        self.theta_val=DoubleVar(self.TNotebook1_t0)
        self.theta_val.set(4)
        self.Theta = tk.Entry(self.TNotebook1_t0)
        self.Theta.place(relx=0.216, rely=0.5,height=20, relwidth=0.082)
        self.Theta.configure(background="white")
        self.Theta.configure(disabledforeground="#a3a3a3")
        self.Theta.configure(font="TkFixedFont")
        self.Theta.configure(foreground="#000000")
        self.Theta.configure(highlightbackground="#d9d9d9")
        self.Theta.configure(highlightcolor="black")
        self.Theta.configure(insertbackground="black")
        self.Theta.configure(selectbackground="#c4c4c4")
        self.Theta.configure(selectforeground="black")
        self.Theta.configure(takefocus="0")
        self.Theta.configure(textvariable=self.theta_val)

        self.Label1_11 = tk.Label(self.TNotebook1_t0)
        self.Label1_11.place(relx=0.152, rely=0.5, height=21, width=39)
        self.Label1_11.configure(activebackground="#f9f9f9")
        self.Label1_11.configure(activeforeground="black")
        self.Label1_11.configure(background="#86bad8")
        self.Label1_11.configure(disabledforeground="#a3a3a3")
        self.Label1_11.configure(foreground="#000000")
        self.Label1_11.configure(highlightbackground="#d9d9d9")
        self.Label1_11.configure(highlightcolor="black")
        self.Label1_11.configure(justify='left')
        self.Label1_11.configure(text='''Theta''')

        self.Label1_10 = tk.Label(self.TNotebook1_t0)
        self.Label1_10.place(relx=0.15, rely=0.3, height=45, width=100)
        self.Label1_10.configure(activebackground="#f9f9f9")
        self.Label1_10.configure(activeforeground="black")
        self.Label1_10.configure(background="#86bad8")
        self.Label1_10.configure(disabledforeground="#a3a3a3")
        self.Label1_10.configure(foreground="#000000")
        self.Label1_10.configure(highlightbackground="#d9d9d9")
        self.Label1_10.configure(highlightcolor="black")
        self.Label1_10.configure(justify='left')
        self.Label1_10.configure(text='''Dominant Fracture \n Set Median''')
        self.Label1_10.config(font=('Arial',8))
        self.Label1_10.lower(belowThis=None)

        self.Label1_9 = tk.Label(self.TNotebook1_t0)
        self.Label1_9.place(relx=0.152, rely=0.383, height=20, width=99)
        self.Label1_9.configure(activebackground="#f9f9f9")
        self.Label1_9.configure(activeforeground="black")
        self.Label1_9.configure(background="#86bad8")
        self.Label1_9.configure(disabledforeground="#a3a3a3")
        self.Label1_9.configure(foreground="#000000")
        self.Label1_9.configure(highlightbackground="#d9d9d9")
        self.Label1_9.configure(highlightcolor="black")
        self.Label1_9.configure(justify='left')
        self.Label1_9.configure(text='''Spread (1 sigma)''')
        
        self.bulk_sigma_val=DoubleVar(self.TNotebook1_t0)
        self.bulk_sigma = tk.Entry(self.TNotebook1_t0)
        self.bulk_sigma.place(relx=0.245, rely=0.383,height=20, relwidth=0.053)
        self.bulk_sigma.configure(background="white")
        self.bulk_sigma.configure(disabledforeground="#a3a3a3")
        self.bulk_sigma.configure(font="TkFixedFont")
        self.bulk_sigma.configure(foreground="#000000")
        self.bulk_sigma.configure(highlightbackground="#d9d9d9")
        self.bulk_sigma.configure(highlightcolor="black")
        self.bulk_sigma.configure(insertbackground="black")
        self.bulk_sigma.configure(selectbackground="#c4c4c4")
        self.bulk_sigma.configure(selectforeground="black")
        self.bulk_sigma.configure(takefocus="0")
        self.bulk_sigma.configure(textvariable=self.bulk_sigma_val)

#####################################################################################
        self.bulk_mean_val=tk.StringVar(self.TNotebook1_t0, value=15)        
        self.bulk_mean = tk.Entry(self.TNotebook1_t0,textvariable=self.bulk_mean_val)
        self.bulk_mean.place(relx=0.245, rely=0.317,height=20, relwidth=0.053)
        self.bulk_mean.configure(background="white")
        self.bulk_mean.configure(disabledforeground="#a3a3a3")
        self.bulk_mean.configure(font="TkFixedFont")
        self.bulk_mean.configure(foreground="#000000")
        self.bulk_mean.configure(highlightbackground="#d9d9d9")
        self.bulk_mean.configure(highlightcolor="black")
        self.bulk_mean.configure(insertbackground="black")
        self.bulk_mean.configure(selectbackground="#c4c4c4")
        self.bulk_mean.configure(selectforeground="black")
        self.bulk_mean.configure(takefocus="0")

        self.Label1_12 = tk.Label(self.TNotebook1_t0)
        self.Label1_12.place(relx=0.152, rely=0.433, height=31, width=89)
        self.Label1_12.configure(activebackground="#f9f9f9")
        self.Label1_12.configure(activeforeground="black")
        self.Label1_12.configure(background="#86bad8")
        self.Label1_12.configure(disabledforeground="#a3a3a3")
        self.Label1_12.configure(foreground="#000000")
        self.Label1_12.configure(highlightbackground="#d9d9d9")
        self.Label1_12.configure(highlightcolor="black")
        self.Label1_12.configure(justify='left')
        self.Label1_12.configure(text='''Recommended Theta''')
        self.Label1_12.configure(wraplength="90")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.492, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.417, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.367, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.183, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=-0.01, rely=0.1, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.125, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.147, rely=0.3, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.Label1_5 = tk.Label(self.TNotebook1_t0)
        self.Label1_5.place(relx=0.314, rely=0.033, height=33, width=142)
        self.Label1_5.configure(activebackground="#f9f9f9")
        self.Label1_5.configure(activeforeground="black")
        self.Label1_5.configure(background="#c1c1c1")
        self.Label1_5.configure(disabledforeground="#a3a3a3")
        self.Label1_5.configure(font=font12)
        self.Label1_5.configure(foreground="#000000")
        self.Label1_5.configure(highlightbackground="#d9d9d9")
        self.Label1_5.configure(highlightcolor="black")
        self.Label1_5.configure(text='''Bin Rotation''')
        self.Label1_5.configure(wraplength="100")

        self.Label3 = tk.Label(self.TNotebook1_t0)
        self.Label3.place(relx=0.319, rely=0.308, height=21, width=59)
        self.Label3.configure(activebackground="#f9f9f9")
        self.Label3.configure(activeforeground="black")
        self.Label3.configure(background="#86bad8")
        self.Label3.configure(disabledforeground="#a3a3a3")
        self.Label3.configure(foreground="#000000")
        self.Label3.configure(highlightbackground="#d9d9d9")
        self.Label3.configure(highlightcolor="black")
        self.Label3.configure(text='''Bin Center''')
        
        self.bin_center=DoubleVar(self.TNotebook1_t0)
        self.Bin_center_entry = tk.Entry(self.TNotebook1_t0)
        self.Bin_center_entry.place(relx=0.382, rely=0.317, height=20
                , relwidth=0.073)
        self.Bin_center_entry.configure(background="white")
        self.Bin_center_entry.configure(disabledforeground="#a3a3a3")
        self.Bin_center_entry.configure(font="TkFixedFont")
        self.Bin_center_entry.configure(foreground="#000000")
        self.Bin_center_entry.configure(highlightbackground="#d9d9d9")
        self.Bin_center_entry.configure(highlightcolor="black")
        self.Bin_center_entry.configure(insertbackground="black")
        self.Bin_center_entry.configure(selectbackground="#c4c4c4")
        self.Bin_center_entry.configure(selectforeground="black")
        self.Bin_center_entry.configure(takefocus="0")
        self.Bin_center_entry.configure(textvariable=self.bin_center)

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator1.place(relx=0.304, rely=0.225, relwidth=0.157)
        self.TSeparator1.configure(takefocus="0")

        self.BinSpin = tk.Canvas(self.TNotebook1_t0)
        self.BinSpin.place(relx=0.314, rely=0.4, relheight=0.238, relwidth=0.14)
        self.BinSpin.configure(background="#d9d9d9")
        self.BinSpin.configure(borderwidth="2")
        self.BinSpin.configure(highlightbackground="#d9d9d9")
        self.BinSpin.configure(highlightcolor="black")
        self.BinSpin.configure(insertbackground="black")
        self.BinSpin.configure(relief='ridge')
        self.BinSpin.configure(selectbackground="#c4c4c4")
        self.BinSpin.configure(selectforeground="black")
        self.BinSpin.configure(takefocus="0")
        self.BinSpin.configure(width=143)
        
        self.BinSpin_a = tk.Canvas(self.TNotebook1_t6)
        self.BinSpin_a.place(relx=0.65, rely=0.7, relheight=0.238, relwidth=0.14)
        self.BinSpin_a.configure(background="#d9d9d9")
        self.BinSpin_a.configure(borderwidth="2")
        self.BinSpin_a.configure(highlightbackground="#d9d9d9")
        self.BinSpin_a.configure(highlightcolor="black")
        self.BinSpin_a.configure(insertbackground="black")
        self.BinSpin_a.configure(relief='ridge')
        self.BinSpin_a.configure(selectbackground="#c4c4c4")
        self.BinSpin_a.configure(selectforeground="black")
        self.BinSpin_a.configure(takefocus="0")
        self.BinSpin_a.configure(width=143)

        self.Analyse = tk.Button(self.TNotebook1_t0, command=self.analyse)
        self.Analyse.place(relx=0.005, rely=0.658, height=54, width=147)
        self.Analyse.configure(activebackground="#ececec")
        self.Analyse.configure(activeforeground="#000000")
        self.Analyse.configure(background="#ffae21")
        self.Analyse.configure(disabledforeground="#a3a3a3")
        self.Analyse.configure(foreground="#000000")
        self.Analyse.configure(highlightbackground="#d9d9d9")
        self.Analyse.configure(highlightcolor="black")
        self.Analyse.configure(pady="0")
        self.Analyse.configure(takefocus="0")
        self.Analyse.configure(text='''Analyse Sample''')
        
        self.Quit = tk.Button(self.TNotebook1_t0, command=self.quitit)
        self.Quit.place(relx=0.005, rely=0.75, height=25, width=147)
        self.Quit.configure(background="#FF0000")
        self.Quit.configure(disabledforeground="#a3a3a3")
        self.Quit.configure(foreground="#000000")
        self.Quit.configure(highlightbackground="#d9d9d9")
        self.Quit.configure(highlightcolor="black")
        self.Quit.configure(pady="0")
        self.Quit.configure(takefocus="0")
        self.Quit.configure(text='''Quit''')

        self.ToExcel = tk.Button(self.TNotebook1_t0, command=self.export_text)
        self.ToExcel.place(relx=0.157, rely=0.658, height=54, width=147)
        self.ToExcel.configure(activebackground="#ececec")
        self.ToExcel.configure(activeforeground="#000000")
        self.ToExcel.configure(background="#ffae21")
        self.ToExcel.configure(disabledforeground="#a3a3a3")
        self.ToExcel.configure(foreground="#000000")
        self.ToExcel.configure(highlightbackground="#d9d9d9")
        self.ToExcel.configure(highlightcolor="black")
        self.ToExcel.configure(pady="0")
        self.ToExcel.configure(takefocus="0")
        self.ToExcel.configure(text='''Export to Excel''')

        self.Label1_6 = tk.Label(self.TNotebook1_t0)
        self.Label1_6.place(relx=0.304, rely=0.092, height=81, width=154)
        self.Label1_6.configure(activebackground="#f9f9f9")
        self.Label1_6.configure(activeforeground="black")
        self.Label1_6.configure(background="#d9d9d9")
        self.Label1_6.configure(disabledforeground="#a3a3a3")
        self.Label1_6.configure(font=font11)
        self.Label1_6.configure(foreground="#000000")
        self.Label1_6.configure(highlightbackground="#d9d9d9")
        self.Label1_6.configure(highlightcolor="black")
        self.Label1_6.configure(justify='left')
        self.Label1_6.configure(text='''Note: This unexplored paramter will shift how the bin counts work. Recommend no spin or dominant fracture set mean.''')
        self.Label1_6.configure(wraplength="150")
        
        self.custom_bin_check=IntVar(self.TNotebook1_t0)
        self.Custom_Bins = tk.Checkbutton(self.TNotebook1_t0)
        self.Custom_Bins.place(relx=0.314, rely=0.233, relheight=0.042
                , relwidth=0.093)
        self.Custom_Bins.configure(activebackground="#86bad8")
        self.Custom_Bins.configure(activeforeground="#000000")
        self.Custom_Bins.configure(background="#86bad8")
        self.Custom_Bins.configure(disabledforeground="#86bad8")
        self.Custom_Bins.configure(foreground="#000000")
        self.Custom_Bins.configure(highlightbackground="#86bad8")
        self.Custom_Bins.configure(highlightcolor="#000000")
        self.Custom_Bins.configure(justify='left')
        self.Custom_Bins.configure(takefocus="0")
        self.Custom_Bins.configure(text='''Custom Bins''')
        self.Custom_Bins.configure(variable=self.custom_bin_check)

###############################################################################
# Addedd cuttoff radius checkbox option
##############################################################################
        

        self.LoadFile = tk.Button(self.TNotebook1_t0, command=self.load_file)
        self.LoadFile.place(relx=0.005, rely=0.567, height=54, width=148)
        self.LoadFile.configure(activebackground="#ececec")
        self.LoadFile.configure(activeforeground="#000000")
        self.LoadFile.configure(background="#ffae21")
        self.LoadFile.configure(disabledforeground="#a3a3a3")
        self.LoadFile.configure(foreground="#000000")
        self.LoadFile.configure(highlightbackground="#d9d9d9")
        self.LoadFile.configure(highlightcolor="black")
        self.LoadFile.configure(pady="0")
        self.LoadFile.configure(takefocus="0")
        self.LoadFile.configure(text='''Load File''')

        self.TSeparator2 = ttk.Separator(self.TNotebook1_t0)
        self.TSeparator2.place(relx=0.995, rely=0.033, relheight=0.967)
        self.TSeparator2.configure(orient="vertical")
        self.TSeparator2.configure(takefocus="0")
        
        self.Label3 = tk.Label(self.TNotebook1_t0)
        self.Label3.place(relx=0.005, rely=0.908, height=21, width=118)
        self.Label3.configure(activebackground="#86bad8")
        self.Label3.configure(activeforeground="black")
        self.Label3.configure(background="#86bad8")
        self.Label3.configure(disabledforeground="#a3a3a3")
        self.Label3.configure(foreground="#000000")
        self.Label3.configure(highlightbackground="#d9d9d9")
        self.Label3.configure(highlightcolor="black")
        self.Label3.configure(text='''Current Sample File''')
        
        ##################################################################
        #added this extra button to make the plot 1 to one if you want.
        self.PreviewEqualAspect = tk.Button(self.TNotebook1_t0, command=self.preview_equal_aspect)
        self.PreviewEqualAspect.place(relx=0.47, rely=0.885, height=25, width=110)
        self.PreviewEqualAspect.configure(activebackground="#ececec")
        self.PreviewEqualAspect.configure(activeforeground="#000000")
        self.PreviewEqualAspect.configure(background="#ffae21")
        self.PreviewEqualAspect.configure(disabledforeground="#a3a3a3")
        self.PreviewEqualAspect.configure(foreground="#000000")
        self.PreviewEqualAspect.configure(highlightbackground="#d9d9d9")
        self.PreviewEqualAspect.configure(highlightcolor="black")
        self.PreviewEqualAspect.configure(pady="0")
        self.PreviewEqualAspect.configure(takefocus="0")
        self.PreviewEqualAspect.configure(text='''1:1 Aspect Ratio''')
        
        ##################################################################
        #added this extra button to make the multinomial contour one to one if you want.        
        self.MultContEqualAspect = tk.Button(self.TNotebook1_t1, command=self.mult_equal_aspect)
        self.MultContEqualAspect.place(relx=0.85, rely=0.025, height=25, width=110)
        self.MultContEqualAspect.configure(activebackground="#ececec")
        self.MultContEqualAspect.configure(activeforeground="#000000")
        self.MultContEqualAspect.configure(background="#ffae21")
        self.MultContEqualAspect.configure(disabledforeground="#a3a3a3")
        self.MultContEqualAspect.configure(foreground="#000000")
        self.MultContEqualAspect.configure(highlightbackground="#d9d9d9")
        self.MultContEqualAspect.configure(highlightcolor="black")
        self.MultContEqualAspect.configure(pady="0")
        self.MultContEqualAspect.configure(takefocus="0")
        self.MultContEqualAspect.configure(text='''1:1 Aspect Ratio''')
        
        
        
        
################################################################################
################################################################################
################################################################################
        #Here I changed a bunch of stuff ot be on a new tab because the main
        #was getting too crowded.
###############################################################################
        
        
        
        

        
        
        
        self.Label1_7 = tk.Label(self.TNotebook1_t6)
        self.Label1_7.place(relx=0.461, rely=0.033, height=33, width=542)
        self.Label1_7.configure(activebackground="#f9f9f9")
        self.Label1_7.configure(activeforeground="black")
        self.Label1_7.configure(background="#c1c1c1")
        self.Label1_7.configure(disabledforeground="#a3a3a3")
        self.Label1_7.configure(font=font12)
        self.Label1_7.configure(foreground="#000000")
        self.Label1_7.configure(highlightbackground="#d9d9d9")
        self.Label1_7.configure(highlightcolor="black")
        self.Label1_7.configure(text='''Artificial Dataset Creation''')

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.461, rely=0.033, relwidth=0.539)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.461, rely=0.283, relwidth=0.539)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.461, rely=0.383, relwidth=0.539)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.461, rely=0.483, relwidth=0.539)
        self.TSeparator1.configure(takefocus="0")

        self.c1_mean = tk.Entry(self.TNotebook1_t6)
        self.c1_mean.place(relx=0.564, rely=0.1,height=20, relwidth=0.053)
        self.c1_mean.configure(background="white")
        self.c1_mean.configure(disabledforeground="#a3a3a3")
        self.c1_mean.configure(font="TkFixedFont")
        self.c1_mean.configure(foreground="#000000")
        self.c1_mean.configure(highlightbackground="#d9d9d9")
        self.c1_mean.configure(highlightcolor="black")
        self.c1_mean.configure(insertbackground="black")
        self.c1_mean.configure(selectbackground="#c4c4c4")
        self.c1_mean.configure(selectforeground="black")


        self.c1_sigma = tk.Entry(self.TNotebook1_t6)
        self.c1_sigma.place(relx=0.564, rely=0.142,height=20, relwidth=0.053)
        self.c1_sigma.configure(background="white")
        self.c1_sigma.configure(disabledforeground="#a3a3a3")
        self.c1_sigma.configure(font="TkFixedFont")
        self.c1_sigma.configure(foreground="#000000")
        self.c1_sigma.configure(highlightbackground="#d9d9d9")
        self.c1_sigma.configure(highlightcolor="black")
        self.c1_sigma.configure(insertbackground="black")
        self.c1_sigma.configure(selectbackground="#c4c4c4")
        self.c1_sigma.configure(selectforeground="black")
        self.c1_sigma.configure(takefocus="0")

        self.Label1_14 = tk.Label(self.TNotebook1_t6)
        self.Label1_14.place(relx=0.515, rely=0.1, height=21, width=49)
        self.Label1_14.configure(activebackground="#f9f9f9")
        self.Label1_14.configure(activeforeground="black")
        self.Label1_14.configure(background="#86bad8")
        self.Label1_14.configure(disabledforeground="#a3a3a3")
        self.Label1_14.configure(foreground="#000000")
        self.Label1_14.configure(highlightbackground="#d9d9d9")
        self.Label1_14.configure(highlightcolor="black")
        self.Label1_14.configure(justify='left')
        self.Label1_14.configure(text='''mean''')

        self.Label1_15 = tk.Label(self.TNotebook1_t6)
        self.Label1_15.place(relx=0.515, rely=0.142, height=21, width=49)
        self.Label1_15.configure(activebackground="#f9f9f9")
        self.Label1_15.configure(activeforeground="black")
        self.Label1_15.configure(background="#86bad8")
        self.Label1_15.configure(disabledforeground="#a3a3a3")
        self.Label1_15.configure(foreground="#000000")
        self.Label1_15.configure(highlightbackground="#d9d9d9")
        self.Label1_15.configure(highlightcolor="black")
        self.Label1_15.configure(justify='left')
        self.Label1_15.configure(text='''sigma''')

        self.Label1_19 = tk.Label(self.TNotebook1_t6)
        self.Label1_19.place(relx=0.815, rely=0.15, height=20, width=38)
        self.Label1_19.configure(activebackground="#f9f9f9")
        self.Label1_19.configure(activeforeground="black")
        self.Label1_19.configure(background="#86bad8")
        self.Label1_19.configure(disabledforeground="#a3a3a3")
        self.Label1_19.configure(foreground="#000000")
        self.Label1_19.configure(highlightbackground="#d9d9d9")
        self.Label1_19.configure(highlightcolor="black")
        self.Label1_19.configure(justify='left')
        self.Label1_19.configure(text='''y min''')

        self.c1_ymin = tk.Entry(self.TNotebook1_t6)
        self.c1_ymin.place(relx=0.858, rely=0.145,height=20, relwidth=0.05)
        self.c1_ymin.configure(background="white")
        self.c1_ymin.configure(disabledforeground="#a3a3a3")
        self.c1_ymin.configure(font="TkFixedFont")
        self.c1_ymin.configure(foreground="#000000")
        self.c1_ymin.configure(highlightbackground="#d9d9d9")
        self.c1_ymin.configure(highlightcolor="black")
        self.c1_ymin.configure(insertbackground="black")
        self.c1_ymin.configure(selectbackground="#c4c4c4")
        self.c1_ymin.configure(selectforeground="black")
        self.c1_ymin.configure(takefocus="0")

        self.c1_ymax = tk.Entry(self.TNotebook1_t6)
        self.c1_ymax.place(relx=0.858, rely=0.105,height=20, relwidth=0.05)
        self.c1_ymax.configure(background="white")
        self.c1_ymax.configure(disabledforeground="#a3a3a3")
        self.c1_ymax.configure(font="TkFixedFont")
        self.c1_ymax.configure(foreground="#000000")
        self.c1_ymax.configure(highlightbackground="#d9d9d9")
        self.c1_ymax.configure(highlightcolor="black")
        self.c1_ymax.configure(insertbackground="black")
        self.c1_ymax.configure(selectbackground="#c4c4c4")
        self.c1_ymax.configure(selectforeground="black")
        self.c1_ymax.configure(takefocus="0")

        self.label1_16 = tk.Label(self.TNotebook1_t6)
        self.label1_16.place(relx=0.623, rely=0.125, height=20, width=40)
        self.label1_16.configure(activebackground="#f9f9f9")
        self.label1_16.configure(activeforeground="black")
        self.label1_16.configure(background="#86bad8")
        self.label1_16.configure(disabledforeground="#a3a3a3")
        self.label1_16.configure(foreground="#000000")
        self.label1_16.configure(highlightbackground="#d9d9d9")
        self.label1_16.configure(highlightcolor="black")
        self.label1_16.configure(justify='left')
        self.label1_16.configure(text='''x min''')

        self.Label1_22 = tk.Label(self.TNotebook1_t6)
        self.Label1_22.place(relx=0.515, rely=0.2, height=20, width=38)
        self.Label1_22.configure(activebackground="#f9f9f9")
        self.Label1_22.configure(activeforeground="black")
        self.Label1_22.configure(background="#86bad8")
        self.Label1_22.configure(disabledforeground="#a3a3a3")
        self.Label1_22.configure(foreground="#000000")
        self.Label1_22.configure(highlightbackground="#d9d9d9")
        self.Label1_22.configure(highlightcolor="black")
        self.Label1_22.configure(justify='left')
        self.Label1_22.configure(text='''mean''')

        self.c2_mean = tk.Entry(self.TNotebook1_t6)
        self.c2_mean.place(relx=0.564, rely=0.2,height=20, relwidth=0.053)
        self.c2_mean.configure(background="white")
        self.c2_mean.configure(disabledforeground="#a3a3a3")
        self.c2_mean.configure(font="TkFixedFont")
        self.c2_mean.configure(foreground="#000000")
        self.c2_mean.configure(highlightbackground="#d9d9d9")
        self.c2_mean.configure(highlightcolor="black")
        self.c2_mean.configure(insertbackground="black")
        self.c2_mean.configure(selectbackground="#c4c4c4")
        self.c2_mean.configure(selectforeground="black")
        self.c2_mean.configure(takefocus="0")

        self.c2_xmin = tk.Entry(self.TNotebook1_t6)
        self.c2_xmin.place(relx=0.665, rely=0.225,height=20, relwidth=0.05)
        self.c2_xmin.configure(background="white")
        self.c2_xmin.configure(disabledforeground="#a3a3a3")
        self.c2_xmin.configure(font="TkFixedFont")
        self.c2_xmin.configure(foreground="#000000")
        self.c2_xmin.configure(highlightbackground="#d9d9d9")
        self.c2_xmin.configure(highlightcolor="black")
        self.c2_xmin.configure(insertbackground="black")
        self.c2_xmin.configure(selectbackground="#c4c4c4")
        self.c2_xmin.configure(selectforeground="black")
        self.c2_xmin.configure(takefocus="0")

        self.c2_sigma = tk.Entry(self.TNotebook1_t6)
        self.c2_sigma.place(relx=0.564, rely=0.242,height=20, relwidth=0.053)
        self.c2_sigma.configure(background="white")
        self.c2_sigma.configure(disabledforeground="#a3a3a3")
        self.c2_sigma.configure(font="TkFixedFont")
        self.c2_sigma.configure(foreground="#000000")
        self.c2_sigma.configure(highlightbackground="#d9d9d9")
        self.c2_sigma.configure(highlightcolor="black")
        self.c2_sigma.configure(insertbackground="black")
        self.c2_sigma.configure(selectbackground="#c4c4c4")
        self.c2_sigma.configure(selectforeground="black")
        self.c2_sigma.configure(takefocus="0")

        self.c2_xmax = tk.Entry(self.TNotebook1_t6)
        self.c2_xmax.place(relx=0.76, rely=0.225,height=20, relwidth=0.05)
        self.c2_xmax.configure(background="white")
        self.c2_xmax.configure(disabledforeground="#a3a3a3")
        self.c2_xmax.configure(font="TkFixedFont")
        self.c2_xmax.configure(foreground="#000000")
        self.c2_xmax.configure(highlightbackground="#d9d9d9")
        self.c2_xmax.configure(highlightcolor="black")
        self.c2_xmax.configure(insertbackground="black")
        self.c2_xmax.configure(selectbackground="#c4c4c4")
        self.c2_xmax.configure(selectforeground="black")
        self.c2_xmax.configure(takefocus="0")

        self.c2_ymax = tk.Entry(self.TNotebook1_t6)
        self.c2_ymax.place(relx=0.858, rely=0.205,height=20, relwidth=0.05)
        self.c2_ymax.configure(background="white")
        self.c2_ymax.configure(disabledforeground="#a3a3a3")
        self.c2_ymax.configure(font="TkFixedFont")
        self.c2_ymax.configure(foreground="#000000")
        self.c2_ymax.configure(highlightbackground="#d9d9d9")
        self.c2_ymax.configure(highlightcolor="black")
        self.c2_ymax.configure(insertbackground="black")
        self.c2_ymax.configure(selectbackground="#c4c4c4")
        self.c2_ymax.configure(selectforeground="black")
        self.c2_ymax.configure(takefocus="0")

        self.c2_ymin = tk.Entry(self.TNotebook1_t6)
        self.c2_ymin.place(relx=0.858, rely=0.245,height=20, relwidth=0.05)
        self.c2_ymin.configure(background="white")
        self.c2_ymin.configure(disabledforeground="#a3a3a3")
        self.c2_ymin.configure(font="TkFixedFont")
        self.c2_ymin.configure(foreground="#000000")
        self.c2_ymin.configure(highlightbackground="#d9d9d9")
        self.c2_ymin.configure(highlightcolor="black")
        self.c2_ymin.configure(insertbackground="black")
        self.c2_ymin.configure(selectbackground="#c4c4c4")
        self.c2_ymin.configure(selectforeground="black")
        self.c2_ymin.configure(takefocus="0")

        self.Label1_24 = tk.Label(self.TNotebook1_t6)
        self.Label1_24.place(relx=0.515, rely=0.242, height=20, width=42)
        self.Label1_24.configure(activebackground="#f9f9f9")
        self.Label1_24.configure(activeforeground="black")
        self.Label1_24.configure(background="#86bad8")
        self.Label1_24.configure(disabledforeground="#a3a3a3")
        self.Label1_24.configure(foreground="#000000")
        self.Label1_24.configure(highlightbackground="#d9d9d9")
        self.Label1_24.configure(highlightcolor="black")
        self.Label1_24.configure(justify='left')
        self.Label1_24.configure(text='''sigma''')

        self.Label1_20 = tk.Label(self.TNotebook1_t6)
        self.Label1_20.place(relx=0.917, rely=0.1, height=21, width=79)
        self.Label1_20.configure(activebackground="#f9f9f9")
        self.Label1_20.configure(activeforeground="black")
        self.Label1_20.configure(background="#86bad8")
        self.Label1_20.configure(disabledforeground="#a3a3a3")
        self.Label1_20.configure(foreground="#000000")
        self.Label1_20.configure(highlightbackground="#d9d9d9")
        self.Label1_20.configure(highlightcolor="black")
        self.Label1_20.configure(justify='left')
        self.Label1_20.configure(text='''Distribution''')

        self.Label1_18 = tk.Label(self.TNotebook1_t6)
        self.Label1_18.place(relx=0.815, rely=0.105, height=20, width=38)
        self.Label1_18.configure(activebackground="#f9f9f9")
        self.Label1_18.configure(activeforeground="black")
        self.Label1_18.configure(background="#86bad8")
        self.Label1_18.configure(disabledforeground="#a3a3a3")
        self.Label1_18.configure(foreground="#000000")
        self.Label1_18.configure(highlightbackground="#d9d9d9")
        self.Label1_18.configure(highlightcolor="black")
        self.Label1_18.configure(justify='left')
        self.Label1_18.configure(text='''y max''')

        self.Label1_28 = tk.Label(self.TNotebook1_t6)
        self.Label1_28.place(relx=0.815, rely=0.205, height=20, width=38)
        self.Label1_28.configure(activebackground="#f9f9f9")
        self.Label1_28.configure(activeforeground="black")
        self.Label1_28.configure(background="#86bad8")
        self.Label1_28.configure(disabledforeground="#a3a3a3")
        self.Label1_28.configure(foreground="#000000")
        self.Label1_28.configure(highlightbackground="#d9d9d9")
        self.Label1_28.configure(highlightcolor="black")
        self.Label1_28.configure(justify='left')
        self.Label1_28.configure(text='''y max''')

        self.Label1_25 = tk.Label(self.TNotebook1_t6)
        self.Label1_25.place(relx=0.623, rely=0.225, height=20, width=40)
        self.Label1_25.configure(activebackground="#f9f9f9")
        self.Label1_25.configure(activeforeground="black")
        self.Label1_25.configure(background="#86bad8")
        self.Label1_25.configure(disabledforeground="#a3a3a3")
        self.Label1_25.configure(foreground="#000000")
        self.Label1_25.configure(highlightbackground="#d9d9d9")
        self.Label1_25.configure(highlightcolor="black")
        self.Label1_25.configure(justify='left')
        self.Label1_25.configure(text='''x min''')

        self.Label1_26 = tk.Label(self.TNotebook1_t6)
        self.Label1_26.place(relx=0.716, rely=0.225, height=20, width=39)
        self.Label1_26.configure(activebackground="#f9f9f9")
        self.Label1_26.configure(activeforeground="black")
        self.Label1_26.configure(background="#86bad8")
        self.Label1_26.configure(disabledforeground="#a3a3a3")
        self.Label1_26.configure(foreground="#000000")
        self.Label1_26.configure(highlightbackground="#d9d9d9")
        self.Label1_26.configure(highlightcolor="black")
        self.Label1_26.configure(justify='left')
        self.Label1_26.configure(text='''x max''')

        self.Label1_29 = tk.Label(self.TNotebook1_t6)
        self.Label1_29.place(relx=0.815, rely=0.25, height=20, width=38)
        self.Label1_29.configure(activebackground="#f9f9f9")
        self.Label1_29.configure(activeforeground="black")
        self.Label1_29.configure(background="#86bad8")
        self.Label1_29.configure(disabledforeground="#a3a3a3")
        self.Label1_29.configure(foreground="#000000")
        self.Label1_29.configure(highlightbackground="#d9d9d9")
        self.Label1_29.configure(highlightcolor="black")
        self.Label1_29.configure(justify='left')
        self.Label1_29.configure(text='''y min''')

        self.Label1_30 = tk.Label(self.TNotebook1_t6)
        self.Label1_30.place(relx=0.917, rely=0.2, height=21, width=79)
        self.Label1_30.configure(activebackground="#f9f9f9")
        self.Label1_30.configure(activeforeground="black")
        self.Label1_30.configure(background="#86bad8")
        self.Label1_30.configure(disabledforeground="#a3a3a3")
        self.Label1_30.configure(foreground="#000000")
        self.Label1_30.configure(highlightbackground="#d9d9d9")
        self.Label1_30.configure(highlightcolor="black")
        self.Label1_30.configure(justify='left')
        self.Label1_30.configure(text='''Distribution''')

        self.Label1_13 = tk.Label(self.TNotebook1_t6)
        self.Label1_13.place(relx=0.466, rely=0.108, height=21, width=49)
        self.Label1_13.configure(activebackground="#f9f9f9")
        self.Label1_13.configure(activeforeground="black")
        self.Label1_13.configure(background="#86bad8")
        self.Label1_13.configure(disabledforeground="#a3a3a3")
        self.Label1_13.configure(foreground="#000000")
        self.Label1_13.configure(highlightbackground="#d9d9d9")
        self.Label1_13.configure(highlightcolor="black")
        self.Label1_13.configure(justify='left')
        self.Label1_13.configure(text='''n(c1)''')

        self.c1_n = tk.Entry(self.TNotebook1_t6)
        self.c1_n.place(relx=0.463, rely=0.142,height=20, relwidth=0.048)
        self.c1_n.configure(background="white")
        self.c1_n.configure(disabledforeground="#a3a3a3")
        self.c1_n.configure(font="TkFixedFont")
        self.c1_n.configure(foreground="#000000")
        self.c1_n.configure(highlightbackground="#d9d9d9")
        self.c1_n.configure(highlightcolor="black")
        self.c1_n.configure(insertbackground="black")
        self.c1_n.configure(selectbackground="#c4c4c4")
        self.c1_n.configure(selectforeground="black")
        self.c1_n.configure(takefocus="0")

        self.Label1_21 = tk.Label(self.TNotebook1_t6)
        self.Label1_21.place(relx=0.466, rely=0.208, height=21, width=54)
        self.Label1_21.configure(activebackground="#f9f9f9")
        self.Label1_21.configure(activeforeground="black")
        self.Label1_21.configure(background="#86bad8")
        self.Label1_21.configure(disabledforeground="#a3a3a3")
        self.Label1_21.configure(foreground="#000000")
        self.Label1_21.configure(highlightbackground="#d9d9d9")
        self.Label1_21.configure(highlightcolor="black")
        self.Label1_21.configure(justify='left')
        self.Label1_21.configure(text='''n(c2)''')

        self.c2_n = tk.Entry(self.TNotebook1_t6)
        self.c2_n.place(relx=0.463, rely=0.242,height=20, relwidth=0.048)
        self.c2_n.configure(background="white")
        self.c2_n.configure(disabledforeground="#a3a3a3")
        self.c2_n.configure(font="TkFixedFont")
        self.c2_n.configure(foreground="#000000")
        self.c2_n.configure(highlightbackground="#d9d9d9")
        self.c2_n.configure(highlightcolor="black")
        self.c2_n.configure(insertbackground="black")
        self.c2_n.configure(selectbackground="#c4c4c4")
        self.c2_n.configure(selectforeground="black")
        self.c2_n.configure(takefocus="0")

        self.c3_n = tk.Entry(self.TNotebook1_t6)
        self.c3_n.place(relx=0.463, rely=0.342,height=20, relwidth=0.048)
        self.c3_n.configure(background="white")
        self.c3_n.configure(disabledforeground="#a3a3a3")
        self.c3_n.configure(font="TkFixedFont")
        self.c3_n.configure(foreground="#000000")
        self.c3_n.configure(highlightbackground="#d9d9d9")
        self.c3_n.configure(highlightcolor="black")
        self.c3_n.configure(insertbackground="black")
        self.c3_n.configure(selectbackground="#c4c4c4")
        self.c3_n.configure(selectforeground="black")
        self.c3_n.configure(takefocus="0")

        self.c4_n = tk.Entry(self.TNotebook1_t6)
        self.c4_n.place(relx=0.463, rely=0.447,height=20, relwidth=0.048)
        self.c4_n.configure(background="white")
        self.c4_n.configure(disabledforeground="#a3a3a3")
        self.c4_n.configure(font="TkFixedFont")
        self.c4_n.configure(foreground="#000000")
        self.c4_n.configure(highlightbackground="#d9d9d9")
        self.c4_n.configure(highlightcolor="black")
        self.c4_n.configure(insertbackground="black")
        self.c4_n.configure(selectbackground="#c4c4c4")
        self.c4_n.configure(selectforeground="black")
        self.c4_n.configure(takefocus="0")

        self.c5_n = tk.Entry(self.TNotebook1_t6)
        self.c5_n.place(relx=0.463, rely=0.535,height=20, relwidth=0.048)
        self.c5_n.configure(background="white")
        self.c5_n.configure(disabledforeground="#a3a3a3")
        self.c5_n.configure(font="TkFixedFont")
        self.c5_n.configure(foreground="#000000")
        self.c5_n.configure(highlightbackground="#d9d9d9")
        self.c5_n.configure(highlightcolor="black")
        self.c5_n.configure(insertbackground="black")
        self.c5_n.configure(selectbackground="#c4c4c4")
        self.c5_n.configure(selectforeground="black")
        self.c5_n.configure(takefocus="0")

        self.c6_n = tk.Entry(self.TNotebook1_t6)
        self.c6_n.place(relx=0.463, rely=0.633,height=20, relwidth=0.048)
        self.c6_n.configure(background="white")
        self.c6_n.configure(disabledforeground="#a3a3a3")
        self.c6_n.configure(font="TkFixedFont")
        self.c6_n.configure(foreground="#000000")
        self.c6_n.configure(highlightbackground="#d9d9d9")
        self.c6_n.configure(highlightcolor="black")
        self.c6_n.configure(insertbackground="black")
        self.c6_n.configure(selectbackground="#c4c4c4")
        self.c6_n.configure(selectforeground="black")
        self.c6_n.configure(takefocus="0")
        


        self.TSeparator1_8 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1_8.place(relx=0.461, rely=0.583, relwidth=0.539)
        self.TSeparator1_8.configure(takefocus="0")

        self.TSeparator1_9 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1_9.place(relx=0.461, rely=0.683, relwidth=0.539)
        self.TSeparator1_9.configure(takefocus="0")

        self.Label1_31 = tk.Label(self.TNotebook1_t6)
        self.Label1_31.place(relx=0.466, rely=0.308, height=21, width=54)
        self.Label1_31.configure(activebackground="#f9f9f9")
        self.Label1_31.configure(activeforeground="black")
        self.Label1_31.configure(background="#86bad8")
        self.Label1_31.configure(disabledforeground="#a3a3a3")
        self.Label1_31.configure(foreground="#000000")
        self.Label1_31.configure(highlightbackground="#d9d9d9")
        self.Label1_31.configure(highlightcolor="black")
        self.Label1_31.configure(justify='left')
        self.Label1_31.configure(text='''n(c3)''')

        self.Label1_39 = tk.Label(self.TNotebook1_t6)
        self.Label1_39.place(relx=0.466, rely=0.408, height=21, width=54)
        self.Label1_39.configure(activebackground="#f9f9f9")
        self.Label1_39.configure(activeforeground="black")
        self.Label1_39.configure(background="#86bad8")
        self.Label1_39.configure(disabledforeground="#a3a3a3")
        self.Label1_39.configure(foreground="#000000")
        self.Label1_39.configure(highlightbackground="#d9d9d9")
        self.Label1_39.configure(highlightcolor="black")
        self.Label1_39.configure(justify='left')
        self.Label1_39.configure(text='''n(c4)''')

        self.Label1_47 = tk.Label(self.TNotebook1_t6)
        self.Label1_47.place(relx=0.466, rely=0.5, height=21, width=54)
        self.Label1_47.configure(activebackground="#f9f9f9")
        self.Label1_47.configure(activeforeground="black")
        self.Label1_47.configure(background="#86bad8")
        self.Label1_47.configure(disabledforeground="#a3a3a3")
        self.Label1_47.configure(foreground="#000000")
        self.Label1_47.configure(highlightbackground="#d9d9d9")
        self.Label1_47.configure(highlightcolor="black")
        self.Label1_47.configure(justify='left')
        self.Label1_47.configure(text='''n(c5)''')

        self.Label1_55 = tk.Label(self.TNotebook1_t6)
        self.Label1_55.place(relx=0.466, rely=0.6, height=21, width=54)
        self.Label1_55.configure(activebackground="#f9f9f9")
        self.Label1_55.configure(activeforeground="black")
        self.Label1_55.configure(background="#86bad8")
        self.Label1_55.configure(disabledforeground="#a3a3a3")
        self.Label1_55.configure(foreground="#000000")
        self.Label1_55.configure(highlightbackground="#d9d9d9")
        self.Label1_55.configure(highlightcolor="black")
        self.Label1_55.configure(justify='left')
        self.Label1_55.configure(text='''n(c6)''')

        self.c3_mean = tk.Entry(self.TNotebook1_t6)
        self.c3_mean.place(relx=0.564, rely=0.292,height=20, relwidth=0.053)
        self.c3_mean.configure(background="white")
        self.c3_mean.configure(disabledforeground="#a3a3a3")
        self.c3_mean.configure(font="TkFixedFont")
        self.c3_mean.configure(foreground="#000000")
        self.c3_mean.configure(highlightbackground="#d9d9d9")
        self.c3_mean.configure(highlightcolor="black")
        self.c3_mean.configure(insertbackground="black")
        self.c3_mean.configure(selectbackground="#c4c4c4")
        self.c3_mean.configure(selectforeground="black")
        self.c3_mean.configure(takefocus="0")

        self.c4_mean = tk.Entry(self.TNotebook1_t6)
        self.c4_mean.place(relx=0.564, rely=0.392,height=20, relwidth=0.053)
        self.c4_mean.configure(background="white")
        self.c4_mean.configure(disabledforeground="#a3a3a3")
        self.c4_mean.configure(font="TkFixedFont")
        self.c4_mean.configure(foreground="#000000")
        self.c4_mean.configure(highlightbackground="#d9d9d9")
        self.c4_mean.configure(highlightcolor="black")
        self.c4_mean.configure(insertbackground="black")
        self.c4_mean.configure(selectbackground="#c4c4c4")
        self.c4_mean.configure(selectforeground="black")
        self.c4_mean.configure(takefocus="0")

        self.c5_mean = tk.Entry(self.TNotebook1_t6)
        self.c5_mean.place(relx=0.564, rely=0.495,height=20, relwidth=0.053)
        self.c5_mean.configure(background="white")
        self.c5_mean.configure(disabledforeground="#a3a3a3")
        self.c5_mean.configure(font="TkFixedFont")
        self.c5_mean.configure(foreground="#000000")
        self.c5_mean.configure(highlightbackground="#d9d9d9")
        self.c5_mean.configure(highlightcolor="black")
        self.c5_mean.configure(insertbackground="black")
        self.c5_mean.configure(selectbackground="#c4c4c4")
        self.c5_mean.configure(selectforeground="black")
        self.c5_mean.configure(takefocus="0")

        self.c6_mean = tk.Entry(self.TNotebook1_t6)
        self.c6_mean.place(relx=0.564, rely=0.592,height=20, relwidth=0.053)
        self.c6_mean.configure(background="white")
        self.c6_mean.configure(disabledforeground="#a3a3a3")
        self.c6_mean.configure(font="TkFixedFont")
        self.c6_mean.configure(foreground="#000000")
        self.c6_mean.configure(highlightbackground="#d9d9d9")
        self.c6_mean.configure(highlightcolor="black")
        self.c6_mean.configure(insertbackground="black")
        self.c6_mean.configure(selectbackground="#c4c4c4")
        self.c6_mean.configure(selectforeground="black")
        self.c6_mean.configure(takefocus="0")

        self.c3_sigma = tk.Entry(self.TNotebook1_t6)
        self.c3_sigma.place(relx=0.564, rely=0.342,height=20, relwidth=0.053)
        self.c3_sigma.configure(background="white")
        self.c3_sigma.configure(disabledforeground="#a3a3a3")
        self.c3_sigma.configure(font="TkFixedFont")
        self.c3_sigma.configure(foreground="#000000")
        self.c3_sigma.configure(highlightbackground="#d9d9d9")
        self.c3_sigma.configure(highlightcolor="black")
        self.c3_sigma.configure(insertbackground="black")
        self.c3_sigma.configure(selectbackground="#c4c4c4")
        self.c3_sigma.configure(selectforeground="black")
        self.c3_sigma.configure(takefocus="0")

        self.c4_sigma = tk.Entry(self.TNotebook1_t6)
        self.c4_sigma.place(relx=0.564, rely=0.442,height=20, relwidth=0.053)
        self.c4_sigma.configure(background="white")
        self.c4_sigma.configure(disabledforeground="#a3a3a3")
        self.c4_sigma.configure(font="TkFixedFont")
        self.c4_sigma.configure(foreground="#000000")
        self.c4_sigma.configure(highlightbackground="#d9d9d9")
        self.c4_sigma.configure(highlightcolor="black")
        self.c4_sigma.configure(insertbackground="black")
        self.c4_sigma.configure(selectbackground="#c4c4c4")
        self.c4_sigma.configure(selectforeground="black")
        self.c4_sigma.configure(takefocus="0")

        self.c5_sigma = tk.Entry(self.TNotebook1_t6)
        self.c5_sigma.place(relx=0.564, rely=0.542,height=20, relwidth=0.053)
        self.c5_sigma.configure(background="white")
        self.c5_sigma.configure(disabledforeground="#a3a3a3")
        self.c5_sigma.configure(font="TkFixedFont")
        self.c5_sigma.configure(foreground="#000000")
        self.c5_sigma.configure(highlightbackground="#d9d9d9")
        self.c5_sigma.configure(highlightcolor="black")
        self.c5_sigma.configure(insertbackground="black")
        self.c5_sigma.configure(selectbackground="#c4c4c4")
        self.c5_sigma.configure(selectforeground="black")
        self.c5_sigma.configure(takefocus="0")

        self.c6_sigma = tk.Entry(self.TNotebook1_t6)
        self.c6_sigma.place(relx=0.564, rely=0.633,height=20, relwidth=0.053)
        self.c6_sigma.configure(background="white")
        self.c6_sigma.configure(disabledforeground="#a3a3a3")
        self.c6_sigma.configure(font="TkFixedFont")
        self.c6_sigma.configure(foreground="#000000")
        self.c6_sigma.configure(highlightbackground="#d9d9d9")
        self.c6_sigma.configure(highlightcolor="black")
        self.c6_sigma.configure(insertbackground="black")
        self.c6_sigma.configure(selectbackground="#c4c4c4")
        self.c6_sigma.configure(selectforeground="black")
        self.c6_sigma.configure(takefocus="0")

        self.Label1_40 = tk.Label(self.TNotebook1_t6)
        self.Label1_40.place(relx=0.515, rely=0.392, height=21, width=38)
        self.Label1_40.configure(activebackground="#f9f9f9")
        self.Label1_40.configure(activeforeground="black")
        self.Label1_40.configure(background="#86bad8")
        self.Label1_40.configure(disabledforeground="#a3a3a3")
        self.Label1_40.configure(foreground="#000000")
        self.Label1_40.configure(highlightbackground="#d9d9d9")
        self.Label1_40.configure(highlightcolor="black")
        self.Label1_40.configure(justify='left')
        self.Label1_40.configure(text='''mean''')

        self.Label1_32 = tk.Label(self.TNotebook1_t6)
        self.Label1_32.place(relx=0.515, rely=0.292, height=21, width=38)
        self.Label1_32.configure(activebackground="#f9f9f9")
        self.Label1_32.configure(activeforeground="black")
        self.Label1_32.configure(background="#86bad8")
        self.Label1_32.configure(disabledforeground="#a3a3a3")
        self.Label1_32.configure(foreground="#000000")
        self.Label1_32.configure(highlightbackground="#d9d9d9")
        self.Label1_32.configure(highlightcolor="black")
        self.Label1_32.configure(justify='left')
        self.Label1_32.configure(text='''mean''')

        self.Label1_48 = tk.Label(self.TNotebook1_t6)
        self.Label1_48.place(relx=0.515, rely=0.492, height=21, width=38)
        self.Label1_48.configure(activebackground="#f9f9f9")
        self.Label1_48.configure(activeforeground="black")
        self.Label1_48.configure(background="#86bad8")
        self.Label1_48.configure(disabledforeground="#a3a3a3")
        self.Label1_48.configure(foreground="#000000")
        self.Label1_48.configure(highlightbackground="#d9d9d9")
        self.Label1_48.configure(highlightcolor="black")
        self.Label1_48.configure(justify='left')
        self.Label1_48.configure(text='''mean''')

        self.Label1_56 = tk.Label(self.TNotebook1_t6)
        self.Label1_56.place(relx=0.515, rely=0.592, height=21, width=38)
        self.Label1_56.configure(activebackground="#f9f9f9")
        self.Label1_56.configure(activeforeground="black")
        self.Label1_56.configure(background="#86bad8")
        self.Label1_56.configure(disabledforeground="#a3a3a3")
        self.Label1_56.configure(foreground="#000000")
        self.Label1_56.configure(highlightbackground="#d9d9d9")
        self.Label1_56.configure(highlightcolor="black")
        self.Label1_56.configure(justify='left')
        self.Label1_56.configure(text='''mean''')

        self.Label1_41 = tk.Label(self.TNotebook1_t6)
        self.Label1_41.place(relx=0.515, rely=0.442, height=20, width=42)
        self.Label1_41.configure(activebackground="#f9f9f9")
        self.Label1_41.configure(activeforeground="black")
        self.Label1_41.configure(background="#86bad8")
        self.Label1_41.configure(disabledforeground="#a3a3a3")
        self.Label1_41.configure(foreground="#000000")
        self.Label1_41.configure(highlightbackground="#d9d9d9")
        self.Label1_41.configure(highlightcolor="black")
        self.Label1_41.configure(justify='left')
        self.Label1_41.configure(text='''sigma''')

        self.Label1_49 = tk.Label(self.TNotebook1_t6)
        self.Label1_49.place(relx=0.515, rely=0.542, height=20, width=42)
        self.Label1_49.configure(activebackground="#f9f9f9")
        self.Label1_49.configure(activeforeground="black")
        self.Label1_49.configure(background="#86bad8")
        self.Label1_49.configure(disabledforeground="#a3a3a3")
        self.Label1_49.configure(foreground="#000000")
        self.Label1_49.configure(highlightbackground="#d9d9d9")
        self.Label1_49.configure(highlightcolor="black")
        self.Label1_49.configure(justify='left')
        self.Label1_49.configure(text='''sigma''')

        self.Label1_57 = tk.Label(self.TNotebook1_t6)
        self.Label1_57.place(relx=0.515, rely=0.633, height=20, width=42)
        self.Label1_57.configure(activebackground="#f9f9f9")
        self.Label1_57.configure(activeforeground="black")
        self.Label1_57.configure(background="#86bad8")
        self.Label1_57.configure(disabledforeground="#a3a3a3")
        self.Label1_57.configure(foreground="#000000")
        self.Label1_57.configure(highlightbackground="#d9d9d9")
        self.Label1_57.configure(highlightcolor="black")
        self.Label1_57.configure(justify='left')
        self.Label1_57.configure(text='''sigma''')

        self.Label1_33 = tk.Label(self.TNotebook1_t6)
        self.Label1_33.place(relx=0.515, rely=0.342, height=20, width=42)
        self.Label1_33.configure(activebackground="#f9f9f9")
        self.Label1_33.configure(activeforeground="black")
        self.Label1_33.configure(background="#86bad8")
        self.Label1_33.configure(disabledforeground="#a3a3a3")
        self.Label1_33.configure(foreground="#000000")
        self.Label1_33.configure(highlightbackground="#d9d9d9")
        self.Label1_33.configure(highlightcolor="black")
        self.Label1_33.configure(justify='left')
        self.Label1_33.configure(text='''sigma''')
        



        self.Label1_34 = tk.Label(self.TNotebook1_t6)
        self.Label1_34.place(relx=0.623, rely=0.325, height=20, width=40)
        self.Label1_34.configure(activebackground="#f9f9f9")
        self.Label1_34.configure(activeforeground="black")
        self.Label1_34.configure(background="#86bad8")
        self.Label1_34.configure(disabledforeground="#a3a3a3")
        self.Label1_34.configure(foreground="#000000")
        self.Label1_34.configure(highlightbackground="#d9d9d9")
        self.Label1_34.configure(highlightcolor="black")
        self.Label1_34.configure(justify='left')
        self.Label1_34.configure(text='''x min''')

        self.Label1_42 = tk.Label(self.TNotebook1_t6)
        self.Label1_42.place(relx=0.623, rely=0.425, height=20, width=40)
        self.Label1_42.configure(activebackground="#f9f9f9")
        self.Label1_42.configure(activeforeground="black")
        self.Label1_42.configure(background="#86bad8")
        self.Label1_42.configure(disabledforeground="#a3a3a3")
        self.Label1_42.configure(foreground="#000000")
        self.Label1_42.configure(highlightbackground="#d9d9d9")
        self.Label1_42.configure(highlightcolor="black")
        self.Label1_42.configure(justify='left')
        self.Label1_42.configure(text='''x min''')

        self.Label1_50 = tk.Label(self.TNotebook1_t6)
        self.Label1_50.place(relx=0.623, rely=0.525, height=20, width=40)
        self.Label1_50.configure(activebackground="#f9f9f9")
        self.Label1_50.configure(activeforeground="black")
        self.Label1_50.configure(background="#86bad8")
        self.Label1_50.configure(disabledforeground="#a3a3a3")
        self.Label1_50.configure(foreground="#000000")
        self.Label1_50.configure(highlightbackground="#d9d9d9")
        self.Label1_50.configure(highlightcolor="black")
        self.Label1_50.configure(justify='left')
        self.Label1_50.configure(text='''x min''')

        self.Label1_58 = tk.Label(self.TNotebook1_t6)
        self.Label1_58.place(relx=0.623, rely=0.625, height=20, width=40)
        self.Label1_58.configure(activebackground="#f9f9f9")
        self.Label1_58.configure(activeforeground="black")
        self.Label1_58.configure(background="#86bad8")
        self.Label1_58.configure(disabledforeground="#a3a3a3")
        self.Label1_58.configure(foreground="#000000")
        self.Label1_58.configure(highlightbackground="#d9d9d9")
        self.Label1_58.configure(highlightcolor="black")
        self.Label1_58.configure(justify='left')
        self.Label1_58.configure(text='''x min''')

        self.c4_xmin = tk.Entry(self.TNotebook1_t6)
        self.c4_xmin.place(relx=0.665, rely=0.425,height=20, relwidth=0.05)
        self.c4_xmin.configure(background="white")
        self.c4_xmin.configure(disabledforeground="#a3a3a3")
        self.c4_xmin.configure(font="TkFixedFont")
        self.c4_xmin.configure(foreground="#000000")
        self.c4_xmin.configure(highlightbackground="#d9d9d9")
        self.c4_xmin.configure(highlightcolor="black")
        self.c4_xmin.configure(insertbackground="black")
        self.c4_xmin.configure(selectbackground="#c4c4c4")
        self.c4_xmin.configure(selectforeground="black")
        self.c4_xmin.configure(takefocus="0")

        self.c5_xmin = tk.Entry(self.TNotebook1_t6)
        self.c5_xmin.place(relx=0.665, rely=0.525,height=20, relwidth=0.05)
        self.c5_xmin.configure(background="white")
        self.c5_xmin.configure(disabledforeground="#a3a3a3")
        self.c5_xmin.configure(font="TkFixedFont")
        self.c5_xmin.configure(foreground="#000000")
        self.c5_xmin.configure(highlightbackground="#d9d9d9")
        self.c5_xmin.configure(highlightcolor="black")
        self.c5_xmin.configure(insertbackground="black")
        self.c5_xmin.configure(selectbackground="#c4c4c4")
        self.c5_xmin.configure(selectforeground="black")
        self.c5_xmin.configure(takefocus="0")

        self.c6_xmin = tk.Entry(self.TNotebook1_t6)
        self.c6_xmin.place(relx=0.665, rely=0.625,height=20, relwidth=0.05)
        self.c6_xmin.configure(background="white")
        self.c6_xmin.configure(disabledforeground="#a3a3a3")
        self.c6_xmin.configure(font="TkFixedFont")
        self.c6_xmin.configure(foreground="#000000")
        self.c6_xmin.configure(highlightbackground="#d9d9d9")
        self.c6_xmin.configure(highlightcolor="black")
        self.c6_xmin.configure(insertbackground="black")
        self.c6_xmin.configure(selectbackground="#c4c4c4")
        self.c6_xmin.configure(selectforeground="black")
        self.c6_xmin.configure(takefocus="0")

        self.c3_xmin = tk.Entry(self.TNotebook1_t6)
        self.c3_xmin.place(relx=0.665, rely=0.325,height=20, relwidth=0.05)
        self.c3_xmin.configure(background="white")
        self.c3_xmin.configure(disabledforeground="#a3a3a3")
        self.c3_xmin.configure(font="TkFixedFont")
        self.c3_xmin.configure(foreground="#000000")
        self.c3_xmin.configure(highlightbackground="#d9d9d9")
        self.c3_xmin.configure(highlightcolor="black")
        self.c3_xmin.configure(insertbackground="black")
        self.c3_xmin.configure(selectbackground="#c4c4c4")
        self.c3_xmin.configure(selectforeground="black")
        self.c3_xmin.configure(takefocus="0")

        self.Label1_17 = tk.Label(self.TNotebook1_t6)
        self.Label1_17.place(relx=0.716, rely=0.125, height=20, width=49)
        self.Label1_17.configure(activebackground="#f9f9f9")
        self.Label1_17.configure(activeforeground="black")
        self.Label1_17.configure(background="#86bad8")
        self.Label1_17.configure(disabledforeground="#a3a3a3")
        self.Label1_17.configure(foreground="#000000")
        self.Label1_17.configure(highlightbackground="#d9d9d9")
        self.Label1_17.configure(highlightcolor="black")
        self.Label1_17.configure(justify='left')
        self.Label1_17.configure(text='''x max''')

        self.Label1_35 = tk.Label(self.TNotebook1_t6)
        self.Label1_35.place(relx=0.716, rely=0.325, height=20, width=49)
        self.Label1_35.configure(activebackground="#f9f9f9")
        self.Label1_35.configure(activeforeground="black")
        self.Label1_35.configure(background="#86bad8")
        self.Label1_35.configure(disabledforeground="#a3a3a3")
        self.Label1_35.configure(foreground="#000000")
        self.Label1_35.configure(highlightbackground="#d9d9d9")
        self.Label1_35.configure(highlightcolor="black")
        self.Label1_35.configure(justify='left')
        self.Label1_35.configure(text='''x max''')

        self.Label1_43 = tk.Label(self.TNotebook1_t6)
        self.Label1_43.place(relx=0.716, rely=0.425, height=20, width=49)
        self.Label1_43.configure(activebackground="#f9f9f9")
        self.Label1_43.configure(activeforeground="black")
        self.Label1_43.configure(background="#86bad8")
        self.Label1_43.configure(disabledforeground="#a3a3a3")
        self.Label1_43.configure(foreground="#000000")
        self.Label1_43.configure(highlightbackground="#d9d9d9")
        self.Label1_43.configure(highlightcolor="black")
        self.Label1_43.configure(justify='left')
        self.Label1_43.configure(text='''x max''')

        self.Label1_51 = tk.Label(self.TNotebook1_t6)
        self.Label1_51.place(relx=0.716, rely=0.525, height=20, width=49)
        self.Label1_51.configure(activebackground="#f9f9f9")
        self.Label1_51.configure(activeforeground="black")
        self.Label1_51.configure(background="#86bad8")
        self.Label1_51.configure(disabledforeground="#a3a3a3")
        self.Label1_51.configure(foreground="#000000")
        self.Label1_51.configure(highlightbackground="#d9d9d9")
        self.Label1_51.configure(highlightcolor="black")
        self.Label1_51.configure(justify='left')
        self.Label1_51.configure(text='''x max''')

        self.Label1_59 = tk.Label(self.TNotebook1_t6)
        self.Label1_59.place(relx=0.716, rely=0.625, height=20, width=49)
        self.Label1_59.configure(activebackground="#f9f9f9")
        self.Label1_59.configure(activeforeground="black")
        self.Label1_59.configure(background="#86bad8")
        self.Label1_59.configure(disabledforeground="#a3a3a3")
        self.Label1_59.configure(foreground="#000000")
        self.Label1_59.configure(highlightbackground="#d9d9d9")
        self.Label1_59.configure(highlightcolor="black")
        self.Label1_59.configure(justify='left')
        self.Label1_59.configure(text='''x max''')

        self.c3_xmax = tk.Entry(self.TNotebook1_t6)
        self.c3_xmax.place(relx=0.76, rely=0.325,height=20, relwidth=0.05)
        self.c3_xmax.configure(background="white")
        self.c3_xmax.configure(disabledforeground="#a3a3a3")
        self.c3_xmax.configure(font="TkFixedFont")
        self.c3_xmax.configure(foreground="#000000")
        self.c3_xmax.configure(highlightbackground="#d9d9d9")
        self.c3_xmax.configure(highlightcolor="black")
        self.c3_xmax.configure(insertbackground="black")
        self.c3_xmax.configure(selectbackground="#c4c4c4")
        self.c3_xmax.configure(selectforeground="black")
        self.c3_xmax.configure(takefocus="0")

        self.c4_xmax = tk.Entry(self.TNotebook1_t6)
        self.c4_xmax.place(relx=0.76, rely=0.425,height=20, relwidth=0.05)
        self.c4_xmax.configure(background="white")
        self.c4_xmax.configure(disabledforeground="#a3a3a3")
        self.c4_xmax.configure(font="TkFixedFont")
        self.c4_xmax.configure(foreground="#000000")
        self.c4_xmax.configure(highlightbackground="#d9d9d9")
        self.c4_xmax.configure(highlightcolor="black")
        self.c4_xmax.configure(insertbackground="black")
        self.c4_xmax.configure(selectbackground="#c4c4c4")
        self.c4_xmax.configure(selectforeground="black")
        self.c4_xmax.configure(takefocus="0")

        self.c5_xmax = tk.Entry(self.TNotebook1_t6)
        self.c5_xmax.place(relx=0.76, rely=0.525,height=20, relwidth=0.05)
        self.c5_xmax.configure(background="white")
        self.c5_xmax.configure(disabledforeground="#a3a3a3")
        self.c5_xmax.configure(font="TkFixedFont")
        self.c5_xmax.configure(foreground="#000000")
        self.c5_xmax.configure(highlightbackground="#d9d9d9")
        self.c5_xmax.configure(highlightcolor="black")
        self.c5_xmax.configure(insertbackground="black")
        self.c5_xmax.configure(selectbackground="#c4c4c4")
        self.c5_xmax.configure(selectforeground="black")
        self.c5_xmax.configure(takefocus="0")

        self.c6_xmax = tk.Entry(self.TNotebook1_t6)
        self.c6_xmax.place(relx=0.76, rely=0.625,height=20, relwidth=0.05)
        self.c6_xmax.configure(background="white")
        self.c6_xmax.configure(disabledforeground="#a3a3a3")
        self.c6_xmax.configure(font="TkFixedFont")
        self.c6_xmax.configure(foreground="#000000")
        self.c6_xmax.configure(highlightbackground="#d9d9d9")
        self.c6_xmax.configure(highlightcolor="black")
        self.c6_xmax.configure(insertbackground="black")
        self.c6_xmax.configure(selectbackground="#c4c4c4")
        self.c6_xmax.configure(selectforeground="black")
        self.c6_xmax.configure(takefocus="0")

        self.c3_ymax = tk.Entry(self.TNotebook1_t6)
        self.c3_ymax.place(relx=0.858, rely=0.305,height=20, relwidth=0.05)
        self.c3_ymax.configure(background="white")
        self.c3_ymax.configure(disabledforeground="#a3a3a3")
        self.c3_ymax.configure(font="TkFixedFont")
        self.c3_ymax.configure(foreground="#000000")
        self.c3_ymax.configure(highlightbackground="#d9d9d9")
        self.c3_ymax.configure(highlightcolor="black")
        self.c3_ymax.configure(insertbackground="black")
        self.c3_ymax.configure(selectbackground="#c4c4c4")
        self.c3_ymax.configure(selectforeground="black")
        self.c3_ymax.configure(takefocus="0")

        self.c4_ymax = tk.Entry(self.TNotebook1_t6)
        self.c4_ymax.place(relx=0.858, rely=0.405,height=20, relwidth=0.05)
        self.c4_ymax.configure(background="white")
        self.c4_ymax.configure(disabledforeground="#a3a3a3")
        self.c4_ymax.configure(font="TkFixedFont")
        self.c4_ymax.configure(foreground="#000000")
        self.c4_ymax.configure(highlightbackground="#d9d9d9")
        self.c4_ymax.configure(highlightcolor="black")
        self.c4_ymax.configure(insertbackground="black")
        self.c4_ymax.configure(selectbackground="#c4c4c4")
        self.c4_ymax.configure(selectforeground="black")
        self.c4_ymax.configure(takefocus="0")

        self.c5_ymax = tk.Entry(self.TNotebook1_t6)
        self.c5_ymax.place(relx=0.858, rely=0.505,height=20, relwidth=0.05)
        self.c5_ymax.configure(background="white")
        self.c5_ymax.configure(disabledforeground="#a3a3a3")
        self.c5_ymax.configure(font="TkFixedFont")
        self.c5_ymax.configure(foreground="#000000")
        self.c5_ymax.configure(highlightbackground="#d9d9d9")
        self.c5_ymax.configure(highlightcolor="black")
        self.c5_ymax.configure(insertbackground="black")
        self.c5_ymax.configure(selectbackground="#c4c4c4")
        self.c5_ymax.configure(selectforeground="black")
        self.c5_ymax.configure(takefocus="0")

        self.c6_ymax = tk.Entry(self.TNotebook1_t6)
        self.c6_ymax.place(relx=0.858, rely=0.605,height=20, relwidth=0.05)
        self.c6_ymax.configure(background="white")
        self.c6_ymax.configure(disabledforeground="#a3a3a3")
        self.c6_ymax.configure(font="TkFixedFont")
        self.c6_ymax.configure(foreground="#000000")
        self.c6_ymax.configure(highlightbackground="#d9d9d9")
        self.c6_ymax.configure(highlightcolor="black")
        self.c6_ymax.configure(insertbackground="black")
        self.c6_ymax.configure(selectbackground="#c4c4c4")
        self.c6_ymax.configure(selectforeground="black")
        self.c6_ymax.configure(takefocus="0")

        self.Label1_36 = tk.Label(self.TNotebook1_t6)
        self.Label1_36.place(relx=0.815, rely=0.305, height=20, width=38)
        self.Label1_36.configure(activebackground="#f9f9f9")
        self.Label1_36.configure(activeforeground="black")
        self.Label1_36.configure(background="#86bad8")
        self.Label1_36.configure(disabledforeground="#a3a3a3")
        self.Label1_36.configure(foreground="#000000")
        self.Label1_36.configure(highlightbackground="#d9d9d9")
        self.Label1_36.configure(highlightcolor="black")
        self.Label1_36.configure(justify='left')
        self.Label1_36.configure(text='''y max''')

        self.Label1_44 = tk.Label(self.TNotebook1_t6)
        self.Label1_44.place(relx=0.815, rely=0.405, height=20, width=38)
        self.Label1_44.configure(activebackground="#f9f9f9")
        self.Label1_44.configure(activeforeground="black")
        self.Label1_44.configure(background="#86bad8")
        self.Label1_44.configure(disabledforeground="#a3a3a3")
        self.Label1_44.configure(foreground="#000000")
        self.Label1_44.configure(highlightbackground="#d9d9d9")
        self.Label1_44.configure(highlightcolor="black")
        self.Label1_44.configure(justify='left')
        self.Label1_44.configure(text='''y max''')

        self.Label1_52 = tk.Label(self.TNotebook1_t6)
        self.Label1_52.place(relx=0.815, rely=0.505, height=20, width=38)
        self.Label1_52.configure(activebackground="#f9f9f9")
        self.Label1_52.configure(activeforeground="black")
        self.Label1_52.configure(background="#86bad8")
        self.Label1_52.configure(disabledforeground="#a3a3a3")
        self.Label1_52.configure(foreground="#000000")
        self.Label1_52.configure(highlightbackground="#d9d9d9")
        self.Label1_52.configure(highlightcolor="black")
        self.Label1_52.configure(justify='left')
        self.Label1_52.configure(text='''y max''')

        self.Label1_60 = tk.Label(self.TNotebook1_t6)
        self.Label1_60.place(relx=0.815, rely=0.605, height=20, width=38)
        self.Label1_60.configure(activebackground="#f9f9f9")
        self.Label1_60.configure(activeforeground="black")
        self.Label1_60.configure(background="#86bad8")
        self.Label1_60.configure(disabledforeground="#a3a3a3")
        self.Label1_60.configure(foreground="#000000")
        self.Label1_60.configure(highlightbackground="#d9d9d9")
        self.Label1_60.configure(highlightcolor="black")
        self.Label1_60.configure(justify='left')
        self.Label1_60.configure(text='''y max''')

        self.c3_ymin = tk.Entry(self.TNotebook1_t6)
        self.c3_ymin.place(relx=0.858, rely=0.345,height=20, relwidth=0.05)
        self.c3_ymin.configure(background="white")
        self.c3_ymin.configure(disabledforeground="#a3a3a3")
        self.c3_ymin.configure(font="TkFixedFont")
        self.c3_ymin.configure(foreground="#000000")
        self.c3_ymin.configure(highlightbackground="#d9d9d9")
        self.c3_ymin.configure(highlightcolor="black")
        self.c3_ymin.configure(insertbackground="black")
        self.c3_ymin.configure(selectbackground="#c4c4c4")
        self.c3_ymin.configure(selectforeground="black")
        self.c3_ymin.configure(takefocus="0")

        self.c4_ymin = tk.Entry(self.TNotebook1_t6)
        self.c4_ymin.place(relx=0.858, rely=0.445,height=20, relwidth=0.05)
        self.c4_ymin.configure(background="white")
        self.c4_ymin.configure(disabledforeground="#a3a3a3")
        self.c4_ymin.configure(font="TkFixedFont")
        self.c4_ymin.configure(foreground="#000000")
        self.c4_ymin.configure(highlightbackground="#d9d9d9")
        self.c4_ymin.configure(highlightcolor="black")
        self.c4_ymin.configure(insertbackground="black")
        self.c4_ymin.configure(selectbackground="#c4c4c4")
        self.c4_ymin.configure(selectforeground="black")
        self.c4_ymin.configure(takefocus="0")

        self.c5_ymin = tk.Entry(self.TNotebook1_t6)
        self.c5_ymin.place(relx=0.858, rely=0.545,height=20, relwidth=0.05)
        self.c5_ymin.configure(background="white")
        self.c5_ymin.configure(disabledforeground="#a3a3a3")
        self.c5_ymin.configure(font="TkFixedFont")
        self.c5_ymin.configure(foreground="#000000")
        self.c5_ymin.configure(highlightbackground="#d9d9d9")
        self.c5_ymin.configure(highlightcolor="black")
        self.c5_ymin.configure(insertbackground="black")
        self.c5_ymin.configure(selectbackground="#c4c4c4")
        self.c5_ymin.configure(selectforeground="black")
        self.c5_ymin.configure(takefocus="0")

        self.c6_ymin = tk.Entry(self.TNotebook1_t6)
        self.c6_ymin.place(relx=0.858, rely=0.645,height=20, relwidth=0.05)
        self.c6_ymin.configure(background="white")
        self.c6_ymin.configure(disabledforeground="#a3a3a3")
        self.c6_ymin.configure(font="TkFixedFont")
        self.c6_ymin.configure(foreground="#000000")
        self.c6_ymin.configure(highlightbackground="#d9d9d9")
        self.c6_ymin.configure(highlightcolor="black")
        self.c6_ymin.configure(insertbackground="black")
        self.c6_ymin.configure(selectbackground="#c4c4c4")
        self.c6_ymin.configure(selectforeground="black")
        self.c6_ymin.configure(takefocus="0")

        self.Label1_45 = tk.Label(self.TNotebook1_t6)
        self.Label1_45.place(relx=0.815, rely=0.45, height=20, width=38)
        self.Label1_45.configure(activebackground="#f9f9f9")
        self.Label1_45.configure(activeforeground="black")
        self.Label1_45.configure(background="#86bad8")
        self.Label1_45.configure(disabledforeground="#a3a3a3")
        self.Label1_45.configure(foreground="#000000")
        self.Label1_45.configure(highlightbackground="#d9d9d9")
        self.Label1_45.configure(highlightcolor="black")
        self.Label1_45.configure(justify='left')
        self.Label1_45.configure(text='''y min''')

        self.Label1_53 = tk.Label(self.TNotebook1_t6)
        self.Label1_53.place(relx=0.815, rely=0.55, height=20, width=38)
        self.Label1_53.configure(activebackground="#f9f9f9")
        self.Label1_53.configure(activeforeground="black")
        self.Label1_53.configure(anchor='n')
        self.Label1_53.configure(background="#86bad8")
        self.Label1_53.configure(disabledforeground="#a3a3a3")
        self.Label1_53.configure(foreground="#000000")
        self.Label1_53.configure(highlightbackground="#d9d9d9")
        self.Label1_53.configure(highlightcolor="black")
        self.Label1_53.configure(justify='left')
        self.Label1_53.configure(text='''y min''')

        self.Label1_37 = tk.Label(self.TNotebook1_t6)
        self.Label1_37.place(relx=0.815, rely=0.35, height=20, width=38)
        self.Label1_37.configure(activebackground="#f9f9f9")
        self.Label1_37.configure(activeforeground="black")
        self.Label1_37.configure(background="#86bad8")
        self.Label1_37.configure(disabledforeground="#a3a3a3")
        self.Label1_37.configure(foreground="#000000")
        self.Label1_37.configure(highlightbackground="#d9d9d9")
        self.Label1_37.configure(highlightcolor="black")
        self.Label1_37.configure(justify='left')
        self.Label1_37.configure(text='''y min''')

        self.Label1_61 = tk.Label(self.TNotebook1_t6)
        self.Label1_61.place(relx=0.815, rely=0.65, height=20, width=38)
        self.Label1_61.configure(activebackground="#f9f9f9")
        self.Label1_61.configure(activeforeground="black")
        self.Label1_61.configure(background="#86bad8")
        self.Label1_61.configure(disabledforeground="#a3a3a3")
        self.Label1_61.configure(foreground="#000000")
        self.Label1_61.configure(highlightbackground="#d9d9d9")
        self.Label1_61.configure(highlightcolor="black")
        self.Label1_61.configure(justify='left')
        self.Label1_61.configure(text='''y min''')

        self.Generate = tk.Button(self.TNotebook1_t6, command =self.artificial_data)
        self.Generate.place(relx=0.838, rely=0.7, height=34, width=158)
        self.Generate.configure(activebackground="#ececec")
        self.Generate.configure(activeforeground="#000000")
        self.Generate.configure(background="#ffae21")
        self.Generate.configure(disabledforeground="#a3a3a3")
        self.Generate.configure(foreground="#000000")
        self.Generate.configure(highlightbackground="#d9d9d9")
        self.Generate.configure(highlightcolor="black")
        self.Generate.configure(pady="0")
        self.Generate.configure(takefocus="0")
        self.Generate.configure(text='''Generate Artificial Sample''')

        self.ArtificialOutButton = tk.Button(self.TNotebook1_t6, command =self.artificial_out)
        self.ArtificialOutButton.place(relx=0.838, rely=0.9, height=34, width=158)
        self.ArtificialOutButton.configure(activebackground="#ececec")
        self.ArtificialOutButton.configure(activeforeground="#000000")
        self.ArtificialOutButton.configure(background="#ffae21")
        self.ArtificialOutButton.configure(disabledforeground="#a3a3a3")
        self.ArtificialOutButton.configure(foreground="#000000")
        self.ArtificialOutButton.configure(highlightbackground="#d9d9d9")
        self.ArtificialOutButton.configure(highlightcolor="black")
        self.ArtificialOutButton.configure(pady="0")
        self.ArtificialOutButton.configure(takefocus="0")
        self.ArtificialOutButton.configure(text='''Export Artificial Sample''')
        
        self.random_seed_label = tk.Label(self.TNotebook1_t6)
        self.random_seed_label.place(relx=0.42, rely=0.7, height=20, width=150)
        self.random_seed_label.configure(activebackground="#f9f9f9")
        self.random_seed_label.configure(activeforeground="black")
        self.random_seed_label.configure(background="#86bad8")
        self.random_seed_label.configure(disabledforeground="#a3a3a3")
        self.random_seed_label.configure(foreground="#000000")
        self.random_seed_label.configure(highlightbackground="#d9d9d9")
        self.random_seed_label.configure(highlightcolor="black")
        self.random_seed_label.configure(justify='left')
        self.random_seed_label.configure(text='''random seed''')
        
        self.random_seed = tk.Entry(self.TNotebook1_t6)
        self.random_seed.place(relx=0.54, rely=0.7, height=20, width=50)
        self.random_seed.configure(background="white")
        self.random_seed.configure(disabledforeground="#a3a3a3")
        self.random_seed.configure(font="TkFixedFont")
        self.random_seed.configure(foreground="#000000")
        self.random_seed.configure(highlightbackground="#d9d9d9")
        self.random_seed.configure(highlightcolor="black")
        self.random_seed.configure(insertbackground="black")
        self.random_seed.configure(selectbackground="#c4c4c4")
        self.random_seed.configure(selectforeground="black")
        self.random_seed.configure(takefocus="0")
        self.random_seed.insert('end',1234)
        
        self.use_rand_val=IntVar(self.TNotebook1_t6)
        self.use_rand_val.set(0)
        self.use_rand = tk.Checkbutton(self.TNotebook1_t6, anchor='w')
        self.use_rand.place(relx=0.45, rely=0.77, height=40, width=150)
        self.use_rand.configure(activebackground="#86bad8")
        self.use_rand.configure(activeforeground="#000000")
        self.use_rand.configure(background="#86bad8")
        self.use_rand.configure(disabledforeground="#86bad8")
        self.use_rand.configure(foreground="#000000")
        self.use_rand.configure(highlightbackground="#86bad8")
        self.use_rand.configure(highlightcolor="#000000")
        self.use_rand.configure(justify='left')
        self.use_rand.configure(takefocus="0")
        self.use_rand.configure(text='''Use Random \n Sample''')
        self.use_rand.configure(variable=self.use_rand_val)

        
        self.ResetRandom = tk.Button(self.TNotebook1_t6, command =self.reset_random)
        self.ResetRandom.place(relx=0.838, rely=0.8, height=34, width=158)
        self.ResetRandom.configure(activebackground="#ececec")
        self.ResetRandom.configure(activeforeground="#000000")
        self.ResetRandom.configure(background="red")
        self.ResetRandom.configure(disabledforeground="#a3a3a3")
        self.ResetRandom.configure(foreground="#000000")
        self.ResetRandom.configure(highlightbackground="red")
        self.ResetRandom.configure(highlightcolor="black")
        self.ResetRandom.configure(pady="0")
        self.ResetRandom.configure(takefocus="0")
        self.ResetRandom.configure(text='''Reset Artificial Sample''')

        self.Label1_38 = tk.Label(self.TNotebook1_t6)
        self.Label1_38.place(relx=0.917, rely=0.3, height=21, width=79)
        self.Label1_38.configure(activebackground="#f9f9f9")
        self.Label1_38.configure(activeforeground="black")
        self.Label1_38.configure(background="#86bad8")
        self.Label1_38.configure(disabledforeground="#a3a3a3")
        self.Label1_38.configure(foreground="#000000")
        self.Label1_38.configure(highlightbackground="#d9d9d9")
        self.Label1_38.configure(highlightcolor="black")
        self.Label1_38.configure(justify='left')
        self.Label1_38.configure(text='''Distribution''')

        self.Label1_46 = tk.Label(self.TNotebook1_t6)
        self.Label1_46.place(relx=0.917, rely=0.4, height=21, width=79)
        self.Label1_46.configure(activebackground="#f9f9f9")
        self.Label1_46.configure(activeforeground="black")
        self.Label1_46.configure(background="#86bad8")
        self.Label1_46.configure(disabledforeground="#a3a3a3")
        self.Label1_46.configure(foreground="#000000")
        self.Label1_46.configure(highlightbackground="#d9d9d9")
        self.Label1_46.configure(highlightcolor="black")
        self.Label1_46.configure(justify='left')
        self.Label1_46.configure(text='''Distribution''')

        self.Label1_54 = tk.Label(self.TNotebook1_t6)
        self.Label1_54.place(relx=0.917, rely=0.5, height=21, width=79)
        self.Label1_54.configure(activebackground="#f9f9f9")
        self.Label1_54.configure(activeforeground="black")
        self.Label1_54.configure(background="#86bad8")
        self.Label1_54.configure(disabledforeground="#a3a3a3")
        self.Label1_54.configure(foreground="#000000")
        self.Label1_54.configure(highlightbackground="#d9d9d9")
        self.Label1_54.configure(highlightcolor="black")
        self.Label1_54.configure(justify='left')
        self.Label1_54.configure(text='''Distribution''')

        self.Label1_62 = tk.Label(self.TNotebook1_t6)
        self.Label1_62.place(relx=0.917, rely=0.6, height=21, width=79)
        self.Label1_62.configure(activebackground="#f9f9f9")
        self.Label1_62.configure(activeforeground="black")
        self.Label1_62.configure(background="#86bad8")
        self.Label1_62.configure(disabledforeground="#a3a3a3")
        self.Label1_62.configure(foreground="#000000")
        self.Label1_62.configure(highlightbackground="#d9d9d9")
        self.Label1_62.configure(highlightcolor="black")
        self.Label1_62.configure(justify='left')
        self.Label1_62.configure(text='''Distribution''')

        self.c1_dist_val=StringVar(self.TNotebook1_t6)
        self.c1_dist_val.set('Uniform')
        self.c1_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c1_dist.place(relx=0.922, rely=0.14, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c1_dist.configure(values=self.value_list)
        self.c1_dist.configure(textvariable=self.c1_dist_val)

        self.c2_dist_val=StringVar(self.TNotebook1_t6)
        self.c2_dist_val.set('Uniform')
        self.c2_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c2_dist.place(relx=0.922, rely=0.24, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c2_dist.configure(values=self.value_list)
        self.c2_dist.configure(textvariable=self.c2_dist_val)


        self.c3_dist_val=StringVar(self.TNotebook1_t6)
        self.c3_dist_val.set('Uniform')
        self.c3_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c3_dist.place(relx=0.922, rely=0.34, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c3_dist.configure(values=self.value_list)
        self.c3_dist.configure(takefocus="")
        self.c3_dist.configure(textvariable=self.c3_dist_val)

        self.c4_dist_val=StringVar(self.TNotebook1_t6)
        self.c4_dist_val.set('Uniform')
        self.c4_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c4_dist.place(relx=0.922, rely=0.44, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c4_dist.configure(values=self.value_list)
        self.c4_dist.configure(textvariable=self.c4_dist_val)

        self.c5_dist_val=StringVar(self.TNotebook1_t6)
        self.c5_dist_val.set('Uniform')
        self.c5_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c5_dist.place(relx=0.922, rely=0.54, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c5_dist.configure(values=self.value_list)
        self.c5_dist.configure(textvariable=self.c5_dist_val)

        self.c6_dist_val=StringVar(self.TNotebook1_t6)
        self.c6_dist_val.set('Uniform')
        self.c6_dist = ttk.Combobox(self.TNotebook1_t6)
        self.c6_dist.place(relx=0.922, rely=0.64, relheight=0.035, relwidth=0.072)
        self.value_list = ['Normal','Uniform',]
        self.c6_dist.configure(values=self.value_list)
        self.c6_dist.configure(textvariable=self.c6_dist_val)

        self.c1_xmin = tk.Entry(self.TNotebook1_t6)
        self.c1_xmin.place(relx=0.665, rely=0.125,height=20, relwidth=0.05)
        self.c1_xmin.configure(background="white")
        self.c1_xmin.configure(disabledforeground="#a3a3a3")
        self.c1_xmin.configure(font="TkFixedFont")
        self.c1_xmin.configure(foreground="#000000")
        self.c1_xmin.configure(highlightbackground="#d9d9d9")
        self.c1_xmin.configure(highlightcolor="black")
        self.c1_xmin.configure(insertbackground="black")
        self.c1_xmin.configure(selectbackground="#c4c4c4")
        self.c1_xmin.configure(selectforeground="black")
        self.c1_xmin.configure(takefocus="0")

        self.c1_xmax = tk.Entry(self.TNotebook1_t6)
        self.c1_xmax.place(relx=0.76, rely=0.125,height=20, relwidth=0.05)
        self.c1_xmax.configure(background="white")
        self.c1_xmax.configure(disabledforeground="#a3a3a3")
        self.c1_xmax.configure(font="TkFixedFont")
        self.c1_xmax.configure(foreground="#000000")
        self.c1_xmax.configure(highlightbackground="#d9d9d9")
        self.c1_xmax.configure(highlightcolor="black")
        self.c1_xmax.configure(insertbackground="black")
        self.c1_xmax.configure(selectbackground="#c4c4c4")
        self.c1_xmax.configure(selectforeground="black")
        self.c1_xmax.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.461, rely=0.183, relwidth=0.539)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t6)
        self.TSeparator1.place(relx=0.304, rely=0.092, relwidth=0.696)
        self.TSeparator1.configure(takefocus="0")



################################################################################
################################################################################
################################################################################


        self.PreviewCanvas = tk.Canvas(self.TNotebook1_t0)
        self.PreviewCanvas.place(relx=0.47, rely=0.035, relheight=0.8
                , relwidth=0.525)
        self.PreviewCanvas.configure(background="#d9d9d9")
        self.PreviewCanvas.configure(borderwidth="2")
        self.PreviewCanvas.configure(highlightbackground="#d9d9d9")
        self.PreviewCanvas.configure(highlightcolor="black")
        self.PreviewCanvas.configure(insertbackground="black")
        self.PreviewCanvas.configure(relief='ridge')
        self.PreviewCanvas.configure(selectbackground="#c4c4c4")
        self.PreviewCanvas.configure(selectforeground="black")
        self.PreviewCanvas.configure(width=283)
#        tkagg.NavigationToolbar2Tk(self.PreviewCanvas, self.TNotebook1_t0)
        
        self.PreviewGrid = tk.Button(self.TNotebook1_t0, command=self.plot_bin_spin)
        self.PreviewGrid.place(relx=0.157, rely=0.567, height=54, width=147)
        self.PreviewGrid.configure(activebackground="#ececec")
        self.PreviewGrid.configure(activeforeground="#000000")
        self.PreviewGrid.configure(background="#ffae21")
        self.PreviewGrid.configure(disabledforeground="#a3a3a3")
        self.PreviewGrid.configure(foreground="#000000")
        self.PreviewGrid.configure(highlightbackground="#d9d9d9")
        self.PreviewGrid.configure(highlightcolor="black")
        self.PreviewGrid.configure(pady="0")
        self.PreviewGrid.configure(takefocus="0")
        self.PreviewGrid.configure(text='''Preview Grid''')

        self.Label17 = tk.Label(self.TNotebook1_t0)
        self.Label17.place(relx=0.245, rely=0.442, height=21, width=54)
        self.Label17.configure(activebackground="#f9f9f9")
        self.Label17.configure(activeforeground="black")
        self.Label17.configure(background="#b5b5b5")
        self.Label17.configure(disabledforeground="#a3a3a3")
        self.Label17.configure(foreground="#000000")
        self.Label17.configure(highlightbackground="#d9d9d9")
        self.Label17.configure(highlightcolor="black")
        self.Label17.configure(justify='right')
        self.Label17.configure(relief='groove')

###############################################################################
        ########################################################################
        self.current_filename=tk.StringVar(self.TNotebook1_t0, value='')
        self.current_filename.set('Your Filename Here')  
#        self.current_filename.set('U:/PLAN/BCUBRICH/Python/Fracture MODO/sample.txt')  
#        self.load_file()
        self.CurrentSampleFile = tk.Entry(self.TNotebook1_t0,textvariable=self.current_filename)
###############################################################################
        self.CurrentSampleFile.place(relx=0.01, rely=0.95, height=21, width=434)
        self.CurrentSampleFile.configure(background="#b5b5b5")
        self.CurrentSampleFile.configure(foreground="#000000")
        self.CurrentSampleFile.configure(justify='right')
        self.CurrentSampleFile.configure(relief='groove')

        self.Get_Theta = tk.Button(self.TNotebook1_t0, command=self.recommend_theta)
        self.Get_Theta.place(relx=0.201, rely=0.458, height=15, width=24)
        self.Get_Theta.configure(activebackground="#ececec")
        self.Get_Theta.configure(activeforeground="#000000")
        self.Get_Theta.configure(background="#ffae21")
        self.Get_Theta.configure(disabledforeground="#a3a3a3")
        self.Get_Theta.configure(font=font14)
        self.Get_Theta.configure(foreground="#000000")
        self.Get_Theta.configure(highlightbackground="#d9d9d9")
        self.Get_Theta.configure(highlightcolor="black")
        self.Get_Theta.configure(pady="0")
        self.Get_Theta.configure(text='''GET''')


###############################################################################
        #added frame for toolbars
        self.tab1_frame = tk.Frame(self.TNotebook1_t1)
        self.tab1_beta_frame = tk.Frame(self.TNotebook1_t1)
###############################################################################
###############################################################################
        #added frame for toolbars
        self.tab2_mult_frame = tk.Frame(self.TNotebook1_t2)
        self.tab2_beta_frame = tk.Frame(self.TNotebook1_t2)
###############################################################################
        
        
        self.Mult_Contour = tk.Canvas(self.TNotebook1_t1)
        self.Mult_Contour.place(relx=0.52, rely=0.283, relheight=0.65
                , relwidth=0.454)
        self.Mult_Contour.configure(background="#d9d9d9")
        self.Mult_Contour.configure(borderwidth="2")
        self.Mult_Contour.configure(highlightbackground="#d9d9d9")
        self.Mult_Contour.configure(highlightcolor="black")
        self.Mult_Contour.configure(insertbackground="black")
        self.Mult_Contour.configure(relief='ridge')
        self.Mult_Contour.configure(selectbackground="#c4c4c4")
        self.Mult_Contour.configure(selectforeground="black")
        self.Mult_Contour.configure(takefocus="0")
        self.Mult_Contour.configure(width=463)

        self.BetaContCanvas = tk.Canvas(self.TNotebook1_t1)
        self.BetaContCanvas.place(relx=0.02, rely=0.283, relheight=0.65
                , relwidth=0.454)
        self.BetaContCanvas.configure(background="#d9d9d9")
        self.BetaContCanvas.configure(borderwidth="2")
        self.BetaContCanvas.configure(highlightbackground="#d9d9d9")
        self.BetaContCanvas.configure(highlightcolor="black")
        self.BetaContCanvas.configure(insertbackground="black")
        self.BetaContCanvas.configure(relief='ridge')
        self.BetaContCanvas.configure(selectbackground="#c4c4c4")
        self.BetaContCanvas.configure(selectforeground="black")
        self.BetaContCanvas.configure(takefocus="0")
        self.BetaContCanvas.configure(width=463)
        
        self.Artificial_Sample_Canvas = tk.Canvas(self.TNotebook1_t6)
        self.Artificial_Sample_Canvas.place(relx=0, rely=0.1, relheight=0.8
                , relwidth=0.425)
        self.Artificial_Sample_Canvas.configure(background="#d9d9d9")
        self.Artificial_Sample_Canvas.configure(borderwidth="2")
        self.Artificial_Sample_Canvas.configure(highlightbackground="#d9d9d9")
        self.Artificial_Sample_Canvas.configure(highlightcolor="black")
        self.Artificial_Sample_Canvas.configure(insertbackground="black")
        self.Artificial_Sample_Canvas.configure(relief='ridge')
        self.Artificial_Sample_Canvas.configure(selectbackground="#c4c4c4")
        self.Artificial_Sample_Canvas.configure(selectforeground="black")
        self.Artificial_Sample_Canvas.configure(takefocus="0")
        self.Artificial_Sample_Canvas.configure(width=463)

        self.Update_Plots_mult1 = tk.Button(self.TNotebook1_t1)
        self.Update_Plots_mult1.place(relx=0.059, rely=0.183, height=24
                , width=49)
        self.Update_Plots_mult1.configure(activebackground="#ececec")
        self.Update_Plots_mult1.configure(activeforeground="#000000")
        self.Update_Plots_mult1.configure(background="#ffae21")
        self.Update_Plots_mult1.configure(disabledforeground="#a3a3a3")
        self.Update_Plots_mult1.configure(foreground="#000000")
        self.Update_Plots_mult1.configure(highlightbackground="#d9d9d9")
        self.Update_Plots_mult1.configure(highlightcolor="black")
        self.Update_Plots_mult1.configure(pady="0")
        self.Update_Plots_mult1.configure(takefocus="0")
        self.Update_Plots_mult1.configure(text='''Update''')

#        self.Export_m1 = tk.Button(self.TNotebook1_t1)
#        self.Export_m1.place(relx=0.059, rely=0.233, height=24, width=49)
#        self.Export_m1.configure(activebackground="#ececec")
#        self.Export_m1.configure(activeforeground="#000000")
#        self.Export_m1.configure(background="#ffae21")
#        self.Export_m1.configure(disabledforeground="#a3a3a3")
#        self.Export_m1.configure(foreground="#000000")
#        self.Export_m1.configure(highlightbackground="#d9d9d9")
#        self.Export_m1.configure(highlightcolor="black")
#        self.Export_m1.configure(pady="0")
#        self.Export_m1.configure(takefocus="0")
#        self.Export_m1.configure(text='''Export''')

        self.Update_Plots_mult2 = tk.Button(self.TNotebook1_t1,command=self.update_mult)
        self.Update_Plots_mult2.place(relx=0.539, rely=0.175, height=24
                , width=49)
        self.Update_Plots_mult2.configure(activebackground="#ececec")
        self.Update_Plots_mult2.configure(activeforeground="#000000")
        self.Update_Plots_mult2.configure(background="#ffae21")
        self.Update_Plots_mult2.configure(disabledforeground="#a3a3a3")
        self.Update_Plots_mult2.configure(foreground="#000000")
        self.Update_Plots_mult2.configure(highlightbackground="#d9d9d9")
        self.Update_Plots_mult2.configure(highlightcolor="black")
        self.Update_Plots_mult2.configure(pady="0")
        self.Update_Plots_mult2.configure(takefocus="0")
        self.Update_Plots_mult2.configure(text='''Update''')
#
#        self.Export_m2 = tk.Button(self.TNotebook1_t1)
#        self.Export_m2.place(relx=0.539, rely=0.225, height=24, width=49)
#        self.Export_m2.configure(activebackground="#ececec")
#        self.Export_m2.configure(activeforeground="#000000")
#        self.Export_m2.configure(background="#ffae21")
#        self.Export_m2.configure(disabledforeground="#a3a3a3")
#        self.Export_m2.configure(foreground="#000000")
#        self.Export_m2.configure(highlightbackground="#d9d9d9")
#        self.Export_m2.configure(highlightcolor="black")
#        self.Export_m2.configure(pady="0")
#        self.Export_m2.configure(takefocus="0")
#        self.Export_m2.configure(text='''Export''')

        self.Label2_7 = tk.Label(self.TNotebook1_t1)
        self.Label2_7.place(relx=0.029, rely=0.017, height=31, width=216)
        self.Label2_7.configure(activebackground="#f9f9f9")
        self.Label2_7.configure(activeforeground="black")
        self.Label2_7.configure(background="#86bad8")
        self.Label2_7.configure(disabledforeground="#a3a3a3")
        self.Label2_7.configure(font=font13)
        self.Label2_7.configure(foreground="#000000")
        self.Label2_7.configure(highlightbackground="#d9d9d9")
        self.Label2_7.configure(highlightcolor="black")
        self.Label2_7.configure(text='''Beta Contour Settings''')

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t1)
        self.TSeparator1.place(relx=0.025, rely=0.067, relwidth=0.225)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator3 = ttk.Separator(self.TNotebook1_t1)
        self.TSeparator3.place(relx=0.495, rely=-0.017, relheight=1.0)
        self.TSeparator3.configure(orient="vertical")
        self.TSeparator3.configure(takefocus="0")

        self.Label2_1 = tk.Label(self.TNotebook1_t1)
        self.Label2_1.place(relx=0.025, rely=0.083, height=21, width=64)
        self.Label2_1.configure(activebackground="#f9f9f9")
        self.Label2_1.configure(activeforeground="black")
        self.Label2_1.configure(background="#86bad8")
        self.Label2_1.configure(disabledforeground="#a3a3a3")
        self.Label2_1.configure(foreground="#000000")
        self.Label2_1.configure(highlightbackground="#d9d9d9")
        self.Label2_1.configure(highlightcolor="black")
        self.Label2_1.configure(text='''Color Ramp''')

        self.Label2_6 = tk.Label(self.TNotebook1_t1)
        self.Label2_6.place(relx=0.52, rely=0.083, height=21, width=64)
        self.Label2_6.configure(activebackground="#f9f9f9")
        self.Label2_6.configure(activeforeground="black")
        self.Label2_6.configure(background="#86bad8")
        self.Label2_6.configure(disabledforeground="#a3a3a3")
        self.Label2_6.configure(foreground="#000000")
        self.Label2_6.configure(highlightbackground="#d9d9d9")
        self.Label2_6.configure(highlightcolor="black")
        self.Label2_6.configure(text='''Color Ramp''')

        self.Label2_8 = tk.Label(self.TNotebook1_t1)
        self.Label2_8.place(relx=0.52, rely=0.017, height=31, width=256)
        self.Label2_8.configure(activebackground="#f9f9f9")
        self.Label2_8.configure(activeforeground="black")
        self.Label2_8.configure(background="#86bad8")
        self.Label2_8.configure(disabledforeground="#a3a3a3")
        self.Label2_8.configure(font=font13)
        self.Label2_8.configure(foreground="#000000")
        self.Label2_8.configure(highlightbackground="#d9d9d9")
        self.Label2_8.configure(highlightcolor="black")
        self.Label2_8.configure(text='''Multinomial Contour Settings''')
        
        self.TSeparator1 = ttk.Separator(self.TNotebook1_t1)
        self.TSeparator1.place(relx=0.525, rely=0.075, relwidth=0.245)
        self.TSeparator1.configure(takefocus="0")
        
        self.user_mult_cmap=StringVar(self.TNotebook1_t1, value='gnuplot2')
        self.user_mult_cmap.trace('w',self.mult_cont_cmap)
        self.mult_cont_cmap = ttk.Combobox(self.TNotebook1_t1, textvariable=self.user_mult_cmap,values=self.cmaps)
        self.mult_cont_cmap.place(relx=0.52, rely=0.117, relheight=0.035
                , relwidth=0.101)

        self.user_beta_cmap=StringVar(self.TNotebook1_t1, value='gnuplot2')
        self.user_beta_cmap.trace('w',self.beta_cont_cmap)        
        self.beta_cont_cmap = ttk.Combobox(self.TNotebook1_t1, textvariable=self.user_beta_cmap,values=self.cmaps)
        self.beta_cont_cmap.place(relx=0.029, rely=0.117, relheight=0.035
                , relwidth=0.111)
        
###############################################################################
#                          Added slider for multinomial strike size
##############################################################################
        
        
        self.mult_strike_scale = tk.Scale(self.TNotebook1_t1, from_=1, to=100, command=self.mult_strike_size)
        self.mult_strike_scale.place(relx=0.65, rely=0.08, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.mult_strike_scale.configure(activebackground="#86bad8")
        self.mult_strike_scale.configure(background="#86bad8")
        self.mult_strike_scale.configure(font="TkTextFont")
        self.mult_strike_scale.configure(foreground="#000000")
        self.mult_strike_scale.configure(highlightbackground="#86bad8")
        self.mult_strike_scale.configure(highlightcolor="black")
        self.mult_strike_scale.configure(label="Strike Marker Size")
        self.mult_strike_scale.configure(orient="horizontal")
        self.mult_strike_scale.configure(takefocus="0")
        self.mult_strike_scale.configure(troughcolor="#f2f2f2")


        
###############################################################################
#            Added slider for multinomial point size scale on point plot
##############################################################################
        
        
        self.mult_point_scale = tk.Scale(self.TNotebook1_t2, from_=1, to=100, command=self.mult_point_size)
        self.mult_point_scale.place(relx=0.65, rely=0.08, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.mult_point_scale.configure(activebackground="#86bad8")
        self.mult_point_scale.configure(background="#86bad8")
        self.mult_point_scale.configure(font="TkTextFont")
        self.mult_point_scale.configure(foreground="#000000")
        self.mult_point_scale.configure(highlightbackground="#86bad8")
        self.mult_point_scale.configure(highlightcolor="black")
        self.mult_point_scale.configure(label="point Marker Size")
        self.mult_point_scale.configure(orient="horizontal")
        self.mult_point_scale.configure(takefocus="0")
        self.mult_point_scale.configure(troughcolor="#f2f2f2")



###############################################################################
#                          Added slider for  betastrike size
##############################################################################
        
        
        self.beta_strike_scale = tk.Scale(self.TNotebook1_t1, from_=1, to=100, command=self.beta_strike_size)
        self.beta_strike_scale.place(relx=0.167, rely=0.08, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.beta_strike_scale.configure(activebackground="#86bad8")
        self.beta_strike_scale.configure(background="#86bad8")
        self.beta_strike_scale.configure(font="TkTextFont")
        self.beta_strike_scale.configure(foreground="#000000")
        self.beta_strike_scale.configure(highlightbackground="#86bad8")
        self.beta_strike_scale.configure(highlightcolor="black")
        self.beta_strike_scale.configure(label="Strike Marker Size")
        self.beta_strike_scale.configure(orient="horizontal")
        self.beta_strike_scale.configure(takefocus="0")
        self.beta_strike_scale.configure(troughcolor="#f2f2f2")
                                         
###############################################################################
#             7/10/20 Added slider for  betastrike size
##############################################################################
        
        
        self.beta_strike_scale = tk.Scale(self.TNotebook1_t2, from_=1, to=100, command=self.beta_point_size)
        self.beta_strike_scale.place(relx=0.167, rely=0.08, relwidth=0.104, relheight=0.0
                , height=59, bordermode='ignore')
        self.beta_strike_scale.configure(activebackground="#86bad8")
        self.beta_strike_scale.configure(background="#86bad8")
        self.beta_strike_scale.configure(font="TkTextFont")
        self.beta_strike_scale.configure(foreground="#000000")
        self.beta_strike_scale.configure(highlightbackground="#86bad8")
        self.beta_strike_scale.configure(highlightcolor="black")
        self.beta_strike_scale.configure(label="Strike Marker Size")
        self.beta_strike_scale.configure(orient="horizontal")
        self.beta_strike_scale.configure(takefocus="0")
        self.beta_strike_scale.configure(troughcolor="#f2f2f2")



##############################################################################
##############################################################################

        self.Label2_3 = tk.Label(self.TNotebook1_t1)
        self.Label2_3.place(relx=0.289, rely=0.11, height=21, width=64)
        self.Label2_3.configure(activebackground="#f9f9f9")
        self.Label2_3.configure(activeforeground="black")
        self.Label2_3.configure(background="#86bad8")
        self.Label2_3.configure(disabledforeground="#a3a3a3")
        self.Label2_3.configure(foreground="#000000")
        self.Label2_3.configure(highlightbackground="#d9d9d9")
        self.Label2_3.configure(highlightcolor="black")
        self.Label2_3.configure(text='''Chart Title''')

        self.beta_chart_title = tk.Entry(self.TNotebook1_t1)
        self.beta_chart_title.place(relx=0.289, rely=0.14, height=20
                , relwidth=0.112)
        self.beta_chart_title.configure(background="white")
        self.beta_chart_title.configure(disabledforeground="#a3a3a3")
        self.beta_chart_title.configure(font=font10)
        self.beta_chart_title.configure(foreground="#000000")
        self.beta_chart_title.configure(highlightbackground="#d9d9d9")
        self.beta_chart_title.configure(highlightcolor="black")
        self.beta_chart_title.configure(insertbackground="black")
        self.beta_chart_title.configure(selectbackground="#c4c4c4")
        self.beta_chart_title.configure(selectforeground="black")
        self.beta_chart_title.configure(takefocus="0")

        self.label2_4 = tk.Label(self.TNotebook1_t1)
        self.label2_4.place(relx=0.167, rely=0.19, height=21, width=44)
        self.label2_4.configure(activebackground="#f9f9f9")
        self.label2_4.configure(activeforeground="black")
        self.label2_4.configure(background="#86bad8")
        self.label2_4.configure(borderwidth="0")
        self.label2_4.configure(disabledforeground="#a3a3a3")
        self.label2_4.configure(foreground="#000000")
        self.label2_4.configure(highlightbackground="#d9d9d9")
        self.label2_4.configure(highlightcolor="black")
        self.label2_4.configure(text='''X Label''')

        self.beta_chart_x_name = tk.Entry(self.TNotebook1_t1)
        self.beta_chart_x_name.place(relx=0.162, rely=0.23, height=20
                , relwidth=0.112)
        self.beta_chart_x_name.configure(background="white")
        self.beta_chart_x_name.configure(disabledforeground="#a3a3a3")
        self.beta_chart_x_name.configure(font=font10)
        self.beta_chart_x_name.configure(foreground="#000000")
        self.beta_chart_x_name.configure(highlightbackground="#d9d9d9")
        self.beta_chart_x_name.configure(highlightcolor="black")
        self.beta_chart_x_name.configure(insertbackground="black")
        self.beta_chart_x_name.configure(selectbackground="#c4c4c4")
        self.beta_chart_x_name.configure(selectforeground="black")
        self.beta_chart_x_name.configure(takefocus="0")

#        self.beta_chart_x_name = tk.Entry(self.TNotebook1_t1)
#        self.beta_chart_x_name.place(relx=0.289, rely=0.192, height=20
#                , relwidth=0.112)
#        self.beta_chart_x_name.configure(background="white")
#        self.beta_chart_x_name.configure(disabledforeground="#a3a3a3")
#        self.beta_chart_x_name.configure(font=font10)
#        self.beta_chart_x_name.configure(foreground="#000000")
#        self.beta_chart_x_name.configure(highlightbackground="#d9d9d9")
#        self.beta_chart_x_name.configure(highlightcolor="black")
#        self.beta_chart_x_name.configure(insertbackground="black")
#        self.beta_chart_x_name.configure(selectbackground="#c4c4c4")
#        self.beta_chart_x_name.configure(selectforeground="black")
#        self.beta_chart_x_name.configure(takefocus="0")

        self.beta_chart_y_label = tk.Entry(self.TNotebook1_t1)
        self.beta_chart_y_label.place(relx=0.289, rely=0.23, height=20
                , relwidth=0.112)
        self.beta_chart_y_label.configure(background="white")
        self.beta_chart_y_label.configure(disabledforeground="#a3a3a3")
        self.beta_chart_y_label.configure(font=font10)
        self.beta_chart_y_label.configure(foreground="#000000")
        self.beta_chart_y_label.configure(highlightbackground="#d9d9d9")
        self.beta_chart_y_label.configure(highlightcolor="black")
        self.beta_chart_y_label.configure(insertbackground="black")
        self.beta_chart_y_label.configure(selectbackground="#c4c4c4")
        self.beta_chart_y_label.configure(selectforeground="black")
        self.beta_chart_y_label.configure(takefocus="0")

        self.label2_5 = tk.Label(self.TNotebook1_t1)
        self.label2_5.place(relx=0.294, rely=0.19, height=21, width=44)
        self.label2_5.configure(activebackground="#f9f9f9")
        self.label2_5.configure(activeforeground="black")
        self.label2_5.configure(background="#86bad8")
        self.label2_5.configure(disabledforeground="#a3a3a3")
        self.label2_5.configure(foreground="#000000")
        self.label2_5.configure(highlightbackground="#d9d9d9")
        self.label2_5.configure(highlightcolor="black")
        self.label2_5.configure(text='''Y Label''')
        
        
        self.beta_chart_axis_label_val=IntVar(self.TNotebook1_t1)
        self.beta_chart_axis_label_val.set(1)
        self.beta_chart_axis_labels = tk.Checkbutton(self.TNotebook1_t1)
        self.beta_chart_axis_labels.place(relx=0.02, rely=0.233, relheight=0.042
                , relwidth=0.083)
        self.beta_chart_axis_labels.configure(activebackground="#ececec")
        self.beta_chart_axis_labels.configure(activeforeground="#000000")
        self.beta_chart_axis_labels.configure(background="#86bad8")
        self.beta_chart_axis_labels.configure(disabledforeground="#a3a3a3")
        self.beta_chart_axis_labels.configure(foreground="#000000")
        self.beta_chart_axis_labels.configure(highlightbackground="#d9d9d9")
        self.beta_chart_axis_labels.configure(highlightcolor="black")
        self.beta_chart_axis_labels.configure(justify='left')
        self.beta_chart_axis_labels.configure(takefocus="0")
        self.beta_chart_axis_labels.configure(text='''Axis Labels''')
        self.beta_chart_axis_labels.configure(variable=self.beta_chart_axis_label_val)

        self.label2_9 = tk.Label(self.TNotebook1_t1)
        self.label2_9.place(relx=0.775, rely=0.1, height=22, width=64)
        self.label2_9.configure(activebackground="#f9f9f9")
        self.label2_9.configure(activeforeground="black")
        self.label2_9.configure(background="#86bad8")
        self.label2_9.configure(disabledforeground="#a3a3a3")
        self.label2_9.configure(foreground="#000000")
        self.label2_9.configure(highlightbackground="#d9d9d9")
        self.label2_9.configure(highlightcolor="black")
        self.label2_9.configure(text='''Chart Title''')

        self.mult_cont_title = tk.Entry(self.TNotebook1_t1)
        self.mult_cont_title.place(relx=0.779, rely=0.14, height=20
                , relwidth=0.112)
        self.mult_cont_title.configure(background="white")
        self.mult_cont_title.configure(disabledforeground="#a3a3a3")
        self.mult_cont_title.configure(font=font10)
        self.mult_cont_title.configure(foreground="#000000")
        self.mult_cont_title.configure(highlightbackground="#d9d9d9")
        self.mult_cont_title.configure(highlightcolor="black")
        self.mult_cont_title.configure(insertbackground="black")
        self.mult_cont_title.configure(selectbackground="#c4c4c4")
        self.mult_cont_title.configure(selectforeground="black")
        self.mult_cont_title.configure(takefocus="0")

        self.mult_cont_y_label = tk.Entry(self.TNotebook1_t1)
        self.mult_cont_y_label.place(relx=0.779, rely=0.225, height=20
                , relwidth=0.112)
        self.mult_cont_y_label.configure(background="white")
        self.mult_cont_y_label.configure(disabledforeground="#a3a3a3")
        self.mult_cont_y_label.configure(font=font10)
        self.mult_cont_y_label.configure(foreground="#000000")
        self.mult_cont_y_label.configure(highlightbackground="#d9d9d9")
        self.mult_cont_y_label.configure(highlightcolor="black")
        self.mult_cont_y_label.configure(insertbackground="black")
        self.mult_cont_y_label.configure(selectbackground="#c4c4c4")
        self.mult_cont_y_label.configure(selectforeground="black")
        self.mult_cont_y_label.configure(takefocus="0")
        
        self.cont_max = tk.Entry(self.TNotebook1_t1)
        self.cont_max.place(relx=0.95, rely=0.19, height=20
                , relwidth=0.04)
        self.cont_max.configure(background="white")
        self.cont_max.configure(disabledforeground="#a3a3a3")
        self.cont_max.configure(font=font10)
        self.cont_max.configure(foreground="#000000")
        self.cont_max.configure(highlightbackground="#d9d9d9")
        self.cont_max.configure(highlightcolor="black")
        self.cont_max.configure(insertbackground="black")
        self.cont_max.configure(selectbackground="#c4c4c4")
        self.cont_max.configure(selectforeground="black")
        self.cont_max.configure(takefocus="0")
        
        self.cont_num = tk.Entry(self.TNotebook1_t1)
        self.cont_num.place(relx=0.95, rely=0.23, height=20
                , relwidth=0.04)
        self.cont_num.configure(background="white")
        self.cont_num.configure(disabledforeground="#a3a3a3")
        self.cont_num.configure(font=font10)
        self.cont_num.configure(foreground="#000000")
        self.cont_num.configure(highlightbackground="#d9d9d9")
        self.cont_num.configure(highlightcolor="black")
        self.cont_num.configure(insertbackground="black")
        self.cont_num.configure(selectbackground="#c4c4c4")
        self.cont_num.configure(selectforeground="black")
        self.cont_num.configure(takefocus="0")
        
        self.cont_max_label = tk.Label(self.TNotebook1_t1,anchor='w')
        self.cont_max_label.place(relx=0.91, rely=0.1875, height=21, width=30)
        self.cont_max_label.configure(activebackground="#f9f9f9")
        self.cont_max_label.configure(activeforeground="black")
        self.cont_max_label.configure(background="#86bad8")
        self.cont_max_label.configure(disabledforeground="#a3a3a3")
        self.cont_max_label.configure(foreground="#000000")
        self.cont_max_label.configure(highlightbackground="#d9d9d9")
        self.cont_max_label.configure(highlightcolor="black")
        self.cont_max_label.configure(text='''Max''')
        
        self.cont_num_label = tk.Label(self.TNotebook1_t1,anchor='w')
        self.cont_num_label.place(relx=0.91, rely=0.2275, height=21, width=30)
        self.cont_num_label.configure(activebackground="#f9f9f9")
        self.cont_num_label.configure(activeforeground="black")
        self.cont_num_label.configure(background="#86bad8")
        self.cont_num_label.configure(disabledforeground="#a3a3a3")
        self.cont_num_label.configure(foreground="#000000")
        self.cont_num_label.configure(highlightbackground="#d9d9d9")
        self.cont_num_label.configure(highlightcolor="black")
        self.cont_num_label.configure(text='''Num''')

        self.mult_cont_x_name = tk.Entry(self.TNotebook1_t1)
        self.mult_cont_x_name.place(relx=0.637, rely=0.225, height=20
                , relwidth=0.112)
        self.mult_cont_x_name.configure(background="white")
        self.mult_cont_x_name.configure(disabledforeground="#a3a3a3")
        self.mult_cont_x_name.configure(font=font10)
        self.mult_cont_x_name.configure(foreground="#000000")
        self.mult_cont_x_name.configure(highlightbackground="#d9d9d9")
        self.mult_cont_x_name.configure(highlightcolor="black")
        self.mult_cont_x_name.configure(insertbackground="black")
        self.mult_cont_x_name.configure(selectbackground="#c4c4c4")
        self.mult_cont_x_name.configure(selectforeground="black")
        self.mult_cont_x_name.configure(takefocus="0")

        self.label2_10 = tk.Label(self.TNotebook1_t1)
        self.label2_10.place(relx=0.784, rely=0.19, height=21, width=44)
        self.label2_10.configure(activebackground="#f9f9f9")
        self.label2_10.configure(activeforeground="black")
        self.label2_10.configure(background="#86bad8")
        self.label2_10.configure(disabledforeground="#a3a3a3")
        self.label2_10.configure(foreground="#000000")
        self.label2_10.configure(highlightbackground="#d9d9d9")
        self.label2_10.configure(highlightcolor="black")
        self.label2_10.configure(text='''Y Label''')

        self.label2_7 = tk.Label(self.TNotebook1_t1)
        self.label2_7.place(relx=0.647, rely=0.19, height=21, width=44)
        self.label2_7.configure(activebackground="#f9f9f9")
        self.label2_7.configure(activeforeground="black")
        self.label2_7.configure(background="#86bad8")
        self.label2_7.configure(disabledforeground="#a3a3a3")
        self.label2_7.configure(foreground="#000000")
        self.label2_7.configure(highlightbackground="#d9d9d9")
        self.label2_7.configure(highlightcolor="black")
        self.label2_7.configure(text='''X Label''')

#        self.mult_plot_rng_scale = tk.Checkbutton(self.TNotebook1_t1)
#        self.mult_plot_rng_scale.place(relx=0.25, rely=0.242, relheight=0.042
#                , relwidth=0.089)
#        self.mult_plot_rng_scale.configure(activebackground="#ececec")
#        self.mult_plot_rng_scale.configure(activeforeground="#000000")
#        self.mult_plot_rng_scale.configure(background="#86bad8")
#        self.mult_plot_rng_scale.configure(disabledforeground="#a3a3a3")
#        self.mult_plot_rng_scale.configure(foreground="#000000")
#        self.mult_plot_rng_scale.configure(highlightbackground="#d9d9d9")
#        self.mult_plot_rng_scale.configure(highlightcolor="black")
#        self.mult_plot_rng_scale.configure(justify='left')
#        self.mult_plot_rng_scale.configure(text='''Range Scale''')
#        self.mult_plot_rng_scale.configure(variable=GUI_support.che49)
        
        self.mult_cont_rng_scale_val=IntVar(self.TNotebook1_t1)
        self.mult_cont_rng_scale_val.set(1)
        
        self.mult_cont_rng_scale = tk.Radiobutton(self.TNotebook1_t1,value=0,variable=self.mult_cont_rng_scale_val,anchor='w')
        self.mult_cont_rng_scale.place(relx=0.9, rely=0.08, relheight=0.042
                , relwidth=0.089)
        self.mult_cont_rng_scale.configure(activebackground="#86bad8")
        self.mult_cont_rng_scale.configure(activeforeground="#000000")
        self.mult_cont_rng_scale.configure(background="#86bad8")
        self.mult_cont_rng_scale.configure(disabledforeground="#a3a3a3")
        self.mult_cont_rng_scale.configure(foreground="#000000")
        self.mult_cont_rng_scale.configure(highlightbackground="#d9d9d9")
        self.mult_cont_rng_scale.configure(highlightcolor="black")
        self.mult_cont_rng_scale.configure(justify='left')
        self.mult_cont_rng_scale.configure(text='''Max''')
        
        self.mult_cont_rng_scale1 = tk.Radiobutton(self.TNotebook1_t1,value=1,variable=self.mult_cont_rng_scale_val,anchor='w')
        self.mult_cont_rng_scale1.place(relx=0.9, rely=0.11, relheight=0.042
                , relwidth=0.089)
        self.mult_cont_rng_scale1.configure(activebackground="#86bad8")
        self.mult_cont_rng_scale1.configure(activeforeground="#000000")
        self.mult_cont_rng_scale1.configure(background="#86bad8")
        self.mult_cont_rng_scale1.configure(disabledforeground="#a3a3a3")
        self.mult_cont_rng_scale1.configure(foreground="#000000")
        self.mult_cont_rng_scale1.configure(highlightbackground="#d9d9d9")
        self.mult_cont_rng_scale1.configure(highlightcolor="black")
        self.mult_cont_rng_scale1.configure(justify='left')
        self.mult_cont_rng_scale1.configure(text='''Range''')

        self.mult_cont_rng_scale2 = tk.Radiobutton(self.TNotebook1_t1,value=2,variable=self.mult_cont_rng_scale_val,anchor='w')
        self.mult_cont_rng_scale2.place(relx=0.9, rely=0.14, relheight=0.042
                , relwidth=0.089)
        self.mult_cont_rng_scale2.configure(activebackground="#86bad8")
        self.mult_cont_rng_scale2.configure(activeforeground="#000000")
        self.mult_cont_rng_scale2.configure(background="#86bad8")
        self.mult_cont_rng_scale2.configure(disabledforeground="#a3a3a3")
        self.mult_cont_rng_scale2.configure(foreground="#000000")
        self.mult_cont_rng_scale2.configure(highlightbackground="#d9d9d9")
        self.mult_cont_rng_scale2.configure(highlightcolor="black")
        self.mult_cont_rng_scale2.configure(justify='left')
        self.mult_cont_rng_scale2.configure(text='''Custom''')


        self.mult_cont_axis_label_val=IntVar(self.TNotebook1_t1)
        self.mult_cont_axis_label_val.set(1)
        self.mult_cont_axis_labels = tk.Checkbutton(self.TNotebook1_t1, anchor='w')
        self.mult_cont_axis_labels.place(relx=0.52, rely=0.225, height=24, width=100)
        self.mult_cont_axis_labels.configure(activebackground="#ececec")
        self.mult_cont_axis_labels.configure(activeforeground="#000000")
        self.mult_cont_axis_labels.configure(background="#86bad8")
        self.mult_cont_axis_labels.configure(disabledforeground="#a3a3a3")
        self.mult_cont_axis_labels.configure(foreground="#000000")
        self.mult_cont_axis_labels.configure(highlightbackground="#d9d9d9")
        self.mult_cont_axis_labels.configure(highlightcolor="black")
        self.mult_cont_axis_labels.configure(justify='left')
        self.mult_cont_axis_labels.configure(takefocus="0")
        self.mult_cont_axis_labels.configure(text='''Axis Labels''')
        self.mult_cont_axis_labels.configure(variable=self.mult_cont_axis_label_val)

        self.Beta_Points = tk.Canvas(self.TNotebook1_t2)
        self.Beta_Points.place(relx=0.02, rely=0.283, relheight=0.65
                , relwidth=0.454)
        self.Beta_Points.configure(background="#d9d9d9")
        self.Beta_Points.configure(borderwidth="2")
        self.Beta_Points.configure(highlightbackground="#d9d9d9")
        self.Beta_Points.configure(highlightcolor="black")
        self.Beta_Points.configure(insertbackground="black")
        self.Beta_Points.configure(relief='ridge')
        self.Beta_Points.configure(selectbackground="#c4c4c4")
        self.Beta_Points.configure(selectforeground="black")
        self.Beta_Points.configure(takefocus="0")
        self.Beta_Points.configure(width=463)

        self.Mult_Points = tk.Canvas(self.TNotebook1_t2)
        self.Mult_Points.place(relx=0.52, rely=0.283, relheight=0.65,
                               relwidth=0.454)
        self.Mult_Points.configure(background="#d9d9d9")
        self.Mult_Points.configure(borderwidth="2")
        self.Mult_Points.configure(highlightbackground="#d9d9d9")
        self.Mult_Points.configure(highlightcolor="black")
        self.Mult_Points.configure(insertbackground="black")
        self.Mult_Points.configure(relief='ridge')
        self.Mult_Points.configure(selectbackground="#c4c4c4")
        self.Mult_Points.configure(selectforeground="black")
        self.Mult_Points.configure(takefocus="0")
        self.Mult_Points.configure(width=463)

        self.TSeparator3 = ttk.Separator(self.TNotebook1_t2)
        self.TSeparator3.place(relx=0.495, rely=-0.017, relheight=1.0)
        self.TSeparator3.configure(orient="vertical")
        self.TSeparator3.configure(takefocus="0")

        self.Label3betaplot = tk.Label(self.TNotebook1_t2)
        self.Label3betaplot.place(relx=0.01, rely=0.017, height=31, width=156)
        self.Label3betaplot.configure(activebackground="#f9f9f9")
        self.Label3betaplot.configure(activeforeground="black")
        self.Label3betaplot.configure(background="#86bad8")
        self.Label3betaplot.configure(disabledforeground="#a3a3a3")
        self.Label3betaplot.configure(font=font13)
        self.Label3betaplot.configure(foreground="#000000")
        self.Label3betaplot.configure(highlightbackground="#d9d9d9")
        self.Label3betaplot.configure(highlightcolor="black")
        self.Label3betaplot.configure(text='''Beta Plot Settings''')

        self.Label3betacont = tk.Label(self.TNotebook1_t2)
        self.Label3betacont.place(relx=0.51, rely=0.017, height=31, width=206)
        self.Label3betacont.configure(activebackground="#f9f9f9")
        self.Label3betacont.configure(activeforeground="black")
        self.Label3betacont.configure(background="#86bad8")
        self.Label3betacont.configure(disabledforeground="#a3a3a3")
        self.Label3betacont.configure(font=font13)
        self.Label3betacont.configure(foreground="#000000")
        self.Label3betacont.configure(highlightbackground="#d9d9d9")
        self.Label3betacont.configure(highlightcolor="black")
        self.Label3betacont.configure(text='''Beta Contour Settings''')

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t2)
        self.TSeparator1.place(relx=0.01, rely=0.067, relwidth=0.196)
        self.TSeparator1.configure(takefocus="0")

        self.TSeparator1 = ttk.Separator(self.TNotebook1_t2)
        self.TSeparator1.place(relx=0.52, rely=0.067, relwidth=0.196)
        self.TSeparator1.configure(takefocus="0")

#        self.Label32 = tk.Label(self.TNotebook1_t2)
#        self.Label32.place(relx=0.167, rely=0.083, height=21, width=64)
#        self.Label32.configure(activebackground="#f9f9f9")
#        self.Label32.configure(activeforeground="black")
#        self.Label32.configure(background="#86bad8")
#        self.Label32.configure(disabledforeground="#a3a3a3")
#        self.Label32.configure(foreground="#000000")
#        self.Label32.configure(highlightbackground="#d9d9d9")
#        self.Label32.configure(highlightcolor="black")
#        self.Label32.configure(text='''Marker Size''')

        self.Label31 = tk.Label(self.TNotebook1_t2)
        self.Label31.place(relx=0.02, rely=0.083, height=21, width=64)
        self.Label31.configure(activebackground="#f9f9f9")
        self.Label31.configure(activeforeground="black")
        self.Label31.configure(background="#86bad8")
        self.Label31.configure(disabledforeground="#a3a3a3")
        self.Label31.configure(foreground="#000000")
        self.Label31.configure(highlightbackground="#d9d9d9")
        self.Label31.configure(highlightcolor="black")
        self.Label31.configure(text='''Color Ramp''')

        self.Label33 = tk.Label(self.TNotebook1_t2)
        self.Label33.place(relx=0.304, rely=0.083, height=21, width=64)
        self.Label33.configure(activebackground="#f9f9f9")
        self.Label33.configure(activeforeground="black")
        self.Label33.configure(background="#86bad8")
        self.Label33.configure(disabledforeground="#a3a3a3")
        self.Label33.configure(foreground="#000000")
        self.Label33.configure(highlightbackground="#d9d9d9")
        self.Label33.configure(highlightcolor="black")
        self.Label33.configure(text='''Chart Title''')

        self.Label35 = tk.Label(self.TNotebook1_t2)
        self.Label35.place(relx=0.304, rely=0.2, height=21, width=64)
        self.Label35.configure(activebackground="#f9f9f9")
        self.Label35.configure(activeforeground="black")
        self.Label35.configure(background="#86bad8")
        self.Label35.configure(disabledforeground="#a3a3a3")
        self.Label35.configure(foreground="#000000")
        self.Label35.configure(highlightbackground="#d9d9d9")
        self.Label35.configure(highlightcolor="black")
        self.Label35.configure(text='''Y Label''')

        self.Label36 = tk.Label(self.TNotebook1_t2)
        self.Label36.place(relx=0.525, rely=0.075, height=21, width=64)
        self.Label36.configure(activebackground="#f9f9f9")
        self.Label36.configure(activeforeground="black")
        self.Label36.configure(background="#86bad8")
        self.Label36.configure(disabledforeground="#a3a3a3")
        self.Label36.configure(foreground="#000000")
        self.Label36.configure(highlightbackground="#d9d9d9")
        self.Label36.configure(highlightcolor="black")
        self.Label36.configure(text='''Color Ramp''')

        self.Label38 = tk.Label(self.TNotebook1_t2)
        self.Label38.place(relx=0.814, rely=0.075, height=21, width=64)
        self.Label38.configure(activebackground="#f9f9f9")
        self.Label38.configure(activeforeground="black")
        self.Label38.configure(background="#86bad8")
        self.Label38.configure(disabledforeground="#a3a3a3")
        self.Label38.configure(foreground="#000000")
        self.Label38.configure(highlightbackground="#d9d9d9")
        self.Label38.configure(highlightcolor="black")
        self.Label38.configure(text='''Chart Title''')

        self.Label37 = tk.Label(self.TNotebook1_t2)
        self.Label37.place(relx=0.667, rely=0.2, height=21, width=64)
        self.Label37.configure(activebackground="#f9f9f9")
        self.Label37.configure(activeforeground="black")
        self.Label37.configure(background="#86bad8")
        self.Label37.configure(disabledforeground="#a3a3a3")
        self.Label37.configure(foreground="#000000")
        self.Label37.configure(highlightbackground="#d9d9d9")
        self.Label37.configure(highlightcolor="black")
        self.Label37.configure(text='''X Label''')

        self.Label39 = tk.Label(self.TNotebook1_t2)
        self.Label39.place(relx=0.809, rely=0.2, height=21, width=64)
        self.Label39.configure(activebackground="#f9f9f9")
        self.Label39.configure(activeforeground="black")
        self.Label39.configure(background="#86bad8")
        self.Label39.configure(disabledforeground="#a3a3a3")
        self.Label39.configure(foreground="#000000")
        self.Label39.configure(highlightbackground="#d9d9d9")
        self.Label39.configure(highlightcolor="black")
        self.Label39.configure(text='''Y Label''')

        self.beta_point_plot_axis_check = tk.Checkbutton(self.TNotebook1_t2)
        self.beta_point_plot_axis_check.place(relx=0.01, rely=0.233, relheight=0.042
                , relwidth=0.083)
        self.beta_point_plot_axis_check.configure(activebackground="#ececec")
        self.beta_point_plot_axis_check.configure(activeforeground="#000000")
        self.beta_point_plot_axis_check.configure(background="#86bad8")
        self.beta_point_plot_axis_check.configure(disabledforeground="#a3a3a3")
        self.beta_point_plot_axis_check.configure(foreground="#000000")
        self.beta_point_plot_axis_check.configure(highlightbackground="#d9d9d9")
        self.beta_point_plot_axis_check.configure(highlightcolor="black")
        self.beta_point_plot_axis_check.configure(justify='left')
        self.beta_point_plot_axis_check.configure(takefocus="0")
        self.beta_point_plot_axis_check.configure(text='''Axis Labels''')
        self.beta_point_plot_axis_check.configure(variable=GUI_support.che63)

        self.mult_point_axis_check = tk.Checkbutton(self.TNotebook1_t2)
        self.mult_point_axis_check.place(relx=0.51, rely=0.225, relheight=0.042
                , relwidth=0.083)
        self.mult_point_axis_check.configure(activebackground="#ececec")
        self.mult_point_axis_check.configure(activeforeground="#000000")
        self.mult_point_axis_check.configure(background="#86bad8")
        self.mult_point_axis_check.configure(disabledforeground="#a3a3a3")
        self.mult_point_axis_check.configure(foreground="#000000")
        self.mult_point_axis_check.configure(highlightbackground="#d9d9d9")
        self.mult_point_axis_check.configure(highlightcolor="black")
        self.mult_point_axis_check.configure(justify='left')
        self.mult_point_axis_check.configure(takefocus="0")
        self.mult_point_axis_check.configure(text='''Axis Labels''')
        self.mult_point_axis_check.configure(variable=GUI_support.che64)

#        self.mult_plot_rng_scale = tk.Checkbutton(self.TNotebook1_t2)
#        self.mult_plot_rng_scale.place(relx=0.255, rely=0.233, relheight=0.042
#                , relwidth=0.089)
#        self.mult_plot_rng_scale.configure(activebackground="#ececec")
#        self.mult_plot_rng_scale.configure(activeforeground="#000000")
#        self.mult_plot_rng_scale.configure(background="#86bad8")
#        self.mult_plot_rng_scale.configure(disabledforeground="#a3a3a3")
#        self.mult_plot_rng_scale.configure(foreground="#000000")
#        self.mult_plot_rng_scale.configure(highlightbackground="#d9d9d9")
#        self.mult_plot_rng_scale.configure(highlightcolor="black")
#        self.mult_plot_rng_scale.configure(justify='left')
#        self.mult_plot_rng_scale.configure(text='''Range Scale''')
#        self.mult_plot_rng_scale.configure(variable=GUI_support.che65)
#
#        self.mult_plot_rng_scale = tk.Checkbutton(self.TNotebook1_t2)
#        self.mult_plot_rng_scale.place(relx=0.775, rely=0.225, relheight=0.042
#                , relwidth=0.089)
#        self.mult_plot_rng_scale.configure(activebackground="#ececec")
#        self.mult_plot_rng_scale.configure(activeforeground="#000000")
#        self.mult_plot_rng_scale.configure(background="#86bad8")
#        self.mult_plot_rng_scale.configure(disabledforeground="#a3a3a3")
#        self.mult_plot_rng_scale.configure(foreground="#000000")
#        self.mult_plot_rng_scale.configure(highlightbackground="#d9d9d9")
#        self.mult_plot_rng_scale.configure(highlightcolor="black")
#        self.mult_plot_rng_scale.configure(justify='left')
#        self.mult_plot_rng_scale.configure(text='''Range Scale''')
#        self.mult_plot_rng_scale.configure(variable=GUI_support.che66)

#        self.beta_plot_marker_size = tk.Entry(self.TNotebook1_t2)
#        self.beta_plot_marker_size.place(relx=0.167, rely=0.117, height=20
#                , relwidth=0.112)
#        self.beta_plot_marker_size.configure(background="white")
#        self.beta_plot_marker_size.configure(disabledforeground="#a3a3a3")
#        self.beta_plot_marker_size.configure(font=font10)
#        self.beta_plot_marker_size.configure(foreground="#000000")
#        self.beta_plot_marker_size.configure(highlightbackground="#d9d9d9")
#        self.beta_plot_marker_size.configure(highlightcolor="black")
#        self.beta_plot_marker_size.configure(insertbackground="black")
#        self.beta_plot_marker_size.configure(selectbackground="#c4c4c4")
#        self.beta_plot_marker_size.configure(selectforeground="black")
#        self.beta_plot_marker_size.configure(takefocus="0")

        self.beta_plot_title = tk.Entry(self.TNotebook1_t2)
        self.beta_plot_title.place(relx=0.304, rely=0.117, height=20
                , relwidth=0.112)
        self.beta_plot_title.configure(background="white")
        self.beta_plot_title.configure(disabledforeground="#a3a3a3")
        self.beta_plot_title.configure(font=font10)
        self.beta_plot_title.configure(foreground="#000000")
        self.beta_plot_title.configure(highlightbackground="#d9d9d9")
        self.beta_plot_title.configure(highlightcolor="black")
        self.beta_plot_title.configure(insertbackground="black")
        self.beta_plot_title.configure(selectbackground="#c4c4c4")
        self.beta_plot_title.configure(selectforeground="black")
        self.beta_plot_title.configure(takefocus="0")

        self.beta_plot_x_label = tk.Entry(self.TNotebook1_t2)
        self.beta_plot_x_label.place(relx=0.167, rely=0.238, height=20
                , relwidth=0.112)
        self.beta_plot_x_label.configure(background="white")
        self.beta_plot_x_label.configure(disabledforeground="#a3a3a3")
        self.beta_plot_x_label.configure(font=font10)
        self.beta_plot_x_label.configure(foreground="#000000")
        self.beta_plot_x_label.configure(highlightbackground="#d9d9d9")
        self.beta_plot_x_label.configure(highlightcolor="black")
        self.beta_plot_x_label.configure(insertbackground="black")
        self.beta_plot_x_label.configure(selectbackground="#c4c4c4")
        self.beta_plot_x_label.configure(selectforeground="black")
        self.beta_plot_x_label.configure(takefocus="0")

        self.beta_plot_y_label = tk.Entry(self.TNotebook1_t2)
        self.beta_plot_y_label.place(relx=0.304, rely=0.238, height=20
                , relwidth=0.112)
        self.beta_plot_y_label.configure(background="white")
        self.beta_plot_y_label.configure(disabledforeground="#a3a3a3")
        self.beta_plot_y_label.configure(font=font10)
        self.beta_plot_y_label.configure(foreground="#000000")
        self.beta_plot_y_label.configure(highlightbackground="#d9d9d9")
        self.beta_plot_y_label.configure(highlightcolor="black")
        self.beta_plot_y_label.configure(insertbackground="black")
        self.beta_plot_y_label.configure(selectbackground="#c4c4c4")
        self.beta_plot_y_label.configure(selectforeground="black")
        self.beta_plot_y_label.configure(takefocus="0")

        self.Label34 = tk.Label(self.TNotebook1_t2)
        self.Label34.place(relx=0.167, rely=0.2, height=21, width=64)
        self.Label34.configure(activebackground="#f9f9f9")
        self.Label34.configure(activeforeground="black")
        self.Label34.configure(background="#86bad8")
        self.Label34.configure(disabledforeground="#a3a3a3")
        self.Label34.configure(foreground="#000000")
        self.Label34.configure(highlightbackground="#d9d9d9")
        self.Label34.configure(highlightcolor="black")
        self.Label34.configure(text='''X Label''')

        self.Update_Plots_beta1 = tk.Button(self.TNotebook1_t2)
        self.Update_Plots_beta1.place(relx=0.054, rely=0.183, height=24
                , width=49)
        self.Update_Plots_beta1.configure(activebackground="#ececec")
        self.Update_Plots_beta1.configure(activeforeground="#000000")
        self.Update_Plots_beta1.configure(background="#ffae21")
        self.Update_Plots_beta1.configure(disabledforeground="#a3a3a3")
        self.Update_Plots_beta1.configure(foreground="#000000")
        self.Update_Plots_beta1.configure(highlightbackground="#d9d9d9")
        self.Update_Plots_beta1.configure(highlightcolor="black")
        self.Update_Plots_beta1.configure(pady="0")
        self.Update_Plots_beta1.configure(takefocus="0")
        self.Update_Plots_beta1.configure(text='''Update''')

        self.Update_Plots_beta2 = tk.Button(self.TNotebook1_t2)
        self.Update_Plots_beta2.place(relx=0.569, rely=0.167, height=24
                , width=49)
        self.Update_Plots_beta2.configure(activebackground="#ececec")
        self.Update_Plots_beta2.configure(activeforeground="#000000")
        self.Update_Plots_beta2.configure(background="#ffae21")
        self.Update_Plots_beta2.configure(disabledforeground="#a3a3a3")
        self.Update_Plots_beta2.configure(foreground="#000000")
        self.Update_Plots_beta2.configure(highlightbackground="#d9d9d9")
        self.Update_Plots_beta2.configure(highlightcolor="black")
        self.Update_Plots_beta2.configure(pady="0")
        self.Update_Plots_beta2.configure(takefocus="0")
        self.Update_Plots_beta2.configure(text='''Update''')

#        self.Export_b11 = tk.Button(self.TNotebook1_t2)
#        self.Export_b11.place(relx=0.054, rely=0.233, height=24, width=49)
#        self.Export_b11.configure(activebackground="#ececec")
#        self.Export_b11.configure(activeforeground="#000000")
#        self.Export_b11.configure(background="#ffae21")
#        self.Export_b11.configure(disabledforeground="#a3a3a3")
#        self.Export_b11.configure(foreground="#000000")
#        self.Export_b11.configure(highlightbackground="#d9d9d9")
#        self.Export_b11.configure(highlightcolor="black")
#        self.Export_b11.configure(pady="0")
#        self.Export_b11.configure(takefocus="0")
#        self.Export_b11.configure(text='''Export''')

#        self.Export_b2 = tk.Button(self.TNotebook1_t2)
#        self.Export_b2.place(relx=0.569, rely=0.217, height=24, width=49)
#        self.Export_b2.configure(activebackground="#ececec")
#        self.Export_b2.configure(activeforeground="#000000")
#        self.Export_b2.configure(background="#ffae21")
#        self.Export_b2.configure(disabledforeground="#a3a3a3")
#        self.Export_b2.configure(foreground="#000000")
#        self.Export_b2.configure(highlightbackground="#d9d9d9")
#        self.Export_b2.configure(highlightcolor="black")
#        self.Export_b2.configure(pady="0")
#        self.Export_b2.configure(takefocus="0")
#        self.Export_b2.configure(text='''Export''')

        self.user_beta_point_cmap=StringVar(self.TNotebook1_t2, value='gnuplot2')
        self.user_beta_point_cmap.trace('w',self.beta_point_cmap)        
        self.beta_point_cmap = ttk.Combobox(self.TNotebook1_t2, textvariable=self.user_beta_point_cmap,values=self.cmaps)
        self.beta_point_cmap.place(relx=0.01, rely=0.117, relheight=0.035
                , relwidth=0.111)
        
        
        #This is the dropdown menu for multinomial point plot cmap
        self.user_mult_point_cmap=StringVar(self.TNotebook1_t2, value='gnuplot2')
        self.user_mult_point_cmap.trace('w',self.mult_point_cmap)        
        self.mult_point_cmap = ttk.Combobox(self.TNotebook1_t2, textvariable=self.user_mult_point_cmap,values=self.cmaps)
        self.mult_point_cmap.place(relx=0.52, rely=0.117, relheight=0.035
                , relwidth=0.101)
        
        self.beta_cont_title = tk.Entry(self.TNotebook1_t2)
        self.beta_cont_title.place(relx=0.809, rely=0.117, height=20
                , relwidth=0.112)
        self.beta_cont_title.configure(background="white")
        self.beta_cont_title.configure(disabledforeground="#a3a3a3")
        self.beta_cont_title.configure(font=font10)
        self.beta_cont_title.configure(foreground="#000000")
        self.beta_cont_title.configure(highlightbackground="#d9d9d9")
        self.beta_cont_title.configure(highlightcolor="black")
        self.beta_cont_title.configure(insertbackground="black")
        self.beta_cont_title.configure(selectbackground="#c4c4c4")
        self.beta_cont_title.configure(selectforeground="black")
        self.beta_cont_title.configure(takefocus="0")

        self.beta_cont_x_label = tk.Entry(self.TNotebook1_t2)
        self.beta_cont_x_label.place(relx=0.657, rely=0.233, height=20
                , relwidth=0.112)
        self.beta_cont_x_label.configure(background="white")
        self.beta_cont_x_label.configure(disabledforeground="#a3a3a3")
        self.beta_cont_x_label.configure(font=font10)
        self.beta_cont_x_label.configure(foreground="#000000")
        self.beta_cont_x_label.configure(highlightbackground="#d9d9d9")
        self.beta_cont_x_label.configure(highlightcolor="black")
        self.beta_cont_x_label.configure(insertbackground="black")
        self.beta_cont_x_label.configure(selectbackground="#c4c4c4")
        self.beta_cont_x_label.configure(selectforeground="black")
        self.beta_cont_x_label.configure(takefocus="0")

        self.beta_cont_y_label = tk.Entry(self.TNotebook1_t2)
        self.beta_cont_y_label.place(relx=0.809, rely=0.233, height=20
                , relwidth=0.112)
        self.beta_cont_y_label.configure(background="white")
        self.beta_cont_y_label.configure(disabledforeground="#a3a3a3")
        self.beta_cont_y_label.configure(font=font10)
        self.beta_cont_y_label.configure(foreground="#000000")
        self.beta_cont_y_label.configure(highlightbackground="#d9d9d9")
        self.beta_cont_y_label.configure(highlightcolor="black")
        self.beta_cont_y_label.configure(insertbackground="black")
        self.beta_cont_y_label.configure(selectbackground="#c4c4c4")
        self.beta_cont_y_label.configure(selectforeground="black")
        self.beta_cont_y_label.configure(takefocus="0")

        self.FractureDensityCanvas = tk.Canvas(self.TNotebook1_t3)
        self.FractureDensityCanvas.place(relx=0.01, rely=0.058, relheight=0.542
                , relwidth=0.319)
        self.FractureDensityCanvas.configure(background="#d9d9d9")
        self.FractureDensityCanvas.configure(borderwidth="2")
        self.FractureDensityCanvas.configure(highlightbackground="#d9d9d9")
        self.FractureDensityCanvas.configure(highlightcolor="black")
        self.FractureDensityCanvas.configure(insertbackground="black")
        self.FractureDensityCanvas.configure(relief='ridge')
        self.FractureDensityCanvas.configure(selectbackground="#c4c4c4")
        self.FractureDensityCanvas.configure(selectforeground="black")
        self.FractureDensityCanvas.configure(takefocus="0")
        self.FractureDensityCanvas.configure(width=423)

        self.LogFracDensityCanvas = tk.Canvas(self.TNotebook1_t3)
        self.LogFracDensityCanvas.place(relx=0.353, rely=0.058, relheight=0.542
                , relwidth=0.319)
        self.LogFracDensityCanvas.configure(background="#d9d9d9")
        self.LogFracDensityCanvas.configure(borderwidth="2")
        self.LogFracDensityCanvas.configure(highlightbackground="#d9d9d9")
        self.LogFracDensityCanvas.configure(highlightcolor="black")
        self.LogFracDensityCanvas.configure(insertbackground="black")
        self.LogFracDensityCanvas.configure(relief='ridge')
        self.LogFracDensityCanvas.configure(selectbackground="#c4c4c4")
        self.LogFracDensityCanvas.configure(selectforeground="black")
        self.LogFracDensityCanvas.configure(takefocus="0")
        self.LogFracDensityCanvas.configure(width=423)

        self.UniformStrikeBeta = tk.Canvas(self.TNotebook1_t3)
        self.UniformStrikeBeta.place(relx=0.706, rely=0.542, relheight=0.458
                , relwidth=0.27)
        self.UniformStrikeBeta.configure(background="#d9d9d9")
        self.UniformStrikeBeta.configure(borderwidth="2")
        self.UniformStrikeBeta.configure(highlightbackground="#d9d9d9")
        self.UniformStrikeBeta.configure(highlightcolor="black")
        self.UniformStrikeBeta.configure(insertbackground="black")
        self.UniformStrikeBeta.configure(relief='ridge')
        self.UniformStrikeBeta.configure(selectbackground="#c4c4c4")
        self.UniformStrikeBeta.configure(selectforeground="black")
        self.UniformStrikeBeta.configure(takefocus="0")
        self.UniformStrikeBeta.configure(width=325)

        self.Label4_1 = tk.Label(self.TNotebook1_t3)
        self.Label4_1.place(relx=0.01, rely=0.017, height=21, width=91)
        self.Label4_1.configure(activebackground="#f9f9f9")
        self.Label4_1.configure(activeforeground="black")
        self.Label4_1.configure(background="#86bad8")
        self.Label4_1.configure(disabledforeground="#a3a3a3")
        self.Label4_1.configure(foreground="#000000")
        self.Label4_1.configure(highlightbackground="#d9d9d9")
        self.Label4_1.configure(highlightcolor="black")
        self.Label4_1.configure(text='''Fracture Density''')

        self.Label4_2 = tk.Label(self.TNotebook1_t3)
        self.Label4_2.place(relx=0.358, rely=0.017, height=21, width=111)
        self.Label4_2.configure(activebackground="#f9f9f9")
        self.Label4_2.configure(activeforeground="black")
        self.Label4_2.configure(background="#86bad8")
        self.Label4_2.configure(cursor="fleur")
        self.Label4_2.configure(disabledforeground="#a3a3a3")
        self.Label4_2.configure(foreground="#000000")
        self.Label4_2.configure(highlightbackground="#d9d9d9")
        self.Label4_2.configure(highlightcolor="black")
        self.Label4_2.configure(text='''Log Fracture Density''')

        self.Label4_3 = tk.Label(self.TNotebook1_t3)
        self.Label4_3.place(relx=0.701, rely=0.0, height=21, width=151)
        self.Label4_3.configure(activebackground="#f9f9f9")
        self.Label4_3.configure(activeforeground="black")
        self.Label4_3.configure(background="#86bad8")
        self.Label4_3.configure(disabledforeground="#a3a3a3")
        self.Label4_3.configure(foreground="#000000")
        self.Label4_3.configure(highlightbackground="#d9d9d9")
        self.Label4_3.configure(highlightcolor="black")
        self.Label4_3.configure(text='''Uniform Strike Multinomial''')

        self.UniformReroll = tk.Button(self.TNotebook1_t3, command=self.reroll_random)
        self.UniformReroll.place(relx=0.858, rely=0.0, height=24, width=115)
        self.UniformReroll.configure(activebackground="#ececec")
        self.UniformReroll.configure(activeforeground="#000000")
        self.UniformReroll.configure(background="#ffae21")
        self.UniformReroll.configure(disabledforeground="#a3a3a3")
        self.UniformReroll.configure(foreground="#000000")
        self.UniformReroll.configure(highlightbackground="#d9d9d9")
        self.UniformReroll.configure(highlightcolor="black")
        self.UniformReroll.configure(pady="0")
        self.UniformReroll.configure(text='''Reroll Uniform Data''')

        self.UniformStrikeMultinomial = tk.Canvas(self.TNotebook1_t3)
        self.UniformStrikeMultinomial.place(relx=0.706, rely=0.042
                , relheight=0.458, relwidth=0.27)
        self.UniformStrikeMultinomial.configure(background="#d9d9d9")
        self.UniformStrikeMultinomial.configure(borderwidth="2")
        self.UniformStrikeMultinomial.configure(highlightbackground="#d9d9d9")
        self.UniformStrikeMultinomial.configure(highlightcolor="black")
        self.UniformStrikeMultinomial.configure(insertbackground="black")
        self.UniformStrikeMultinomial.configure(relief='ridge')
        self.UniformStrikeMultinomial.configure(selectbackground="#c4c4c4")
        self.UniformStrikeMultinomial.configure(selectforeground="black")
        self.UniformStrikeMultinomial.configure(takefocus="0")
        self.UniformStrikeMultinomial.configure(width=325)

        self.Label4_6 = tk.Label(self.TNotebook1_t3)
        self.Label4_6.place(relx=0.701, rely=0.5, height=21, width=121)
        self.Label4_6.configure(activebackground="#f9f9f9")
        self.Label4_6.configure(activeforeground="black")
        self.Label4_6.configure(background="#86bad8")
        self.Label4_6.configure(disabledforeground="#a3a3a3")
        self.Label4_6.configure(foreground="#000000")
        self.Label4_6.configure(highlightbackground="#d9d9d9")
        self.Label4_6.configure(highlightcolor="black")
        self.Label4_6.configure(text='''Uniform Strike Beta''')
        self.Label4_6.configure(width=121)

        self.FracDenseMultCanvas = tk.Canvas(self.TNotebook1_t3)
        self.FracDenseMultCanvas.place(relx=0.01, rely=0.667, relheight=0.32
                , relwidth=0.196)
        self.FracDenseMultCanvas.configure(background="#d9d9d9")
        self.FracDenseMultCanvas.configure(borderwidth="2")
        self.FracDenseMultCanvas.configure(highlightbackground="#d9d9d9")
        self.FracDenseMultCanvas.configure(highlightcolor="black")
        self.FracDenseMultCanvas.configure(insertbackground="black")
        self.FracDenseMultCanvas.configure(relief='ridge')
        self.FracDenseMultCanvas.configure(selectbackground="#c4c4c4")
        self.FracDenseMultCanvas.configure(selectforeground="black")
#        self.FracDenseMultCanvas.configure(width=323)

        self.FracBetaCanvas = tk.Canvas(self.TNotebook1_t3)
        self.FracBetaCanvas.place(relx=0.25, rely=0.667, relheight=0.322
                , relwidth=0.2)
        self.FracBetaCanvas.configure(background="#d9d9d9")
        self.FracBetaCanvas.configure(borderwidth="2")
        self.FracBetaCanvas.configure(highlightbackground="#d9d9d9")
        self.FracBetaCanvas.configure(highlightcolor="black")
        self.FracBetaCanvas.configure(insertbackground="black")
        self.FracBetaCanvas.configure(relief='ridge')
        self.FracBetaCanvas.configure(selectbackground="#c4c4c4")
        self.FracBetaCanvas.configure(selectforeground="black")
        
        
        self.Label64_5 = tk.Label(self.TNotebook1_t3)
        self.Label64_5.place(relx=0.25, rely=0.625, height=21, width=200)
        self.Label64_5.configure(activebackground="#f9f9f9")
        self.Label64_5.configure(activeforeground="black")
        self.Label64_5.configure(background="#86bad8")
        self.Label64_5.configure(disabledforeground="#a3a3a3")
        self.Label64_5.configure(foreground="#000000")
        self.Label64_5.configure(highlightbackground="#d9d9d9")
        self.Label64_5.configure(highlightcolor="black")
        self.Label64_5.configure(text='''Fracture Density Vs Beta''')
#        self.FracBetaCanvas.configure(width=323)

#        self.FracDensityExport = tk.Button(self.TNotebook1_t3)
#        self.FracDensityExport.place(relx=0.279, rely=0.017, height=24, width=44)

#        self.FracDensityExport.configure(activebackground="#ececec")
#        self.FracDensityExport.configure(activeforeground="#000000")
#        self.FracDensityExport.configure(background="#ffae21")
#        self.FracDensityExport.configure(disabledforeground="#a3a3a3")
#        self.FracDensityExport.configure(foreground="#000000")
#        self.FracDensityExport.configure(highlightbackground="#d9d9d9")
#        self.FracDensityExport.configure(highlightcolor="black")
#        self.FracDensityExport.configure(pady="0")
#        self.FracDensityExport.configure(text='''Export''')

#        self.LogFracDensityExport = tk.Button(self.TNotebook1_t3)
#        self.LogFracDensityExport.place(relx=0.623, rely=0.017, height=24
#                , width=44)
#        self.LogFracDensityExport.configure(activebackground="#ececec")
#        self.LogFracDensityExport.configure(activeforeground="#000000")
#        self.LogFracDensityExport.configure(background="#ffae21")
#        self.LogFracDensityExport.configure(disabledforeground="#a3a3a3")
#        self.LogFracDensityExport.configure(foreground="#000000")
#        self.LogFracDensityExport.configure(highlightbackground="#d9d9d9")
#        self.LogFracDensityExport.configure(highlightcolor="black")
#        self.LogFracDensityExport.configure(pady="0")
#        self.LogFracDensityExport.configure(text='''Export''')

#        self.UniformExport = tk.Button(self.TNotebook1_t3)
#        self.UniformExport.place(relx=0.926, rely=0.5, height=24, width=44)
#        self.UniformExport.configure(activebackground="#ececec")
#        self.UniformExport.configure(activeforeground="#000000")
#        self.UniformExport.configure(background="#ffae21")
#        self.UniformExport.configure(disabledforeground="#a3a3a3")
#        self.UniformExport.configure(foreground="#000000")
#        self.UniformExport.configure(highlightbackground="#d9d9d9")
#        self.UniformExport.configure(highlightcolor="black")
#        self.UniformExport.configure(pady="0")
#        self.UniformExport.configure(text='''Export''')

#        self.LogFracDensityExport = tk.Button(self.TNotebook1_t3)
#        self.LogFracDensityExport.place(relx=0.157, rely=0.617, height=24
#                , width=44)
#        self.LogFracDensityExport.configure(activebackground="#ececec")
#        self.LogFracDensityExport.configure(activeforeground="#000000")
#        self.LogFracDensityExport.configure(background="#ffae21")
#        self.LogFracDensityExport.configure(disabledforeground="#a3a3a3")
#        self.LogFracDensityExport.configure(foreground="#000000")
#        self.LogFracDensityExport.configure(highlightbackground="#d9d9d9")
#        self.LogFracDensityExport.configure(highlightcolor="black")
#        self.LogFracDensityExport.configure(pady="0")
#        self.LogFracDensityExport.configure(text='''Export''')

#        self.LogFracDensityExport = tk.Button(self.TNotebook1_t3)
#        self.LogFracDensityExport.place(relx=0.623, rely=0.625, height=24
#                , width=44)
#        self.LogFracDensityExport.configure(activebackground="#ececec")
#        self.LogFracDensityExport.configure(activeforeground="#000000")
#        self.LogFracDensityExport.configure(background="#ffae21")
#        self.LogFracDensityExport.configure(disabledforeground="#a3a3a3")
#        self.LogFracDensityExport.configure(foreground="#000000")
#        self.LogFracDensityExport.configure(highlightbackground="#d9d9d9")
#        self.LogFracDensityExport.configure(highlightcolor="black")
#        self.LogFracDensityExport.configure(pady="0")
#        self.LogFracDensityExport.configure(text='''Export''')

        self.Label4_4 = tk.Label(self.TNotebook1_t3, anchor='w')
        self.Label4_4.place(relx=0.01, rely=0.625, height=21, width=200)
        self.Label4_4.configure(activebackground="#f9f9f9")
        self.Label4_4.configure(activeforeground="black")
        self.Label4_4.configure(background="#86bad8")
        self.Label4_4.configure(disabledforeground="#a3a3a3")
        self.Label4_4.configure(foreground="#000000")
        self.Label4_4.configure(highlightbackground="#d9d9d9")
        self.Label4_4.configure(highlightcolor="black")
        self.Label4_4.configure(text='''Fracture Density vs Multinomial''')


        
        self.CorrToolbarFrame = tk.Frame(self.TNotebook1_t4)
        self.HistToolbarFrame = tk.Frame(self.TNotebook1_t4)
        
        self.CorrelationCanvas = tk.Canvas(self.TNotebook1_t4)
        self.CorrelationCanvas.place(relx=0.029, rely=0.18, relheight=0.75
                , relwidth=0.441)
        self.CorrelationCanvas.configure(background="#d9d9d9")
        self.CorrelationCanvas.configure(borderwidth="2")
        self.CorrelationCanvas.configure(highlightbackground="#d9d9d9")
        self.CorrelationCanvas.configure(highlightcolor="black")
        self.CorrelationCanvas.configure(insertbackground="black")
        self.CorrelationCanvas.configure(relief='ridge')
        self.CorrelationCanvas.configure(selectbackground="#c4c4c4")
        self.CorrelationCanvas.configure(selectforeground="black")
        self.CorrelationCanvas.configure(width=125)

        self.HistogramCanvas = tk.Canvas(self.TNotebook1_t4)
        self.HistogramCanvas.place(relx=0.529, rely=0.18, relheight=0.75
                , relwidth=0.441)
        self.HistogramCanvas.configure(background="#d9d9d9")
        self.HistogramCanvas.configure(borderwidth="2")
        self.HistogramCanvas.configure(highlightbackground="#d9d9d9")
        self.HistogramCanvas.configure(highlightcolor="black")
        self.HistogramCanvas.configure(insertbackground="black")
        self.HistogramCanvas.configure(relief='ridge')
        self.HistogramCanvas.configure(selectbackground="#c4c4c4")
        self.HistogramCanvas.configure(selectforeground="black")
        self.HistogramCanvas.configure(width=125)

        self.Label5_1 = tk.Label(self.TNotebook1_t4, anchor='w')
        self.Label5_1.place(relx=0.025, rely=0.04, height=21, width=350)
        self.Label5_1.configure(activebackground="#f9f9f9")
        self.Label5_1.configure(activeforeground="black")
        self.Label5_1.configure(background="#86bad8")
        self.Label5_1.configure(disabledforeground="#a3a3a3")
        self.Label5_1.configure(foreground="#000000")
        self.Label5_1.configure(highlightbackground="#d9d9d9")
        self.Label5_1.configure(highlightcolor="black")
        self.Label5_1.configure(text='''Correlation of Beta and Multinomial''')
        self.Label5_1.configure(font=font17)
        
        self.PearsonLabel = tk.Label(self.TNotebook1_t4,justify='left', anchor="w")
        self.PearsonLabel.place(relx=0.025, rely=0.08, height=21, width=350)
        self.PearsonLabel.configure(activebackground="#f9f9f9")
        self.PearsonLabel.configure(activeforeground="black")
        self.PearsonLabel.configure(background="#86bad8")
        self.PearsonLabel.configure(disabledforeground="#a3a3a3")
        self.PearsonLabel.configure(foreground="#000000")
        self.PearsonLabel.configure(highlightbackground="#d9d9d9")
        self.PearsonLabel.configure(highlightcolor="black")
        self.PearsonLabel.configure(text='''Pearson Correlation (Beta vs Multinomial):''')

        self.SpearmanLabel = tk.Label(self.TNotebook1_t4,justify='left', anchor="w")
        self.SpearmanLabel.place(relx=0.025, rely=0.12, height=21, width=350)
        self.SpearmanLabel.configure(activebackground="#f9f9f9")
        self.SpearmanLabel.configure(activeforeground="black")
        self.SpearmanLabel.configure(background="#86bad8")
        self.SpearmanLabel.configure(disabledforeground="#a3a3a3")
        self.SpearmanLabel.configure(foreground="#000000")
        self.SpearmanLabel.configure(highlightbackground="#d9d9d9")
        self.SpearmanLabel.configure(highlightcolor="black")
        self.SpearmanLabel.configure(text='''Spearman Correlation (Beta vs Multinomial):''')


        self.HistogramLabel = tk.Label(self.TNotebook1_t4,anchor='w')
        self.HistogramLabel.place(relx=0.529, rely=0.12, height=21, width=350)
        self.HistogramLabel.configure(activebackground="#f9f9f9")
        self.HistogramLabel.configure(activeforeground="black")
        self.HistogramLabel.configure(background="#86bad8")
        self.HistogramLabel.configure(disabledforeground="#a3a3a3")
        self.HistogramLabel.configure(foreground="#000000")
        self.HistogramLabel.configure(highlightbackground="#d9d9d9")
        self.HistogramLabel.configure(highlightcolor="black")
        self.HistogramLabel.configure(text='''Histogram of Sample vs Uniform''')
        self.HistogramLabel.configure(font=font17)
        self.HistogramLabel.configure(width=186)

#        self.CorrelationExport = tk.Button(self.TNotebook1_t4)
#        self.CorrelationExport.place(relx=0.422, rely=0.167, height=24, width=44)
#        self.CorrelationExport.configure(activebackground="#ececec")
#        self.CorrelationExport.configure(activeforeground="#000000")
#        self.CorrelationExport.configure(background="#ffae21")
#        self.CorrelationExport.configure(disabledforeground="#a3a3a3")
#        self.CorrelationExport.configure(foreground="#000000")
#        self.CorrelationExport.configure(highlightbackground="#d9d9d9")
#        self.CorrelationExport.configure(highlightcolor="black")
#        self.CorrelationExport.configure(pady="0")
#        self.CorrelationExport.configure(text='''Export''')

#        self.HistogramExport = tk.Button(self.TNotebook1_t4)
#        self.HistogramExport.place(relx=0.922, rely=0.167, height=24, width=44)
#        self.HistogramExport.configure(activebackground="#ececec")
#        self.HistogramExport.configure(activeforeground="#000000")
#        self.HistogramExport.configure(background="#ffae21")
#        self.HistogramExport.configure(disabledforeground="#a3a3a3")
#        self.HistogramExport.configure(foreground="#000000")
#        self.HistogramExport.configure(highlightbackground="#d9d9d9")
#        self.HistogramExport.configure(highlightcolor="black")
#        self.HistogramExport.configure(pady="0")
#        self.HistogramExport.configure(text='''Export''')

        self.Label6_1 = tk.Label(self.TNotebook1_t5)
        self.Label6_1.place(relx=0.01, rely=0.033, height=21, width=272)
        self.Label6_1.configure(activebackground="#f9f9f9")
        self.Label6_1.configure(activeforeground="black")
        self.Label6_1.configure(background="#d9d9d9")
        self.Label6_1.configure(disabledforeground="#a3a3a3")
        self.Label6_1.configure(foreground="#000000")
        self.Label6_1.configure(highlightbackground="#d9d9d9")
        self.Label6_1.configure(highlightcolor="black")
        self.Label6_1.configure(text='''Don't Need Any Settings for Now...But Just in Case''')

        self.LabelSetting1 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting1.place(relx=0.01, rely=0.1, height=21, width=34)
        self.LabelSetting1.configure(activebackground="#f9f9f9")
        self.LabelSetting1.configure(activeforeground="black")
        self.LabelSetting1.configure(background="#d9d9d9")
        self.LabelSetting1.configure(disabledforeground="#a3a3a3")
        self.LabelSetting1.configure(foreground="#000000")
        self.LabelSetting1.configure(highlightbackground="#d9d9d9")
        self.LabelSetting1.configure(highlightcolor="black")
        self.LabelSetting1.configure(text='''Label''')

        self.LabelSetting2 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting2.place(relx=0.01, rely=0.15, height=21, width=34)
        self.LabelSetting2.configure(activebackground="#f9f9f9")
        self.LabelSetting2.configure(activeforeground="black")
        self.LabelSetting2.configure(background="#d9d9d9")
        self.LabelSetting2.configure(disabledforeground="#a3a3a3")
        self.LabelSetting2.configure(foreground="#000000")
        self.LabelSetting2.configure(highlightbackground="#d9d9d9")
        self.LabelSetting2.configure(highlightcolor="black")
        self.LabelSetting2.configure(text='''Label''')

        self.LabelSetting3 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting3.place(relx=0.01, rely=0.2, height=21, width=34)
        self.LabelSetting3.configure(activebackground="#f9f9f9")
        self.LabelSetting3.configure(activeforeground="black")
        self.LabelSetting3.configure(background="#d9d9d9")
        self.LabelSetting3.configure(disabledforeground="#a3a3a3")
        self.LabelSetting3.configure(foreground="#000000")
        self.LabelSetting3.configure(highlightbackground="#d9d9d9")
        self.LabelSetting3.configure(highlightcolor="black")
        self.LabelSetting3.configure(text='''Label''')

        self.Label12 = tk.Label(self.TNotebook1_t5)
        self.Label12.place(relx=0.01, rely=0.25, height=21, width=34)
        self.Label12.configure(activebackground="#f9f9f9")
        self.Label12.configure(activeforeground="black")
        self.Label12.configure(background="#d9d9d9")
        self.Label12.configure(disabledforeground="#a3a3a3")
        self.Label12.configure(foreground="#000000")
        self.Label12.configure(highlightbackground="#d9d9d9")
        self.Label12.configure(highlightcolor="black")
        self.Label12.configure(text='''Label''')

        self.LabelSetting5 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting5.place(relx=0.01, rely=0.3, height=21, width=34)
        self.LabelSetting5.configure(activebackground="#f9f9f9")
        self.LabelSetting5.configure(activeforeground="black")
        self.LabelSetting5.configure(background="#d9d9d9")
        self.LabelSetting5.configure(disabledforeground="#a3a3a3")
        self.LabelSetting5.configure(foreground="#000000")
        self.LabelSetting5.configure(highlightbackground="#d9d9d9")
        self.LabelSetting5.configure(highlightcolor="black")
        self.LabelSetting5.configure(text='''Label''')

        self.LabelSetting7 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting7.place(relx=0.01, rely=0.35, height=21, width=34)
        self.LabelSetting7.configure(activebackground="#f9f9f9")
        self.LabelSetting7.configure(activeforeground="black")
        self.LabelSetting7.configure(background="#d9d9d9")
        self.LabelSetting7.configure(disabledforeground="#a3a3a3")
        self.LabelSetting7.configure(foreground="#000000")
        self.LabelSetting7.configure(highlightbackground="#d9d9d9")
        self.LabelSetting7.configure(highlightcolor="black")
        self.LabelSetting7.configure(text='''Label''')

        self.LabelSetting8_ = tk.Label(self.TNotebook1_t5)
        self.LabelSetting8_.place(relx=0.01, rely=0.45, height=21, width=34)
        self.LabelSetting8_.configure(activebackground="#f9f9f9")
        self.LabelSetting8_.configure(activeforeground="black")
        self.LabelSetting8_.configure(background="#d9d9d9")
        self.LabelSetting8_.configure(disabledforeground="#a3a3a3")
        self.LabelSetting8_.configure(foreground="#000000")
        self.LabelSetting8_.configure(highlightbackground="#d9d9d9")
        self.LabelSetting8_.configure(highlightcolor="black")
        self.LabelSetting8_.configure(text='''Label''')

        self.EntrySetting1 = tk.Entry(self.TNotebook1_t5)
        self.EntrySetting1.place(relx=0.118, rely=0.1, height=20, relwidth=0.161)

        self.EntrySetting1.configure(background="white")
        self.EntrySetting1.configure(disabledforeground="#a3a3a3")
        self.EntrySetting1.configure(font=font10)
        self.EntrySetting1.configure(foreground="#000000")
        self.EntrySetting1.configure(highlightbackground="#d9d9d9")
        self.EntrySetting1.configure(highlightcolor="black")
        self.EntrySetting1.configure(insertbackground="black")
        self.EntrySetting1.configure(selectbackground="#c4c4c4")
        self.EntrySetting1.configure(selectforeground="black")

        self.EntrySetting2 = tk.Entry(self.TNotebook1_t5)
        self.EntrySetting2.place(relx=0.118, rely=0.15, height=20
                , relwidth=0.161)
        self.EntrySetting2.configure(background="white")
        self.EntrySetting2.configure(disabledforeground="#a3a3a3")
        self.EntrySetting2.configure(font=font10)
        self.EntrySetting2.configure(foreground="#000000")
        self.EntrySetting2.configure(highlightbackground="#d9d9d9")
        self.EntrySetting2.configure(highlightcolor="black")
        self.EntrySetting2.configure(insertbackground="black")
        self.EntrySetting2.configure(selectbackground="#c4c4c4")
        self.EntrySetting2.configure(selectforeground="black")

        self.EntrySetting3 = tk.Entry(self.TNotebook1_t5)
        self.EntrySetting3.place(relx=0.118, rely=0.2, height=20, relwidth=0.161)

        self.EntrySetting3.configure(background="white")
        self.EntrySetting3.configure(disabledforeground="#a3a3a3")
        self.EntrySetting3.configure(font=font10)
        self.EntrySetting3.configure(foreground="#000000")
        self.EntrySetting3.configure(highlightbackground="#d9d9d9")
        self.EntrySetting3.configure(highlightcolor="black")
        self.EntrySetting3.configure(insertbackground="black")
        self.EntrySetting3.configure(selectbackground="#c4c4c4")
        self.EntrySetting3.configure(selectforeground="black")

        self.EntrySetting4 = tk.Entry(self.TNotebook1_t5)
        self.EntrySetting4.place(relx=0.118, rely=0.25, height=20
                , relwidth=0.161)
        self.EntrySetting4.configure(background="white")
        self.EntrySetting4.configure(disabledforeground="#a3a3a3")
        self.EntrySetting4.configure(font=font10)
        self.EntrySetting4.configure(foreground="#000000")
        self.EntrySetting4.configure(highlightbackground="#d9d9d9")
        self.EntrySetting4.configure(highlightcolor="black")
        self.EntrySetting4.configure(insertbackground="black")
        self.EntrySetting4.configure(selectbackground="#c4c4c4")
        self.EntrySetting4.configure(selectforeground="black")

        self.TComboboxSetting5 = ttk.Combobox(self.TNotebook1_t5)
        self.TComboboxSetting5.place(relx=0.118, rely=0.3, relheight=0.035
                , relwidth=0.14)
        self.TComboboxSetting5.configure(takefocus="")

        self.TComboboxSetting6 = ttk.Combobox(self.TNotebook1_t5)
        self.TComboboxSetting6.place(relx=0.118, rely=0.35, relheight=0.035
                , relwidth=0.14)
        self.TComboboxSetting6.configure(takefocus="")

        self.TCombobox3 = ttk.Combobox(self.TNotebook1_t5)
        self.TCombobox3.place(relx=0.118, rely=0.4, relheight=0.035
                , relwidth=0.14)
        self.TCombobox3.configure(takefocus="")

        self.TComboboxSetting8 = ttk.Combobox(self.TNotebook1_t5)
        self.TComboboxSetting8.place(relx=0.118, rely=0.45, relheight=0.035
                , relwidth=0.14)
        self.TComboboxSetting8.configure(takefocus="")

        self.SettingCheck1 = tk.Checkbutton(self.TNotebook1_t5)
        self.SettingCheck1.place(relx=0.01, rely=0.517, relheight=0.042
                , relwidth=0.06)
        self.SettingCheck1.configure(activebackground="#ececec")
        self.SettingCheck1.configure(activeforeground="#000000")
        self.SettingCheck1.configure(background="#d9d9d9")
        self.SettingCheck1.configure(disabledforeground="#a3a3a3")
        self.SettingCheck1.configure(foreground="#000000")
        self.SettingCheck1.configure(highlightbackground="#d9d9d9")
        self.SettingCheck1.configure(highlightcolor="black")
        self.SettingCheck1.configure(justify='left')
        self.SettingCheck1.configure(text='''Check''')
        self.SettingCheck1.configure(variable=GUI_support.che103)

        self.SettingCheck2 = tk.Checkbutton(self.TNotebook1_t5)
        self.SettingCheck2.place(relx=0.01, rely=0.567, relheight=0.042
                , relwidth=0.06)
        self.SettingCheck2.configure(activebackground="#ececec")
        self.SettingCheck2.configure(activeforeground="#000000")
        self.SettingCheck2.configure(background="#d9d9d9")
        self.SettingCheck2.configure(disabledforeground="#a3a3a3")
        self.SettingCheck2.configure(foreground="#000000")
        self.SettingCheck2.configure(highlightbackground="#d9d9d9")
        self.SettingCheck2.configure(highlightcolor="black")
        self.SettingCheck2.configure(justify='left')
        self.SettingCheck2.configure(text='''Check''')
        self.SettingCheck2.configure(variable=GUI_support.che104)

        self.SettingCheck3 = tk.Checkbutton(self.TNotebook1_t5)
        self.SettingCheck3.place(relx=0.01, rely=0.617, relheight=0.042
                , relwidth=0.06)
        self.SettingCheck3.configure(activebackground="#ececec")
        self.SettingCheck3.configure(activeforeground="#000000")
        self.SettingCheck3.configure(background="#d9d9d9")
        self.SettingCheck3.configure(disabledforeground="#a3a3a3")
        self.SettingCheck3.configure(foreground="#000000")
        self.SettingCheck3.configure(highlightbackground="#d9d9d9")
        self.SettingCheck3.configure(highlightcolor="black")
        self.SettingCheck3.configure(justify='left')
        self.SettingCheck3.configure(text='''Check''')
        self.SettingCheck3.configure(variable=GUI_support.che105)

        self.SettingCheck4 = tk.Checkbutton(self.TNotebook1_t5)
        self.SettingCheck4.place(relx=0.01, rely=0.667, relheight=0.042
                , relwidth=0.06)
        self.SettingCheck4.configure(activebackground="#ececec")
        self.SettingCheck4.configure(activeforeground="#000000")
        self.SettingCheck4.configure(background="#d9d9d9")
        self.SettingCheck4.configure(disabledforeground="#a3a3a3")
        self.SettingCheck4.configure(foreground="#000000")
        self.SettingCheck4.configure(highlightbackground="#d9d9d9")
        self.SettingCheck4.configure(highlightcolor="black")
        self.SettingCheck4.configure(justify='left')
        self.SettingCheck4.configure(text='''Check''')
        self.SettingCheck4.configure(variable=GUI_support.che107)

        self.Radiobutton1 = tk.Radiobutton(self.TNotebook1_t5)
        self.Radiobutton1.place(relx=0.52, rely=0.15, relheight=0.042
                , relwidth=0.057)
        self.Radiobutton1.configure(activebackground="#ececec")
        self.Radiobutton1.configure(activeforeground="#000000")
        self.Radiobutton1.configure(background="#d9d9d9")
        self.Radiobutton1.configure(disabledforeground="#a3a3a3")
        self.Radiobutton1.configure(foreground="#000000")
        self.Radiobutton1.configure(highlightbackground="#d9d9d9")
        self.Radiobutton1.configure(highlightcolor="black")
        self.Radiobutton1.configure(justify='left')
        self.Radiobutton1.configure(text='''Radio''')

        self.Radiobutton2 = tk.Radiobutton(self.TNotebook1_t5)
        self.Radiobutton2.place(relx=0.52, rely=0.2, relheight=0.042
                , relwidth=0.057)
        self.Radiobutton2.configure(activebackground="#ececec")
        self.Radiobutton2.configure(activeforeground="#000000")
        self.Radiobutton2.configure(background="#d9d9d9")
        self.Radiobutton2.configure(disabledforeground="#a3a3a3")
        self.Radiobutton2.configure(foreground="#000000")
        self.Radiobutton2.configure(highlightbackground="#d9d9d9")
        self.Radiobutton2.configure(highlightcolor="black")
        self.Radiobutton2.configure(justify='left')
        self.Radiobutton2.configure(text='''Radio''')

        self.Radiobutton3 = tk.Radiobutton(self.TNotebook1_t5)
        self.Radiobutton3.place(relx=0.52, rely=0.25, relheight=0.042
                , relwidth=0.057)
        self.Radiobutton3.configure(activebackground="#ececec")
        self.Radiobutton3.configure(activeforeground="#000000")
        self.Radiobutton3.configure(background="#d9d9d9")
        self.Radiobutton3.configure(disabledforeground="#a3a3a3")
        self.Radiobutton3.configure(foreground="#000000")
        self.Radiobutton3.configure(highlightbackground="#d9d9d9")
        self.Radiobutton3.configure(highlightcolor="black")
        self.Radiobutton3.configure(justify='left')
        self.Radiobutton3.configure(text='''Radio''')

        self.Radiobutton4 = tk.Radiobutton(self.TNotebook1_t5)
        self.Radiobutton4.place(relx=0.52, rely=0.3, relheight=0.042
                , relwidth=0.057)
        self.Radiobutton4.configure(activebackground="#ececec")
        self.Radiobutton4.configure(activeforeground="#000000")
        self.Radiobutton4.configure(background="#d9d9d9")
        self.Radiobutton4.configure(disabledforeground="#a3a3a3")
        self.Radiobutton4.configure(foreground="#000000")
        self.Radiobutton4.configure(highlightbackground="#d9d9d9")
        self.Radiobutton4.configure(highlightcolor="black")
        self.Radiobutton4.configure(justify='left')
        self.Radiobutton4.configure(text='''Radio''')

        self.LabelSetting7 = tk.Label(self.TNotebook1_t5)
        self.LabelSetting7.place(relx=0.01, rely=0.4, height=21, width=34)
        self.LabelSetting7.configure(activebackground="#f9f9f9")
        self.LabelSetting7.configure(activeforeground="black")
        self.LabelSetting7.configure(background="#d9d9d9")
        self.LabelSetting7.configure(disabledforeground="#a3a3a3")
        self.LabelSetting7.configure(foreground="#000000")
        self.LabelSetting7.configure(highlightbackground="#d9d9d9")
        self.LabelSetting7.configure(highlightcolor="black")
        self.LabelSetting7.configure(text='''Label''')

        self.Label6_10 = tk.Label(self.TNotebook1_t5)
        self.Label6_10.place(relx=0.51, rely=0.117, height=21, width=34)
        self.Label6_10.configure(activebackground="#f9f9f9")
        self.Label6_10.configure(activeforeground="black")
        self.Label6_10.configure(background="#d9d9d9")
        self.Label6_10.configure(disabledforeground="#a3a3a3")
        self.Label6_10.configure(foreground="#000000")
        self.Label6_10.configure(highlightbackground="#d9d9d9")
        self.Label6_10.configure(highlightcolor="black")
        self.Label6_10.configure(text='''Label''')
        
        
        self.c1_n.delete(0, 'end')
        self.c1_mean.delete(0, 'end')
        self.c1_sigma.delete(0, 'end')
        self.c1_xmin.delete(0, 'end')
        self.c1_xmax.delete(0, 'end')
        self.c1_ymin.delete(0, 'end')
        self.c1_ymax.delete(0, 'end')
        
        self.c2_n.delete(0, 'end')
        self.c2_mean.delete(0, 'end')
        self.c2_sigma.delete(0, 'end')
        self.c2_xmin.delete(0, 'end')
        self.c2_xmax.delete(0, 'end')
        self.c2_ymin.delete(0, 'end')
        self.c2_ymax.delete(0, 'end')
        
        self.c3_n.delete(0, 'end')
        self.c3_mean.delete(0, 'end')
        self.c3_sigma.delete(0, 'end')
        self.c3_xmin.delete(0, 'end')
        self.c3_xmax.delete(0, 'end')
        self.c3_ymin.delete(0, 'end')
        self.c3_ymax.delete(0, 'end')
        
        self.c4_n.delete(0, 'end')
        self.c4_mean.delete(0, 'end')
        self.c4_sigma.delete(0, 'end')
        self.c4_xmin.delete(0, 'end')
        self.c4_xmax.delete(0, 'end')
        self.c4_ymin.delete(0, 'end')
        self.c4_ymax.delete(0, 'end')
        
        self.c5_n.delete(0, 'end')
        self.c5_mean.delete(0, 'end')
        self.c5_sigma.delete(0, 'end')
        self.c5_xmin.delete(0, 'end')
        self.c5_xmax.delete(0, 'end')
        self.c5_ymin.delete(0, 'end')
        self.c5_ymax.delete(0, 'end')
        
        self.c6_n.delete(0, 'end')
        self.c6_mean.delete(0, 'end')
        self.c6_sigma.delete(0, 'end')
        self.c6_xmin.delete(0, 'end')
        self.c6_xmax.delete(0, 'end')
        self.c6_ymin.delete(0, 'end')
        self.c6_ymax.delete(0, 'end')
        
        
        self.c1_n.insert('end',0)
        self.c1_mean.insert('end',0)
        self.c1_sigma.insert('end',0)
        self.c1_xmin.insert('end',0)
        self.c1_xmax.insert('end',0)
        self.c1_ymin.insert('end',0)
        self.c1_ymax.insert('end',0)
        
        self.c2_n.insert('end',0)
        self.c2_mean.insert('end',0)
        self.c2_sigma.insert('end',0)
        self.c2_xmin.insert('end',0)
        self.c2_xmax.insert('end',0)
        self.c2_ymin.insert('end',0)
        self.c2_ymax.insert('end',0)
        
        self.c3_n.insert('end',0)
        self.c3_mean.insert('end',0)
        self.c3_sigma.insert('end',0)
        self.c3_xmin.insert('end',0)
        self.c3_xmax.insert('end',0)
        self.c3_ymin.insert('end',0)
        self.c3_ymax.insert('end',0)
        
        self.c4_n.insert('end',0)
        self.c4_mean.insert('end',0)
        self.c4_sigma.insert('end',0)
        self.c4_xmin.insert('end',0)
        self.c4_xmax.insert('end',0)
        self.c4_ymin.insert('end',0)
        self.c4_ymax.insert('end',0)
        
        self.c5_n.insert('end',0)
        self.c5_mean.insert('end',0)
        self.c5_sigma.insert('end',0)
        self.c5_xmin.insert('end',0)
        self.c5_xmax.insert('end',0)
        self.c5_ymin.insert('end',0)
        self.c5_ymax.insert('end',0)
        
        self.c6_n.insert('end',0)
        self.c6_mean.insert('end',0)
        self.c6_sigma.insert('end',0)
        self.c6_xmin.insert('end',0)
        self.c6_xmax.insert('end',0)
        self.c6_ymin.insert('end',0)
        self.c6_ymax.insert('end',0)
    
        
        
        
###############################################################################
###############################################################################
#need to add in 
        
        
        self._job = None               #use to tell if need to update

###############################################################################
###############################################################################

        
    def updateValue(self, event):                 #get updated value of silder1
        if self._job:
            self.TNotebook1_t0.after_cancel(self._job)
        self._job = self.TNotebook1_t0.after(1, self._update_bar2)

###############################################################################
###############################################################################

    
    def keep_original(self, event):                 #get updated value of silder1
        if self.current_filename.get()!='Your Filename Here':
            self.dx=(self.max_gx-self.min_gx)/self.s1.get()
            self.s2.set(int(np.around((self.max_gy-self.min_gy)/self.dx)))
            self.s3.set(self.s1.get()*self.s2.get())
#        self.dx+=self.dx/4
#        floor=(np.floor(np.log10(self.dx)))
#        if floor<0:
#            self.dx=np.around(self.dx+self.dx/5,decimals=int(np.abs(floor)))
#            print(self.dx)

###############################################################################
###############################################################################        
      
    
    def _update_bar2(self):                          #update value of bar2
        self._job = None
        dx=(self.max_gx-self.min_gx)/self.s1.get()
        self.s2.set(int(np.around((self.max_gy-self.min_gy)/dx)))
        self.s3.set(self.s1.get()*self.s2.get())
        self.plot_grid()

###############################################################################
###############################################################################

        
    def load_file(self):

        
        '''
        -----------------------------------------------------------------------
        This next section of code handles reading in a sample file. You can choose
        a csv, tab delimited text, or both .xls and .xlsx type excel files. Some
        errors are raised if there is a problem with the text file, but it is not
        all encompassing. 
        -----------------------------------------------------------------------
        '''
        
        
        if self.use_rand_val.get()==1: 
            self.sample=self.random_sample.copy()
        else:
            ###############################################
            #activeate this in the final version. easier ot hardcode for now
    #        filename = tk.filedialog.askopenfilename(title = "Select X, Y, Strike data")      # Open single file
            self.current_filename.set(tk.filedialog.askopenfilename(title = "Select X, Y, Strike data")  )
            ################################################
            
            if ".txt" in self.current_filename.get() or ".csv" in self.current_filename.get():
#                print(type(self.current_filename.get()))
                with open(self.current_filename.get()) as self.f:
                    try:
                        self.content = self.f.read()
                    except IndexError as err:
                        messagebox.showerror("File Type Error", "Selected File Is Not of the Correct Type \n\n Select One of The Following Types [.csv, .txt, .xlsx, .xls] \n\n This is the actual error for debugging purposes: \n{}".format(err))
                if '\t' in self.content:               
                    self.sample=pd.read_csv(self.current_filename.get(), sep='\t').values.T
                else: 
                    self.sample=pd.read_csv(self.current_filename.get()).values.T
            
            elif ".xls" in self.current_filename.get() or ".xlsx" in self.current_filename.get():
                try:
                    self.sample=pd.read_excel(self.current_filename.get()).values.T
                except:
                    messagebox.showerror("File Error", "An Unknown Error Occurred Loading and Excel File")
                    
            else:
                messagebox.showerror("File Error", "An Unknown Error Occurred Loading File \n\n Check That File Is Correct Type \n\n Select One of The Following Types [.csv, .txt, .xlsx, .xls]")
                 
                
            '''
            7/10/20
            -----------------------------------
            Ideally I would eventually add something here to actually make sure you gotta data in
            '''
#                try:
#            self.col_len=len(self.sample[:,0])
                    
#            if len(self.sample)==0: 
#                raise Exception('Your filetype appears to ".csv" or ".txt" but no tab delimited or comma delimited data was found')
            
                
        
        '''
        7/10/20
        --------------
        Commenting code form about a year ago. The following section handles 
        the creation of a grid around the sample points. The idea is to expand 
        the grid to be 1% larger than the maximum extents of the sample data. 
        I had to modify this on 7/10/20 because the old method didnt work if the
        scale of the data was a lot smaller than the overall scale being used 
        (like UTM)
        '''
        
        self.bulk_mean_val.set(np.round(np.median(self.sample[2,:]), decimals=1))
        self.bulk_sigma_val.set(np.round(np.std(self.sample[2,:]), decimals=1))
        self.recommend_theta()
        self.bin_center.set(self.bulk_mean_val.get())
        
        x=self.sample[0]
        y=self.sample[1]
        self.min_x=min(x)
        self.min_y=min(y)
        
        self.max_x=max(x)
        self.max_y=max(y)
        self.x_scale=self.max_x-self.min_x
        self.y_scale=self.max_y-self.min_y
        
        self.min_gx=min(x)-0.01*self.x_scale
        self.min_gy=min(y)-0.01*self.y_scale
        self.max_gx=max(x)+0.01*self.x_scale
        self.max_gy=max(y)+0.01*self.y_scale
        self.dx=(self.max_gx-self.min_gx)/self.s1.get()
#        self.dy=(self.max_gy-self.min_gy)/self.s2.get()
        
        self.plot_bin_spin()
        self.plot_grid()

###############################################################################
###############################################################################

    
    def recommend_theta(self):
        theta=np.round(4*self.bulk_sigma_val.get()/self.neighbors_val.get(),decimals=1)
        self.Label17.config(text=theta)
        #hold

###############################################################################
###############################################################################
    
    def quitit(self):
        
        root.quit()
        root.destroy()
        sys.exit("Script No Longer Running")
    

###############################################################################
###############################################################################

    
    def plotbins(self):
        plot_bins=[0,30,60,90,120,150,180,210,240,270,300,330,360]
        
        
        
        if self.custom_bin_check.get()==1:
            plot_bins=np.deg2rad(np.array(plot_bins))
            plot_bins+=np.deg2rad(float(self.bin_center.get())-15)
            plot_bins=np.around(np.rad2deg(plot_bins),0).tolist()
            plot_bins.append(0)
            plot_bins.append(180)
        
#        plot_bins=[x-360 if x>360 else x for x in plot_bins]
        plot_bins=[int(x-360) if x>360 else int(x) for x in plot_bins]
        plot_bins=[int(x+360) if x<0 else int(x) for x in plot_bins]
        plot_bins=list(set(plot_bins))
        plot_bins.sort()
        return plot_bins

###############################################################################
###############################################################################
    
    def analyse(self):
        #this function pretty much calls everything else
        global test_df
        global test_out_df
        
        neighbors=self.neighbors_val.get()
        theta=self.theta_val.get()
        bins=self.plotbins()
        grid_n=self.s3.get()
        self.uniform_sample=self.sample.copy()
        
#        print(self.uniform_sample.shape)
#        np.random.seed(1)
#        print(len(self.uniform_sample[2,:]))
#        print(np.random.uniform(low=0,high=180, size=len(self.sample[2,:])))
        self.uniform_sample[2,:]=np.random.uniform(low=0,high=180, size=len(self.sample[2,:]))
        
        
        self.output_df=MODOAnalysis.analysis(self.sample, neighbors, bins, theta,grid_n, self.grid_xy)
        self.pointwise_mult=MODOAnalysis.analysis(self.sample, neighbors, bins, theta,grid_n, self.sample[0:2,:].T)
        self.uniform_df=MODOAnalysis.analysis(self.uniform_sample, neighbors, bins, theta,grid_n, self.grid_xy)
        if self.cuttoff.get()==1:
            self.output_df['Cuttoff']=np.where(self.output_df['Max Dist']<float(self.cuttoff_r.get()),'Keep','Cut')
        self.plot_bin_spin()
        self.plot_grid()
        self.plot_multinomial()
        self.plot_beta_cont()
        self.plot_beta_mult()
        self.plot_hist()
        self.plot_fdense()
        self.plot_log_fdense()
        self.plot_unitform_mult()
        self.plot_unitform_beta()
        self.plot_frac_dense_mult()
        self.plot_frac_dense_beta()
        self.plot_multinomial_points()
        self.plot_beta_points()
        self.plot_bin_spin_art()
        np.random.seed(1234)

###############################################################################
###############################################################################

 
    def export_text(self):
        filename=asksaveasfilename(defaultextension=".xlsx",
                                   filetypes=(("Excel Workbook", "*.xlsx"),
                                              ("Comma Separated Values", "*.csv"),
                                              ("1997-2003 Excel Workbook", "*.xls") ))
        
#        print(filename)
        #Try to check that we get the write filename, then write the File
        if str(filename).split('.')[0]==str(filename).split('.')[-1]:
            messagebox.showerror("File Extension Error", "No File Extension Selected")
        elif 'xl' in str(filename).split('.')[-1]:
            self.output_df.to_excel(str(filename),index=False)
        elif 'csv' in str(filename).split('.')[-1]: 
            self.output_df.to_csv(str(filename),index=False) 
        else:
            messagebox.showerror("Filename Error", "Inappropriate File Extension or Path")


###############################################################################
###############################################################################
        
    def update_mult(self):
        if self.init==True:
            self.plot_multinomial()
            
###############################################################################
###############################################################################
            
    def plot_multinomial(self):
        self.init=True
        if self.mult_cont_fig==None:
            self.mult_cont_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.mult_cont_fig.clf()
#        self.mult_cont_ax.cla()
        self.mult_cont_ax=self.mult_cont_fig.add_subplot(111)
#        xy=np.vstack([self.output_df['x'].values,self.output_df['y'].values]) #i think this is needed for other gridding algorithms
        
        
        if self.mult_slide==False:
            self.y_num=int(np.around((self.max_gy-self.min_gy)/((self.max_gx-self.min_gx)/50)))
    #        if grid_n>y_num*50
            self.cont_grid_xy = np.array(list(itertools.product(
                    np.linspace(self.min_gx,self.max_gx,num=50),
                    np.linspace(self.min_gy,self.max_gy,num=self.y_num)))) 
#            self.cont_grid_x=self.cont_grid_xy[:,0]
#            self.cont_grid_y=self.cont_grid_xy[:,1]
            
            #-----------------------------------------------------
            #needed to add this to solve contouring problems
            self.cont_grid_x_total=self.cont_grid_xy[:,0]
            self.cont_grid_y_total=self.cont_grid_xy[:,1]
            self.cont_grid_x=np.linspace(min(self.cont_grid_x_total),max(self.cont_grid_x_total),100)
            self.cont_grid_y=np.linspace(min(self.cont_grid_y_total),max(self.cont_grid_y_total),100)
            #-----------------------------------------------------------------
            
            self.mult_zi = griddata(self.output_df['x'].values,self.output_df['y'].values,
                          self.output_df['Multinomial'].values,
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')
            
        if self.mult_cont_rng_scale_val.get()==1:
#            print('test')
            cont_max=np.max(self.output_df['Multinomial'])
            num=11
        elif self.mult_cont_rng_scale_val.get()==2:
            cont_max=float(self.cont_max.get())
            num=int(np.around(float(self.cont_num.get())))
        else:
            cont_max=int(np.around(self.neighbors_val.get()*0.7782 + 3E-14,0))+2
            num=11
        
        #print(self.cont_grid_y)    
        self.contour=self.mult_cont_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.mult_zi,
                                  levels=np.linspace(start=0,stop=cont_max, num=num, endpoint=True),
                                  cmap=cm.get_cmap(self.user_mult_cmap.get()))
        self.mult_cont_cbar=self.mult_cont_fig.colorbar(self.contour)
        
        if self.mult_cont_axis_label_val.get()==1:
            self.mult_cont_ax.set_title(self.mult_cont_title.get())
            self.mult_cont_ax.set_xlabel(self.mult_cont_x_name.get())
            self.mult_cont_ax.set_ylabel(self.mult_cont_y_label.get())
        
        
        '''this rotates the strikes so they are drawn correctly'''
        angles=-1*self.sample[2,:]+90
        
        self.mult_cont_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.mult_strike_marker,
          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.mult_cont_canvas==None:
            self.mult_cont_canvas =  FigureCanvasTkAgg(self.mult_cont_fig, master=self.Mult_Contour)        
        self.mult_cont_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.mult_cont_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.mult_cont_canvas.draw()
        self.mult_slide=False
        
        if self.mult_toolbar==None:
            self.mult_toolbar=tkagg.NavigationToolbar2Tk(self.mult_cont_canvas, self.tab1_frame)
        
        self.mult_toolbar.update()
        self.tab1_frame.place(relx=0.52, rely=0.928, relheight=0.05
                , relwidth=0.454)
        self.mult_cont_canvas.get_tk_widget().pack(fill="both", expand=True)

##############################################################################
##############################################################################

    ##############################################################################
    '''
    Handle Plotting point plots at sample locations
    '''
    ##############################################################################

    def plot_multinomial_points(self):
        self.init=True
        if self.mult_point_fig==None:
            self.mult_point_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.mult_point_fig.clf()
#        self.mult_point_ax.cla()
        self.mult_point_ax=self.mult_point_fig.add_subplot(111)


        '''
        will probably need this
        '''
#        if self.mult_point_axis_label_val.get()==1:
#            self.mult_point_ax.set_title(self.mult_point_title.get())
#            self.mult_point_ax.set_xlabel(self.mult_point_x_label.get())
#            self.mult_point_ax.set_ylabel(self.mult_point_y_label.get())
        
        #create scatterplot
        self.mult_point_ax_scatter=self.mult_point_ax.scatter(self.sample[0,:], self.sample[1,:],
                                   c=self.pointwise_mult.Multinomial,
                                   vmin=0,
                                   vmax=max(self.pointwise_mult.Multinomial),
                                   cmap=self.user_mult_point_cmap.get(),
                                   s=self.mult_point_marker)
        
        self.mult_point_fig.colorbar(self.mult_point_ax_scatter,ax=self.mult_point_ax)
        
        if self.mult_point_canvas==None:
            self.mult_point_canvas =  FigureCanvasTkAgg(self.mult_point_fig, master=self.Mult_Points)        
        self.mult_point_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        
        self.mult_point_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.mult_point_canvas.draw()
        
        
        
        self.mult_point_slide=False
        
        if self.mult_point_toolbar==None:
            self.mult_point_toolbar=tkagg.NavigationToolbar2Tk(self.mult_point_canvas, self.tab2_mult_frame)
        
        self.mult_point_toolbar.update()
        self.tab2_mult_frame.place(relx=0.52, rely=0.928, relheight=0.05
                , relwidth=0.454)
        self.mult_point_canvas.get_tk_widget().pack(fill="both", expand=True)



###############################################################################
###############################################################################



    def mult_strike_size(self,val):
        self.mult_strike_marker=int(val)/8
        self.mult_slide=True
        
        self.plot_multinomial()

###############################################################################
###############################################################################



    def mult_point_size(self,val):
        self.mult_point_marker=int(val)/8
        self.mult_point_slide=True
        
        self.plot_multinomial_points()

###############################################################################
###############################################################################


    def beta_strike_size(self,val):
        self.beta_strike_marker=int(val)/8
        self.beta_slide=True
        
        self.plot_beta_cont()

###############################################################################
###############################################################################

    def beta_point_size(self,val):
        self.beta_point_marker=int(val)/8
        self.beta_point_slide=True
        
        self.plot_beta_points()

###############################################################################
###############################################################################






    def mult_cont_cmap(self,x,y,z):
        #update multinomial contour plot with new cmap
       self.plot_multinomial() 
###############################################################################
###############################################################################


    def mult_point_cmap(self,x,y,z):
        #update multinomial contour plot with new cmap
       self.plot_multinomial_points() 

###############################################################################
###############################################################################
    def beta_point_cmap(self,x,y,z):
        #update multinomial contour plot with new cmap
       self.plot_beta_points() 

###############################################################################
###############################################################################

    def plot_beta_cont(self):
        #this is the code that handles the beta contour plot
        if self.beta_cont_fig==None:
            self.beta_cont_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.beta_cont_fig.clf()
        self.beta_cont_ax=self.beta_cont_fig.add_subplot(111)
        
        
        if self.beta_slide==False:
            
            self.beta_zi = griddata(self.output_df['x'].values,self.output_df['y'].values,
                          self.output_df['Beta'].values,
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')

        self.beta_contour=self.beta_cont_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.beta_zi,
                                  levels=np.linspace(start=0,stop=1, num=11, endpoint=True),
                                  cmap=cm.get_cmap(self.user_beta_cmap.get()))


        self.beta_cont_cbar=self.beta_cont_fig.colorbar(self.beta_contour)
        
        #if the checkbox is clicked then plot the axis labels
        if self.beta_chart_axis_label_val.get()==1:
            self.beta_cont_ax.set_title(self.beta_chart_title.get())
            self.beta_cont_ax.set_xlabel(self.beta_chart_x_name.get())
            self.beta_cont_ax.set_ylabel(self.beta_chart_y_label.get())

        '''this is how the strikes are drawn'''
        angles=-1*self.sample[2,:]+90
        self.beta_cont_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.beta_strike_marker,
          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.beta_cont_canvas==None:
            self.beta_cont_canvas =  FigureCanvasTkAgg(self.beta_cont_fig, master=self.BetaContCanvas)        
        self.beta_cont_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.beta_cont_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.beta_cont_canvas.draw()
        self.beta_slide=False

       #neeed to figure out htis toolbar part
        if self.beta_toolbar==None:
            self.beta_toolbar=tkagg.NavigationToolbar2Tk(self.beta_cont_canvas, self.tab1_beta_frame)
        
        self.beta_toolbar.update()
        self.tab1_beta_frame.place(relx=0.020, rely=0.928, relheight=0.05
                , relwidth=0.454)
        self.beta_cont_canvas.get_tk_widget().pack(fill="both", expand=True)

###############################################################################
###############################################################################

    ##############################################################################
    '''
    Handle plotting beta plots at sample locations
    '''
    ##############################################################################

    def plot_beta_points(self):
        self.init=True
        if self.beta_point_fig==None:
            self.beta_point_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.beta_point_fig.clf()
#        self.beta_point_ax.cla()
        self.beta_point_ax=self.beta_point_fig.add_subplot(111)


        '''
        will probably need this
        '''
#        if self.beta_point_axis_label_val.get()==1:
#            self.beta_point_ax.set_title(self.beta_point_title.get())
#            self.beta_point_ax.set_xlabel(self.beta_point_x_label.get())
#            self.beta_point_ax.set_ylabel(self.beta_point_y_label.get())
        
        
        
        #create scatterplot
        self.beta_point_ax_scatter=self.beta_point_ax.scatter(self.sample[0,:], self.sample[1,:],
                                   c=self.pointwise_mult.Beta,
                                   vmin=0,
                                   vmax=1,
                                   cmap=self.user_beta_point_cmap.get(),
                                   s=self.beta_point_marker)
        
        self.beta_point_fig.colorbar(self.beta_point_ax_scatter,ax=self.beta_point_ax)
        
        if self.beta_point_canvas==None:
            self.beta_point_canvas =  FigureCanvasTkAgg(self.beta_point_fig, master=self.Beta_Points)        
        self.beta_point_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        
        self.beta_point_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.beta_point_canvas.draw()
        
        
        
#        self.mult_slide=False
        
        if self.beta_point_toolbar==None:
            self.beta_point_toolbar=tkagg.NavigationToolbar2Tk(self.beta_point_canvas, self.tab2_beta_frame)
        
        self.beta_point_toolbar.update()
        self.tab2_beta_frame.place(relx=0.020, rely=0.928, relheight=0.05
                , relwidth=0.454)
        self.beta_point_canvas.get_tk_widget().pack(fill="both", expand=True)
###############################################################################
###############################################################################
      

    def plot_unitform_mult(self):
        #this is the code that handles the fracture density contour plot
        if self.uniform_mult_fig==None:
            self.uniform_mult_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.uniform_mult_fig.clf()
        self.uniform_mult_ax=self.uniform_mult_fig.add_subplot(111)
        
        
        self.uniform_mult_zi = griddata(self.uniform_df['x'].values,self.uniform_df['y'].values,
                          self.uniform_df['Multinomial'].values,
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')
        cont_max=int(np.around(self.neighbors_val.get()*0.7782 + 3E-14,0))+2
        self.uniform_mult_contour=self.uniform_mult_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.uniform_mult_zi,
                                  levels=np.linspace(start=0,stop=cont_max, num=11, endpoint=True),
                                  cmap=cm.get_cmap(self.user_mult_cmap.get()))


        self.uniform_mult_cbar=self.uniform_mult_fig.colorbar(self.uniform_mult_contour)


        '''this is how the strikes are drawn'''
#        angles=self.sample[2,:]+90
#        self.uniform_mult_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.uniform_mult_strike_marker,
#          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        
        if self.uniform_mult_canvas==None:
            self.uniform_mult_canvas =  FigureCanvasTkAgg(self.uniform_mult_fig, master=self.UniformStrikeMultinomial)        
        self.uniform_mult_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.uniform_mult_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.uniform_mult_canvas.draw()

       #right now I don't want a toolbar for this
#        if self.fdense_toolbar==None:
#            self.fdense_toolbar=tkagg.NavigationToolbar2Tk(self.fdense_canvas, self.tab1_fdense_frame)
#        
#        self.fdense_toolbar.update()
#        self.tab1_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05
#                , relwidth=0.454)
#        self.fdense_canvas.get_tk_widget().pack(fill="both", expand=True)

       
###############################################################################
###############################################################################
       

    def plot_unitform_beta(self):
        #this is the code that handles the fracture density contour plot
        if self.uniform_beta_fig==None:
            self.uniform_beta_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.uniform_beta_fig.clf()
        self.uniform_beta_ax=self.uniform_beta_fig.add_subplot(111)
        
        
        self.uniform_beta_zi = griddata(self.uniform_df['x'].values,self.uniform_df['y'].values,
                          self.uniform_df['Beta'].values,
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')

        self.uniform_beta_contour=self.uniform_beta_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.uniform_beta_zi,
                                  levels=np.linspace(start=0,stop=1, num=11, endpoint=True),
                                  cmap=cm.get_cmap(self.user_beta_cmap.get()))


        self.uniform_beta_cbar=self.uniform_beta_fig.colorbar(self.uniform_beta_contour)


        '''this is how the strikes are drawn'''
#        angles=self.sample[2,:]+90
#        self.uniform_beta_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.uniform_beta_strike_marker,
#          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        
        if self.uniform_beta_canvas==None:
            self.uniform_beta_canvas =  FigureCanvasTkAgg(self.uniform_beta_fig, master=self.UniformStrikeBeta)        
        self.uniform_beta_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.uniform_beta_canvas._tkcanvas.config(highlightthickness=3, highlightcolor ='black')
        self.uniform_beta_canvas.draw()

       #right now I don't want a toolbar for this
#        if self.fdense_toolbar==None:
#            self.fdense_toolbar=tkagg.NavigationToolbar2Tk(self.fdense_canvas, self.tab1_fdense_frame)
#        
#        self.fdense_toolbar.update()
#        self.tab1_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05
#                , relwidth=0.454)
#        self.fdense_canvas.get_tk_widget().pack(fill="both", expand=True)

       
###############################################################################
###############################################################################
      

    def plot_fdense(self):
        #this is the code that handles the fracture density contour plot
        if self.fdense_fig==None:
            self.fdense_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.fdense_fig.clf()
        self.fdense_ax=self.fdense_fig.add_subplot(111)
        

        self.fdense_zi = griddata(self.output_df['x'].values,self.output_df['y'].values,
                          self.output_df['Fracture Density'].values,
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')

        self.fdense_contour=self.fdense_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.fdense_zi,
                                  levels=np.linspace(start=np.min(self.output_df['Fracture Density']),stop=np.max(self.output_df['Fracture Density']), num=11, endpoint=True),
                                  cmap=cm.get_cmap(self.user_mult_cmap.get()))


        self.fdense_cbar=self.fdense_fig.colorbar(self.fdense_contour)


        '''this is how the strikes are drawn'''
#        angles=self.sample[2,:]+90
#        self.fdense_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.fdense_strike_marker,
#          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        
        if self.fdense_canvas==None:
            self.fdense_canvas =  FigureCanvasTkAgg(self.fdense_fig, master=self.FractureDensityCanvas)        
        self.fdense_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.fdense_canvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        self.fdense_canvas.draw()

       #right now I don't want a toolbar for this
#        if self.fdense_toolbar==None:
#            self.fdense_toolbar=tkagg.NavigationToolbar2Tk(self.fdense_canvas, self.tab1_fdense_frame)
#        
#        self.fdense_toolbar.update()
#        self.tab1_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05
#                , relwidth=0.454)
#        self.fdense_canvas.get_tk_widget().pack(fill="both", expand=True)

###############################################################################
###############################################################################
      

    def plot_log_fdense(self):
        #this is the code that handles the fracture density contour plot
        if self.log_fdense_fig==None:
            self.log_fdense_fig=Figure()
            
                #------------------------------------------------------------------------------

        self.log_fdense_fig.clf()
        self.log_fdense_ax=self.log_fdense_fig.add_subplot(111)
        

        self.log_fdense_zi = griddata(self.output_df['x'].values,self.output_df['y'].values,
                          np.log(self.output_df['Fracture Density'].values),
                          self.cont_grid_x,
                          self.cont_grid_y,
                          interp='linear')

        self.log_fdense_contour=self.log_fdense_ax.contourf(self.cont_grid_x,self.cont_grid_y,
                                  self.log_fdense_zi,
                                  levels=np.linspace(start=np.min(np.log(self.output_df['Fracture Density'])),
                                                     stop=np.max(np.log(self.output_df['Fracture Density'])),
                                                     num=11, endpoint=True),
                                                     cmap=cm.get_cmap(self.user_mult_cmap.get()))


        self.log_fdense_cbar=self.log_fdense_fig.colorbar(self.log_fdense_contour)


        '''this is how the strikes are drawn'''
#        angles=self.sample[2,:]+90
#        self.log_fdense_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.log_fdense_strike_marker,
#          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        
        if self.log_fdense_canvas==None:
            self.log_fdense_canvas =  FigureCanvasTkAgg(self.log_fdense_fig, master=self.LogFracDensityCanvas)        
        self.log_fdense_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.log_fdense_canvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        self.log_fdense_canvas.draw()

       #right now I don't want a toolbar for this
#        if self.log_fdense_toolbar==None:
#            self.log_fdense_toolbar=tkagg.NavigationToolbar2Tk(self.log_fdense_canvas, self.tab1_log_fdense_frame)
#        
#        self.log_fdense_toolbar.update()
#        self.tab1_log_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05
#                , relwidth=0.454)
#        self.log_fdense_canvas.get_tk_widget().pack(fill="both", expand=True)

###############################################################################
###############################################################################


    def beta_cont_cmap(self,x,y,z):
        #this function updates the plot with a new type of cmap
       self.plot_beta_cont() 

##############################################################################
###############################################################################       
    def plot_bin_spin(self):
        '''Updates bin spin visualization'''
        '''Learned a very important lesson on this one
        1. Plot elements need to be part of the class 'TopLevel1'
        or you cannot refer to them to update them
        2. Need to make sure not re redefine any plot 
        element like 'self.binspin_fig = Figure()' more 
        than once. This will precent you from being able to update
        that plot element later. The first if statements after this
        comment are examples of preventing this error.
        
        '''
        if self.binspin_fig==None:         
            self.binspin_fig = Figure()
        if self.ax==None: 
            self.ax = self.binspin_fig.add_subplot(111, projection='polar')
        
        self.ax.cla()
        self.ax.set_theta_zero_location("N")
        self.ax.set_theta_direction(-1)

        plot_bins=self.plotbins()
        ticks=[]
        counter=0
        for item in plot_bins:
            if len(plot_bins)==13:
                if item in [0,180,90]:
                    ticks.append(str(item)+'\u00b0')
                else:
                    ticks.append('')
            else:    
                if counter in [0,3,5,7]:
                    ticks.append(str(item)+'\u00b0')
                else:
                    ticks.append('')
                counter+=1
#        print(plot_bins)
        self.ax.set_thetagrids(plot_bins,zorder=1) 
        self.ax.set_xticklabels(ticks)
        
        labels= [label for label in self.ax.xaxis.get_majorticklabels()]
        if len(plot_bins)==13:
            labels[0].set_transform(labels[0].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0, -10/72, self.binspin_fig.dpi_scale_trans))
            labels[3].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -4/72, -8/72, self.binspin_fig.dpi_scale_trans))
            labels[6].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -10/72, -13/72, self.binspin_fig.dpi_scale_trans))
            self.binspin_fig.subplots_adjust(left=0.05, bottom=0.1, top=0.90, right=0.85)
        else:
            labels[0].set_transform(labels[0].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0, -10/72, self.binspin_fig.dpi_scale_trans))
            labels[3].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -1/72, -5/72, self.binspin_fig.dpi_scale_trans))
            labels[5].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0/72, -13/72, self.binspin_fig.dpi_scale_trans))
            labels[7].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -10/72, -17/72, self.binspin_fig.dpi_scale_trans))
            self.binspin_fig.subplots_adjust(left=0.05, bottom=0.05, top=0.95, right=0.85)
#        
        bins=list(np.arange(0,181,1))
#        print(bins)
        hist=np.histogram(self.sample[2,:],bins=bins)
        self.ax.set_ylim(0,np.max(hist[0]*1.05))
        
        
        plot_hist=hist[0].tolist()
        plot_hist.extend(plot_hist)
        
        plot_bins=np.arange(0,360,1)
        
        width=((2*np.pi)/360)
        self.ax.bar(np.deg2rad(plot_bins),plot_hist, width=width, facecolor='r',zorder=2)
        
        if self.canvas==None:
            self.canvas =  FigureCanvasTkAgg(self.binspin_fig, master=self.BinSpin)
        
        self.canvas.get_tk_widget().pack()
        self.canvas.draw()
        

        #also plot the rose on the smaple summary page 
#        if self.rose_canvas==None:
#            self.rose_canvas =  FigureCanvasTkAgg(self.binspin_fig, master=self.RoseCanvas)
#        
#        self.rose_canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=1)
#        self.rose_canvas.draw()
        self.plot_grid()


##############################################################################
###############################################################################       
    def plot_bin_spin_art(self):
        '''Updates bin spin visualization for the artificial data'''
        
        if self.artificial_binspin_fig==None:         
            self.artificial_binspin_fig = Figure()
        if self.artificial_rose_ax==None: 
            self.artificial_rose_ax = self.artificial_binspin_fig.add_subplot(111, projection='polar')
        
        self.artificial_rose_ax.cla()
        self.artificial_rose_ax.set_theta_zero_location("N")
        self.artificial_rose_ax.set_theta_direction(-1)

        plot_bins=self.plotbins()
        ticks=[]
        counter=0
        for item in plot_bins:
            if len(plot_bins)==13:
                if item in [0,180,90]:
                    ticks.append(str(item)+'\u00b0')
                else:
                    ticks.append('')
            else:    
                if counter in [0,3,5,7]:
                    ticks.append(str(item)+'\u00b0')
                else:
                    ticks.append('')
                counter+=1
#        print(plot_bins)
        self.artificial_rose_ax.set_thetagrids(plot_bins,zorder=1) 
        self.artificial_rose_ax.set_xticklabels(ticks)
        
        labels= [label for label in self.artificial_rose_ax.xaxis.get_majorticklabels()]
        if len(plot_bins)==13:
            labels[0].set_transform(labels[0].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0, -10/72, self.artificial_binspin_fig.dpi_scale_trans))
            labels[3].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -4/72, -8/72, self.artificial_binspin_fig.dpi_scale_trans))
            labels[6].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -10/72, -13/72, self.artificial_binspin_fig.dpi_scale_trans))
            self.artificial_binspin_fig.subplots_adjust(left=0.05, bottom=0.1, top=0.90, right=0.85)
        else:
            labels[0].set_transform(labels[0].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0, -10/72, self.artificial_binspin_fig.dpi_scale_trans))
            labels[3].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -1/72, -5/72, self.artificial_binspin_fig.dpi_scale_trans))
            labels[5].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          0/72, -13/72, self.artificial_binspin_fig.dpi_scale_trans))
            labels[7].set_transform(labels[2].get_transform() + 
                  matplotlib.transforms.ScaledTranslation(
                          -10/72, -17/72, self.artificial_binspin_fig.dpi_scale_trans))
            self.artificial_binspin_fig.subplots_adjust(left=0.05, bottom=0.05, top=0.95, right=0.85)
#        
        bins=list(np.arange(0,181,1))
#        print(bins)
        hist=np.histogram(self.sample[2,:],bins=bins)
        self.artificial_rose_ax.set_ylim(0,np.max(hist[0]*1.05))
        
        
        plot_hist=hist[0].tolist()
        plot_hist.extend(plot_hist)
        
        plot_bins=np.arange(0,360,1)
        
        width=((2*np.pi)/360)
        self.artificial_rose_ax.bar(np.deg2rad(plot_bins),plot_hist, width=width, facecolor='r',zorder=2)
        
        if self.artifical_bin_canvas==None:
            self.artifical_bin_canvas =  FigureCanvasTkAgg(self.artificial_binspin_fig, master=self.BinSpin_a)
        
        self.artifical_bin_canvas.get_tk_widget().pack()
        self.artifical_bin_canvas.draw()
        

        #also plot the rose on the smaple summary page 
#        if self.rose_canvas==None:
#            self.rose_canvas =  FigureCanvasTkAgg(self.artificial_binspin_fig, master=self.RoseCanvas)
#        
#        self.rose_canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=1)
#        self.rose_canvas.draw()
        #self.plot_grid()
        
                
        
###############################################################################
###############################################################################    
    def plot_grid(self):
        
        if self.preview_fig==None:
            self.preview_fig=Figure()
        if self.preview_ax==None:
            self.preview_ax=self.preview_fig.add_subplot(111)
        
        #------------------------------------------------------------------------------
        #This next line is very important, it uses permuations to get the grid locs
        self.grid_xy = np.array(list(itertools.product(
                np.linspace(self.min_gx,self.max_gx,num=self.s1.get()),
                np.linspace(self.min_gy,self.max_gy,num=self.s2.get())))) 
#        print(np.shape(self.grid_xy))
        
        sample_x=self.sample[0,:]
        sample_y=self.sample[1,:]
        
        
        

        
        if self.output_df is not None and self.cuttoff.get()==1:
            grid_x=self.output_df[self.output_df['Max Dist']<float(self.cuttoff_r.get())]['x']
            grid_y=self.output_df[self.output_df['Max Dist']<float(self.cuttoff_r.get())]['y']
            
        else:
            grid_x=self.grid_xy[:,0]
            grid_y=self.grid_xy[:,1]

        if self.output_df is not None:
             average_max_d=self.output_df['Max Dist'].mean()
             self.Average_Dist_Label.configure(text='''Average Distance to {}th Fracture: {:.5f}'''.format(self.neighbors_val.get(),average_max_d))
             self.Average_Dist_Label.configure(font=self.font15)
        
        self.preview_ax.cla()
        self.preview_ax.scatter(sample_x,sample_y,s=6,marker='o',c='g',alpha=0.6,edgecolors ='none', label='Sample Locations')
        self.preview_ax.scatter(grid_x,grid_y,s=50,marker='+',c='0',alpha=0.5,linewidth=1, label='Grid Locations')
#        self.preview_ax.set_aspect(aspect='equal')
        self.preview_ax.set_title('Sample and Grid Locations')
        self.preview_ax.legend(loc=1)
        
        self.preview_ax.set_aspect(aspect=((self.max_gx-self.min_gx)/(self.max_gy-self.min_gy)))
        
        if self.previewcanvas==None:
            self.previewcanvas =  FigureCanvasTkAgg(self.preview_fig, master=self.PreviewCanvas)        
        self.previewcanvas.get_tk_widget().pack()
        
        self.previewcanvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        
        self.previewcanvas.draw()
        if self.preview_toolbar==None:
            self.preview_toolbar=tkagg.NavigationToolbar2Tk(self.previewcanvas, self.tab0_frame)
        
        self.preview_toolbar.update()
        self.tab0_frame.place(relx=0.47, rely=0.835, relheight=0.05
                , relwidth=0.525)
        self.previewcanvas.get_tk_widget().pack(fill="both", expand=True)

###############################################################################
###############################################################################
    def plot_hist(self):
        if self.hist_fig==None:
            self.hist_fig=Figure()
        if self.hist_ax==None:
            self.hist_ax=self.hist_fig.add_subplot(111)
        
        self.hist_ax.cla()
#        print(self.output_df['Multinomial']==self.uniform_df['Multinomial'])
        
        sns.kdeplot(self.uniform_df['Multinomial'],ax=self.hist_ax, shade=True,legend=False,color='b')
        sns.kdeplot(self.output_df['Multinomial'],ax=self.hist_ax, shade=True,legend=False, color='g',zorder=0)
        self.hist_ax.legend(labels=['Uniform', 'Sample'])
#        g._legend.texts.set_text('test')
            
            
        self.hist_ax.set_title('Histogram')
        self.hist_ax.set_ylabel('Multinomial')
        self.hist_ax.set_xlabel('Frequency')
        
        if self.hist_canvas==None:
            self.hist_canvas =  FigureCanvasTkAgg(self.hist_fig, master=self.HistogramCanvas)  
        
        self.hist_canvas.get_tk_widget().pack()
        
        self.hist_canvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        
        self.hist_canvas.draw()
        
        self.hist_canvas.draw()
        if self.hist_toolbar==None:
            self.hist_toolbar=tkagg.NavigationToolbar2Tk(self.hist_canvas, self.HistToolbarFrame)
        
        self.hist_toolbar.update()
        self.HistToolbarFrame.place(relx=0.53, rely=0.93, relheight=0.05
                , relwidth=0.44)
        self.hist_canvas.get_tk_widget().pack(fill="both", expand=True)
    
###############################################################################
###############################################################################   
    
    def plot_beta_mult(self):
        if self.beta_mult_fig==None:
            self.beta_mult_fig=Figure()
        if self.beta_mult_ax==None:
            self.beta_mult_ax=self.beta_mult_fig.add_subplot(111)
            
        self.beta_mult_ax.cla() #clear the figure to start afresh
        
        #this is the actual scatter plot of the Beta Vs Multinomial
        self.beta_mult_ax.scatter(self.output_df['Beta'], 
                                  self.output_df['Multinomial'], 
                                  alpha=0.5, c='g',
                                  edgecolors='none')
        self.beta_mult_ax.set_title('Correlation of Beta vs Multinomial')
        self.beta_mult_ax.set_ylabel('Multinomial')
        self.beta_mult_ax.set_xlabel('Beta')
        
        corr=np.corrcoef(self.output_df['Beta'], self.output_df['Multinomial'])[0,1]
        spearmanr=stats.spearmanr(self.output_df['Beta'], self.output_df['Multinomial'])[0]
        
        self.PearsonLabel.configure(text='Pearson Correlation (Beta vs Multinomial):{:+.2f}'.format(corr))
        self.FrontPearsonLabel.configure(text='Multinomial vs. Beta Pearson R:{:+.2f}'.format(corr))
        self.SpearmanLabel.configure(text='''Spearman Correlation (Beta vs Multinomial)::{:+.2f}'''.format(spearmanr))
#        self.beta_mult_ax.text(0.5,6,corr)
#        self.beta_mult_ax.text(0.5,7,spearmanr)
        
        if self.beta_mult_canvas==None:
            self.beta_mult_canvas =  FigureCanvasTkAgg(self.beta_mult_fig, master=self.CorrelationCanvas)  
        
        self.beta_mult_canvas.get_tk_widget().pack()
        
        self.beta_mult_canvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        
        self.beta_mult_canvas.draw()
        
        self.beta_mult_canvas.draw()
        if self.beta_mult_toolbar==None:
            self.beta_mult_toolbar=tkagg.NavigationToolbar2Tk(self.beta_mult_canvas, self.CorrToolbarFrame)
        
        self.beta_mult_toolbar.update()
        self.CorrToolbarFrame.place(relx=0.03, rely=0.93, relheight=0.05
                , relwidth=0.44)
        self.beta_mult_canvas.get_tk_widget().pack(fill="both", expand=True)
        
#        print('this is where I work')
        #self.HistogramCanvas

###############################################################################
###############################################################################

    def reroll_random(self):
        np.random.seed(None)
        self.analyse()
        np.random.seed(1234)

###############################################################################
###############################################################################

    def preview_equal_aspect(self):
        self.preview_ax.set_aspect(aspect='equal')
        self.previewcanvas.draw()

###############################################################################
###############################################################################
    
    
    def mult_equal_aspect(self):
        self.mult_cont_ax.set_aspect(aspect='equal')
        self.mult_cont_canvas.draw()



     

###############################################################################
###############################################################################
        
    def artificial_data(self):
        c1=(int(float(self.c1_n.get())),float(self.c1_mean.get()),float(self.c1_sigma.get()),
            float(self.c1_xmin.get()), float(self.c1_xmax.get()),float(self.c1_ymin.get()),
            float(self.c1_ymax.get()),self.c1_dist_val.get().lower())
        c2=(int(float(self.c2_n.get())),float(self.c2_mean.get()),float(self.c2_sigma.get()),
            float(self.c2_xmin.get()), float(self.c2_xmax.get()),float(self.c2_ymin.get()),
            float(self.c2_ymax.get()),self.c2_dist_val.get().lower())
        c3=(int(float(self.c3_n.get())),float(self.c3_mean.get()),float(self.c3_sigma.get()),
            float(self.c3_xmin.get()), float(self.c3_xmax.get()),float(self.c3_ymin.get()),
            float(self.c3_ymax.get()),self.c3_dist_val.get().lower())
        c4=(int(float(self.c4_n.get())),float(self.c4_mean.get()),float(self.c4_sigma.get()),
            float(self.c4_xmin.get()), float(self.c4_xmax.get()),float(self.c4_ymin.get()),
            float(self.c4_ymax.get()),self.c4_dist_val.get().lower())
        c5=(int(float(self.c5_n.get())),float(self.c5_mean.get()),float(self.c5_sigma.get()),
            float(self.c5_xmin.get()), float(self.c5_xmax.get()),float(self.c5_ymin.get()),
            float(self.c5_ymax.get()),self.c5_dist_val.get().lower())
        c6=(int(float(self.c6_n.get())),float(self.c6_mean.get()),float(self.c6_sigma.get()),
            float(self.c6_xmin.get()), float(self.c6_xmax.get()),float(self.c6_ymin.get()),
            float(self.c6_ymax.get()),self.c6_dist_val.get().lower())
        
#        print(getattr(np.random, 'uniform')(0,100,100))
        
        
        def generate_random(n,mean,sigma,xmin,xmax,ymin,ymax,dist):
            #this is where I generate an artificial smaple from user inputs
            
            if dist=='normal':
                ran_strike=np.random.normal(loc=mean, scale=sigma, size=n)
            elif dist=='uniform':
                ran_strike=np.random.uniform(low=mean-sigma, high=mean+sigma, size=n)
            
            ran_strike=[x+180  if x<0 else x for x in ran_strike]
            x=np.random.uniform(xmin,xmax,n)
            y=np.random.uniform(ymin,ymax,n)
            np.random.seed(1234)
            
            return np.array([x,y,ran_strike]).T
            
            
        np.random.seed(int(np.around(float(self.random_seed.get()),0)))
        self.c1=generate_random(*c1) if c1[0]>0 else None
        np.random.seed(int(np.around(float(self.random_seed.get()),0)+1))
        self.c2=generate_random(*c2) if c2[0]>0 else  None
        np.random.seed(int(np.around(float(self.random_seed.get()),0)+2))
        self.c3=generate_random(*c3) if c3[0]>0 else  None
        np.random.seed(int(np.around(float(self.random_seed.get()),0)+3))
        self.c4=generate_random(*c4) if c4[0]>0 else None
        np.random.seed(int(np.around(float(self.random_seed.get()),0)+4))
        self.c5=generate_random(*c5) if c5[0]>0 else  None
        np.random.seed(int(np.around(float(self.random_seed.get()),0)+5))
        self.c6=generate_random(*c6) if c6[0]>0 else  None
        
        if self.c1 is not None:
            self.random_sample=self.c1
        elif self.c2 is not None:
            self.random_sample=self.c2
        elif self.c3 is not None:
            self.random_sample=self.c3
        elif self.c4 is not None:
            self.random_sample=self.c4
        elif self.c5 is not None:
            self.random_sample=self.c5
        elif self.c6 is not None:
            self.random_sample=self.c6
            
        
        
        if self.c2 is not None: self.random_sample=np.append(self.random_sample,self.c2, axis=0)
        if self.c3 is not None: self.random_sample=np.append(self.random_sample,self.c3, axis=0)
        if self.c4 is not None: self.random_sample=np.append(self.random_sample,self.c4, axis=0)
        if self.c5 is not None: self.random_sample=np.append(self.random_sample,self.c5, axis=0)
        if self.c6 is not None: self.random_sample=np.append(self.random_sample,self.c6, axis=0)
        
        
        
        self.random_sample=self.random_sample.T
        
        self.artificial_sample_plot()
        self.plot_bin_spin_art()
        
###############################################################################
###############################################################################

 
    def artificial_sample_plot(self):
        
        if self.artificial_fig==None:
            self.artificial_fig=Figure()
        if self.artificial_ax==None:
            self.artificial_ax=self.artificial_fig.add_subplot(111)
        
#        sample_x=self.random_sample[0,:]
#        sample_y=self.random_sample[1,:]
        
        self.artificial_ax.cla()
#        self.artificial_ax.scatter(sample_x,sample_y,s=0.5,marker='o',c='g',alpha=0.8)
        if self.c1 is not None: self.artificial_ax.quiver(self.c1[:,0], self.c1[:,1], 1,1, angles=-1*self.c1[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.c2 is not None: self.artificial_ax.quiver(self.c2[:,0], self.c2[:,1], 1,1, angles=-1*self.c2[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.c3 is not None: self.artificial_ax.quiver(self.c3[:,0], self.c3[:,1], 1,1, angles=-1*self.c3[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.c4 is not None: self.artificial_ax.quiver(self.c4[:,0], self.c4[:,1], 1,1, angles=-1*self.c4[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.c5 is not None: self.artificial_ax.quiver(self.c5[:,0], self.c5[:,1], 1,1, angles=-1*self.c5[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        if self.c6 is not None: self.artificial_ax.quiver(self.c6[:,0], self.c6[:,1], 1,1, angles=-1*self.c6[:,2]+90, scale=0.1,
                                                    units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0)
        self.artificial_ax.set_ylabel('y')
        self.artificial_ax.set_xlabel('x')
        self.artificial_ax.set_title('Randomly Generated Sample')
        
        self.artificial_ax.set_aspect(aspect='equal')
        if self.artifical_canvas==None:
            self.artifical_canvas =  FigureCanvasTkAgg(self.artificial_fig, master=self.Artificial_Sample_Canvas)        
        self.artifical_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.artifical_canvas._tkcanvas.config(highlightthickness=5, highlightcolor ='black')
        self.artifical_canvas.draw()
        if self.use_rand_val.get()==1: self.load_file()
        
###############################################################################
###############################################################################
        

    def reset_random(self):
        self.c1_n.delete(0, 'end')
        self.c1_mean.delete(0, 'end')
        self.c1_sigma.delete(0, 'end')
        self.c1_xmin.delete(0, 'end')
        self.c1_xmax.delete(0, 'end')
        self.c1_ymin.delete(0, 'end')
        self.c1_ymax.delete(0, 'end')
        
        self.c2_n.delete(0, 'end')
        self.c2_mean.delete(0, 'end')
        self.c2_sigma.delete(0, 'end')
        self.c2_xmin.delete(0, 'end')
        self.c2_xmax.delete(0, 'end')
        self.c2_ymin.delete(0, 'end')
        self.c2_ymax.delete(0, 'end')
        
        self.c3_n.delete(0, 'end')
        self.c3_mean.delete(0, 'end')
        self.c3_sigma.delete(0, 'end')
        self.c3_xmin.delete(0, 'end')
        self.c3_xmax.delete(0, 'end')
        self.c3_ymin.delete(0, 'end')
        self.c3_ymax.delete(0, 'end')
        
        self.c4_n.delete(0, 'end')
        self.c4_mean.delete(0, 'end')
        self.c4_sigma.delete(0, 'end')
        self.c4_xmin.delete(0, 'end')
        self.c4_xmax.delete(0, 'end')
        self.c4_ymin.delete(0, 'end')
        self.c4_ymax.delete(0, 'end')
        
        self.c5_n.delete(0, 'end')
        self.c5_mean.delete(0, 'end')
        self.c5_sigma.delete(0, 'end')
        self.c5_xmin.delete(0, 'end')
        self.c5_xmax.delete(0, 'end')
        self.c5_ymin.delete(0, 'end')
        self.c5_ymax.delete(0, 'end')
        
        self.c6_n.delete(0, 'end')
        self.c6_mean.delete(0, 'end')
        self.c6_sigma.delete(0, 'end')
        self.c6_xmin.delete(0, 'end')
        self.c6_xmax.delete(0, 'end')
        self.c6_ymin.delete(0, 'end')
        self.c6_ymax.delete(0, 'end')
        
        
        self.c1_n.insert('end',0)
        self.c1_mean.insert('end',0)
        self.c1_sigma.insert('end',0)
        self.c1_xmin.insert('end',0)
        self.c1_xmax.insert('end',0)
        self.c1_ymin.insert('end',0)
        self.c1_ymax.insert('end',0)
        
        self.c2_n.insert('end',0)
        self.c2_mean.insert('end',0)
        self.c2_sigma.insert('end',0)
        self.c2_xmin.insert('end',0)
        self.c2_xmax.insert('end',0)
        self.c2_ymin.insert('end',0)
        self.c2_ymax.insert('end',0)
        
        self.c3_n.insert('end',0)
        self.c3_mean.insert('end',0)
        self.c3_sigma.insert('end',0)
        self.c3_xmin.insert('end',0)
        self.c3_xmax.insert('end',0)
        self.c3_ymin.insert('end',0)
        self.c3_ymax.insert('end',0)
        
        self.c4_n.insert('end',0)
        self.c4_mean.insert('end',0)
        self.c4_sigma.insert('end',0)
        self.c4_xmin.insert('end',0)
        self.c4_xmax.insert('end',0)
        self.c4_ymin.insert('end',0)
        self.c4_ymax.insert('end',0)
        
        self.c5_n.insert('end',0)
        self.c5_mean.insert('end',0)
        self.c5_sigma.insert('end',0)
        self.c5_xmin.insert('end',0)
        self.c5_xmax.insert('end',0)
        self.c5_ymin.insert('end',0)
        self.c5_ymax.insert('end',0)
        
        self.c6_n.insert('end',0)
        self.c6_mean.insert('end',0)
        self.c6_sigma.insert('end',0)
        self.c6_xmin.insert('end',0)
        self.c6_xmax.insert('end',0)
        self.c6_ymin.insert('end',0)
        self.c6_ymax.insert('end',0)
    
###############################################################################
###############################################################################

    def plot_frac_dense_mult(self):
        if self.frac_mult_fig==None:
            self.frac_mult_fig=Figure()
        if self.frac_mult_ax==None:
            self.frac_mult_ax=self.frac_mult_fig.add_subplot(111)
            
        self.frac_mult_ax.cla() #clear the figure to start afresh
        
        #this is the actual scatter plot of the Beta Vs Multinomial
        self.frac_mult_ax.scatter(self.output_df['Fracture Density'].values, 
                                  self.output_df['Multinomial'].values, 
                                  alpha=0.1, c='r',
                                  edgecolors='none', s=10)
        corr=np.corrcoef(self.output_df['Fracture Density'], self.output_df['Multinomial'])[0,1]
        self.frac_mult_ax.set_title('Correlation={:+.3f}'.format(corr), fontsize=9)
        self.frac_mult_ax.set_ylabel('Multinomial')
        self.frac_mult_ax.set_xlabel('Fracture Density')
        
#        spearmanr=stats.spearmanr(self.output_df['Beta'], self.output_df['Multinomial'])[0]
#        
#        self.PearsonLabel.configure(text='Pearson Correlation (Beta vs Multinomial):{:+.2f}'.format(corr))
#        self.FrontPearsonLabel.configure(text='Multinomial vs. Beta Pearson R:{:+.2f}'.format(corr))
#        self.SpearmanLabel.configure(text='''Spearman Correlation (Beta vs Multinomial)::{:+.2f}'''.format(spearmanr))
#        self.frac_mult_ax.text(0.5,6,corr)
#        self.frac_mult_ax.text(0.5,7,spearmanr)
        
        if self.frac_mult_canvas==None:
            self.frac_mult_canvas =  FigureCanvasTkAgg(self.frac_mult_fig, master=self.FracDenseMultCanvas)  
        
        self.frac_mult_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.frac_mult_canvas._tkcanvas.config(highlightthickness=1, highlightcolor ='black')
        
        self.frac_mult_canvas.draw()
        
#        self.frac_mult_canvas.draw()
#        if self.frac_mult_toolbar==None:
#            self.frac_mult_toolbar=tkagg.NavigationToolbar2Tk(self.frac_mult_canvas, self.FracDenseMultCanvas)
#        
#        self.frac_mult_toolbar.update()
#        self.CorrToolbarFrame.place(relx=0.03, rely=0.93, relheight=0.05
#                , relwidth=0.44)
#        self.frac_mult_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        
###############################################################################
###############################################################################

    def plot_frac_dense_beta(self):
        if self.frac_beta_fig==None:
            self.frac_beta_fig=Figure()
        if self.frac_beta_ax==None:
            self.frac_beta_ax=self.frac_beta_fig.add_subplot(111)
            
        self.frac_beta_ax.cla() #clear the figure to start afresh
        
        #this is the actual scatter plot of the Beta Vs betainomial
        self.frac_beta_ax.scatter(self.output_df['Fracture Density'].values, 
                                  self.output_df['Beta'].values, 
                                  alpha=0.1, c='r',
                                  edgecolors='none', s=10)
        corr=np.corrcoef(self.output_df['Fracture Density'], self.output_df['Beta'])[0,1]
        self.frac_beta_ax.set_title('Correlation={:+.3f}'.format(corr), fontsize=9)
        self.frac_beta_ax.set_ylabel('Beta')
        self.frac_beta_ax.set_xlabel('Fracture Density')
        
        
        if self.frac_beta_canvas==None:
            self.frac_beta_canvas =  FigureCanvasTkAgg(self.frac_beta_fig, master=self.FracBetaCanvas)  
        
        self.frac_beta_canvas.get_tk_widget().pack(fill="both", expand=True)
        
        self.frac_beta_canvas._tkcanvas.config(highlightthickness=1, highlightcolor ='black')
        
        self.frac_beta_canvas.draw()
        
#        self.frac_mult_canvas.draw()
#        if self.frac_mult_toolbar==None:
#            self.frac_mult_toolbar=tkagg.NavigationToolbar2Tk(self.frac_mult_canvas, self.FracDenseMultCanvas)
#        
#        self.frac_mult_toolbar.update()
#        self.CorrToolbarFrame.place(relx=0.03, rely=0.93, relheight=0.05
#                , relwidth=0.44)
#        self.frac_mult_canvas.get_tk_widget().pack(fill="both", expand=True)
        
###############################################################################
###############################################################################

    def artificial_out(self):
        if self.random_sample is not None:
            pd.DataFrame(self.random_sample,index=['x','y','strike']).T.to_csv(asksaveasfilename())
        
        
        
    def testit(self,x,y,z):
        '''Use this to test out functions'''
        print('ran')
#        self.ax.set_theta_direction(1)
#        self.binspin_fig.add_subplot(111, projection='polar')
#        self.canvas.draw()
        

        
###############################################################################
###############################################################################   


if __name__ == '__main__':
    vp_start_gui()
#! /usr/bin/env python #  -*- coding: utf-8 -*- # # GUI module generated by PAGE version 4.20 #  in conjunction with Tcl version 8.6 #    Feb 01, 2019 12:08:48 PM MST  platform: Windows NT ############################################################################### ############################################################################### #need to add in #from pykrige.uk import UniversalKriging #from tkinter import * ############################################################################### ############################################################################### Starting point when module is the main routine. #    root.resizable(False, False) Starting point when module is imported by another program. #gotta initialize a bunch of vars so I can check if they exist later ################################################ ################################################ ################################################ ################################################ ################################################ ################################################ ################################################ ################################################ This class configures and populates the toplevel window.
            top is the toplevel containing window. # X11 color: 'gray85' # X11 color: 'black' # X11 color: 'gray85' # X11 color: 'gray85' # Closest X11 color: 'gray92' #        self.TNotebook1.configure(height=1024) ############################################################################### #             Want to get rid of this tab cuz not using it for now ############################################################################### ############################################################################### ############################################################################### #make sure this has command updateValue ############################################################################### ############################################################################### ############################################################################### ############################################################################### #make sure this has command keep original ############################################################################### ############################################################################### ############################################################################### ############################################################################### #addded a scale here to show number of grid node #and a fram to put the tool bar in ############################################################################### ############################################################################### Grid Parameters Average Distance to nth Fracture: Multinomial vs. Beta Pearson R: Note: Only need to change the x value. The rest will update to keep aspect ratio. Multinomial Parameters Neighbors to Avg ####################################################################################### #    Changing label to cuttof checkbox ###################################################################################### #        self.Label1_4 = tk.Label(self.TNotebook1_t0) #        self.Label1_4.place(relx=0.157, rely=0.183, height=21, width=49) #        self.Label1_4.configure(activebackground="#86bad8") #        self.Label1_4.configure(activeforeground="black") #        self.Label1_4.configure(background="#86bad8") #        self.Label1_4.configure(disabledforeground="#a3a3a3") #        self.Label1_4.configure(foreground="#000000") #        self.Label1_4.configure(highlightbackground="#d9d9d9") #        self.Label1_4.configure(highlightcolor="black") #        self.Label1_4.configure(justify='left') #        self.Label1_4.configure(text='''Cuttoff r''') Cuttoff r #        self.cuttoff_r=DoubleVar(self.TNotebook1_t0) #        self.cuttoff_r.configure(variable=self.cuttoff_r) Beta Parameters Theta Dominant Fracture \n Set Median Spread (1 sigma) ##################################################################################### Recommended Theta Bin Rotation Bin Center Analyse Sample Quit Export to Excel Note: This unexplored paramter will shift how the bin counts work. Recommend no spin or dominant fracture set mean. Custom Bins ############################################################################### # Addedd cuttoff radius checkbox option ############################################################################## Load File Current Sample File ################################################################## #added this extra button to make the plot 1 to one if you want. 1:1 Aspect Ratio ################################################################## #added this extra button to make the multinomial contour one to one if you want. 1:1 Aspect Ratio ################################################################################ ################################################################################ ################################################################################ #Here I changed a bunch of stuff ot be on a new tab because the main #was getting too crowded. ############################################################################### Artificial Dataset Creation mean sigma y min x min mean sigma Distribution y max y max x min x max y min Distribution n(c1) n(c2) n(c3) n(c4) n(c5) n(c6) mean mean mean mean sigma sigma sigma sigma x min x min x min x min x max x max x max x max x max y max y max y max y max y min y min y min y min Generate Artificial Sample Export Artificial Sample random seed Use Random \n Sample Reset Artificial Sample Distribution Distribution Distribution Distribution ################################################################################ ################################################################################ ################################################################################ #        tkagg.NavigationToolbar2Tk(self.PreviewCanvas, self.TNotebook1_t0) Preview Grid ############################################################################### ######################################################################## #        self.current_filename.set('U:/PLAN/BCUBRICH/Python/Fracture MODO/sample.txt') #        self.load_file() ############################################################################### GET ############################################################################### #added frame for toolbars ############################################################################### ############################################################################### #added frame for toolbars ############################################################################### Update #        self.Export_m1 = tk.Button(self.TNotebook1_t1) #        self.Export_m1.place(relx=0.059, rely=0.233, height=24, width=49) #        self.Export_m1.configure(activebackground="#ececec") #        self.Export_m1.configure(activeforeground="#000000") #        self.Export_m1.configure(background="#ffae21") #        self.Export_m1.configure(disabledforeground="#a3a3a3") #        self.Export_m1.configure(foreground="#000000") #        self.Export_m1.configure(highlightbackground="#d9d9d9") #        self.Export_m1.configure(highlightcolor="black") #        self.Export_m1.configure(pady="0") #        self.Export_m1.configure(takefocus="0") #        self.Export_m1.configure(text='''Export''') Update # #        self.Export_m2 = tk.Button(self.TNotebook1_t1) #        self.Export_m2.place(relx=0.539, rely=0.225, height=24, width=49) #        self.Export_m2.configure(activebackground="#ececec") #        self.Export_m2.configure(activeforeground="#000000") #        self.Export_m2.configure(background="#ffae21") #        self.Export_m2.configure(disabledforeground="#a3a3a3") #        self.Export_m2.configure(foreground="#000000") #        self.Export_m2.configure(highlightbackground="#d9d9d9") #        self.Export_m2.configure(highlightcolor="black") #        self.Export_m2.configure(pady="0") #        self.Export_m2.configure(takefocus="0") #        self.Export_m2.configure(text='''Export''') Beta Contour Settings Color Ramp Color Ramp Multinomial Contour Settings ############################################################################### #                          Added slider for multinomial strike size ############################################################################## ############################################################################### #            Added slider for multinomial point size scale on point plot ############################################################################## ############################################################################### #                          Added slider for  betastrike size ############################################################################## ############################################################################### #             7/10/20 Added slider for  betastrike size ############################################################################## ############################################################################## ############################################################################## Chart Title X Label #        self.beta_chart_x_name = tk.Entry(self.TNotebook1_t1) #        self.beta_chart_x_name.place(relx=0.289, rely=0.192, height=20 #                , relwidth=0.112) #        self.beta_chart_x_name.configure(background="white") #        self.beta_chart_x_name.configure(disabledforeground="#a3a3a3") #        self.beta_chart_x_name.configure(font=font10) #        self.beta_chart_x_name.configure(foreground="#000000") #        self.beta_chart_x_name.configure(highlightbackground="#d9d9d9") #        self.beta_chart_x_name.configure(highlightcolor="black") #        self.beta_chart_x_name.configure(insertbackground="black") #        self.beta_chart_x_name.configure(selectbackground="#c4c4c4") #        self.beta_chart_x_name.configure(selectforeground="black") #        self.beta_chart_x_name.configure(takefocus="0") Y Label Axis Labels Chart Title Max Num Y Label X Label #        self.mult_plot_rng_scale = tk.Checkbutton(self.TNotebook1_t1) #        self.mult_plot_rng_scale.place(relx=0.25, rely=0.242, relheight=0.042 #                , relwidth=0.089) #        self.mult_plot_rng_scale.configure(activebackground="#ececec") #        self.mult_plot_rng_scale.configure(activeforeground="#000000") #        self.mult_plot_rng_scale.configure(background="#86bad8") #        self.mult_plot_rng_scale.configure(disabledforeground="#a3a3a3") #        self.mult_plot_rng_scale.configure(foreground="#000000") #        self.mult_plot_rng_scale.configure(highlightbackground="#d9d9d9") #        self.mult_plot_rng_scale.configure(highlightcolor="black") #        self.mult_plot_rng_scale.configure(justify='left') #        self.mult_plot_rng_scale.configure(text='''Range Scale''') #        self.mult_plot_rng_scale.configure(variable=GUI_support.che49) Max Range Custom Axis Labels Beta Plot Settings Beta Contour Settings #        self.Label32 = tk.Label(self.TNotebook1_t2) #        self.Label32.place(relx=0.167, rely=0.083, height=21, width=64) #        self.Label32.configure(activebackground="#f9f9f9") #        self.Label32.configure(activeforeground="black") #        self.Label32.configure(background="#86bad8") #        self.Label32.configure(disabledforeground="#a3a3a3") #        self.Label32.configure(foreground="#000000") #        self.Label32.configure(highlightbackground="#d9d9d9") #        self.Label32.configure(highlightcolor="black") #        self.Label32.configure(text='''Marker Size''') Color Ramp Chart Title Y Label Color Ramp Chart Title X Label Y Label Axis Labels Axis Labels #        self.mult_plot_rng_scale = tk.Checkbutton(self.TNotebook1_t2) #        self.mult_plot_rng_scale.place(relx=0.255, rely=0.233, relheight=0.042 #                , relwidth=0.089) #        self.mult_plot_rng_scale.configure(activebackground="#ececec") #        self.mult_plot_rng_scale.configure(activeforeground="#000000") #        self.mult_plot_rng_scale.configure(background="#86bad8") #        self.mult_plot_rng_scale.configure(disabledforeground="#a3a3a3") #        self.mult_plot_rng_scale.configure(foreground="#000000") #        self.mult_plot_rng_scale.configure(highlightbackground="#d9d9d9") #        self.mult_plot_rng_scale.configure(highlightcolor="black") #        self.mult_plot_rng_scale.configure(justify='left') #        self.mult_plot_rng_scale.configure(text='''Range Scale''') #        self.mult_plot_rng_scale.configure(variable=GUI_support.che65) # #        self.mult_plot_rng_scale = tk.Checkbutton(self.TNotebook1_t2) #        self.mult_plot_rng_scale.place(relx=0.775, rely=0.225, relheight=0.042 #                , relwidth=0.089) #        self.mult_plot_rng_scale.configure(activebackground="#ececec") #        self.mult_plot_rng_scale.configure(activeforeground="#000000") #        self.mult_plot_rng_scale.configure(background="#86bad8") #        self.mult_plot_rng_scale.configure(disabledforeground="#a3a3a3") #        self.mult_plot_rng_scale.configure(foreground="#000000") #        self.mult_plot_rng_scale.configure(highlightbackground="#d9d9d9") #        self.mult_plot_rng_scale.configure(highlightcolor="black") #        self.mult_plot_rng_scale.configure(justify='left') #        self.mult_plot_rng_scale.configure(text='''Range Scale''') #        self.mult_plot_rng_scale.configure(variable=GUI_support.che66) #        self.beta_plot_marker_size = tk.Entry(self.TNotebook1_t2) #        self.beta_plot_marker_size.place(relx=0.167, rely=0.117, height=20 #                , relwidth=0.112) #        self.beta_plot_marker_size.configure(background="white") #        self.beta_plot_marker_size.configure(disabledforeground="#a3a3a3") #        self.beta_plot_marker_size.configure(font=font10) #        self.beta_plot_marker_size.configure(foreground="#000000") #        self.beta_plot_marker_size.configure(highlightbackground="#d9d9d9") #        self.beta_plot_marker_size.configure(highlightcolor="black") #        self.beta_plot_marker_size.configure(insertbackground="black") #        self.beta_plot_marker_size.configure(selectbackground="#c4c4c4") #        self.beta_plot_marker_size.configure(selectforeground="black") #        self.beta_plot_marker_size.configure(takefocus="0") X Label Update Update #        self.Export_b11 = tk.Button(self.TNotebook1_t2) #        self.Export_b11.place(relx=0.054, rely=0.233, height=24, width=49) #        self.Export_b11.configure(activebackground="#ececec") #        self.Export_b11.configure(activeforeground="#000000") #        self.Export_b11.configure(background="#ffae21") #        self.Export_b11.configure(disabledforeground="#a3a3a3") #        self.Export_b11.configure(foreground="#000000") #        self.Export_b11.configure(highlightbackground="#d9d9d9") #        self.Export_b11.configure(highlightcolor="black") #        self.Export_b11.configure(pady="0") #        self.Export_b11.configure(takefocus="0") #        self.Export_b11.configure(text='''Export''') #        self.Export_b2 = tk.Button(self.TNotebook1_t2) #        self.Export_b2.place(relx=0.569, rely=0.217, height=24, width=49) #        self.Export_b2.configure(activebackground="#ececec") #        self.Export_b2.configure(activeforeground="#000000") #        self.Export_b2.configure(background="#ffae21") #        self.Export_b2.configure(disabledforeground="#a3a3a3") #        self.Export_b2.configure(foreground="#000000") #        self.Export_b2.configure(highlightbackground="#d9d9d9") #        self.Export_b2.configure(highlightcolor="black") #        self.Export_b2.configure(pady="0") #        self.Export_b2.configure(takefocus="0") #        self.Export_b2.configure(text='''Export''') #This is the dropdown menu for multinomial point plot cmap Fracture Density Log Fracture Density Uniform Strike Multinomial Reroll Uniform Data Uniform Strike Beta #        self.FracDenseMultCanvas.configure(width=323) Fracture Density Vs Beta #        self.FracBetaCanvas.configure(width=323) #        self.FracDensityExport = tk.Button(self.TNotebook1_t3) #        self.FracDensityExport.place(relx=0.279, rely=0.017, height=24, width=44) #        self.FracDensityExport.configure(activebackground="#ececec") #        self.FracDensityExport.configure(activeforeground="#000000") #        self.FracDensityExport.configure(background="#ffae21") #        self.FracDensityExport.configure(disabledforeground="#a3a3a3") #        self.FracDensityExport.configure(foreground="#000000") #        self.FracDensityExport.configure(highlightbackground="#d9d9d9") #        self.FracDensityExport.configure(highlightcolor="black") #        self.FracDensityExport.configure(pady="0") #        self.FracDensityExport.configure(text='''Export''') #        self.LogFracDensityExport = tk.Button(self.TNotebook1_t3) #        self.LogFracDensityExport.place(relx=0.623, rely=0.017, height=24 #                , width=44) #        self.LogFracDensityExport.configure(activebackground="#ececec") #        self.LogFracDensityExport.configure(activeforeground="#000000") #        self.LogFracDensityExport.configure(background="#ffae21") #        self.LogFracDensityExport.configure(disabledforeground="#a3a3a3") #        self.LogFracDensityExport.configure(foreground="#000000") #        self.LogFracDensityExport.configure(highlightbackground="#d9d9d9") #        self.LogFracDensityExport.configure(highlightcolor="black") #        self.LogFracDensityExport.configure(pady="0") #        self.LogFracDensityExport.configure(text='''Export''') #        self.UniformExport = tk.Button(self.TNotebook1_t3) #        self.UniformExport.place(relx=0.926, rely=0.5, height=24, width=44) #        self.UniformExport.configure(activebackground="#ececec") #        self.UniformExport.configure(activeforeground="#000000") #        self.UniformExport.configure(background="#ffae21") #        self.UniformExport.configure(disabledforeground="#a3a3a3") #        self.UniformExport.configure(foreground="#000000") #        self.UniformExport.configure(highlightbackground="#d9d9d9") #        self.UniformExport.configure(highlightcolor="black") #        self.UniformExport.configure(pady="0") #        self.UniformExport.configure(text='''Export''') #        self.LogFracDensityExport = tk.Button(self.TNotebook1_t3) #        self.LogFracDensityExport.place(relx=0.157, rely=0.617, height=24 #                , width=44) #        self.LogFracDensityExport.configure(activebackground="#ececec") #        self.LogFracDensityExport.configure(activeforeground="#000000") #        self.LogFracDensityExport.configure(background="#ffae21") #        self.LogFracDensityExport.configure(disabledforeground="#a3a3a3") #        self.LogFracDensityExport.configure(foreground="#000000") #        self.LogFracDensityExport.configure(highlightbackground="#d9d9d9") #        self.LogFracDensityExport.configure(highlightcolor="black") #        self.LogFracDensityExport.configure(pady="0") #        self.LogFracDensityExport.configure(text='''Export''') #        self.LogFracDensityExport = tk.Button(self.TNotebook1_t3) #        self.LogFracDensityExport.place(relx=0.623, rely=0.625, height=24 #                , width=44) #        self.LogFracDensityExport.configure(activebackground="#ececec") #        self.LogFracDensityExport.configure(activeforeground="#000000") #        self.LogFracDensityExport.configure(background="#ffae21") #        self.LogFracDensityExport.configure(disabledforeground="#a3a3a3") #        self.LogFracDensityExport.configure(foreground="#000000") #        self.LogFracDensityExport.configure(highlightbackground="#d9d9d9") #        self.LogFracDensityExport.configure(highlightcolor="black") #        self.LogFracDensityExport.configure(pady="0") #        self.LogFracDensityExport.configure(text='''Export''') Fracture Density vs Multinomial Correlation of Beta and Multinomial Pearson Correlation (Beta vs Multinomial): Spearman Correlation (Beta vs Multinomial): Histogram of Sample vs Uniform #        self.CorrelationExport = tk.Button(self.TNotebook1_t4) #        self.CorrelationExport.place(relx=0.422, rely=0.167, height=24, width=44) #        self.CorrelationExport.configure(activebackground="#ececec") #        self.CorrelationExport.configure(activeforeground="#000000") #        self.CorrelationExport.configure(background="#ffae21") #        self.CorrelationExport.configure(disabledforeground="#a3a3a3") #        self.CorrelationExport.configure(foreground="#000000") #        self.CorrelationExport.configure(highlightbackground="#d9d9d9") #        self.CorrelationExport.configure(highlightcolor="black") #        self.CorrelationExport.configure(pady="0") #        self.CorrelationExport.configure(text='''Export''') #        self.HistogramExport = tk.Button(self.TNotebook1_t4) #        self.HistogramExport.place(relx=0.922, rely=0.167, height=24, width=44) #        self.HistogramExport.configure(activebackground="#ececec") #        self.HistogramExport.configure(activeforeground="#000000") #        self.HistogramExport.configure(background="#ffae21") #        self.HistogramExport.configure(disabledforeground="#a3a3a3") #        self.HistogramExport.configure(foreground="#000000") #        self.HistogramExport.configure(highlightbackground="#d9d9d9") #        self.HistogramExport.configure(highlightcolor="black") #        self.HistogramExport.configure(pady="0") #        self.HistogramExport.configure(text='''Export''') Don't Need Any Settings for Now...But Just in Case Label Label Label Label Label Label Label Check Check Check Check Radio Radio Radio Radio Label Label ############################################################################### ############################################################################### #need to add in #use to tell if need to update ############################################################################### ############################################################################### #get updated value of silder1 ############################################################################### ############################################################################### #get updated value of silder1 #        self.dx+=self.dx/4 #        floor=(np.floor(np.log10(self.dx))) #        if floor<0: #            self.dx=np.around(self.dx+self.dx/5,decimals=int(np.abs(floor))) #            print(self.dx) ############################################################################### ############################################################################### #update value of bar2 ############################################################################### ############################################################################### -----------------------------------------------------------------------
         This next section of code handles reading in a sample file. You can choose
         a csv, tab delimited text, or both .xls and .xlsx type excel files. Some
         errors are raised if there is a problem with the text file, but it is not
         all encompassing. 
         ----------------------------------------------------------------------- ############################################### #activeate this in the final version. easier ot hardcode for now #        filename = tk.filedialog.askopenfilename(title = "Select X, Y, Strike data")      # Open single file ################################################ #                print(type(self.current_filename.get())) 7/10/20
             -----------------------------------
             Ideally I would eventually add something here to actually make sure you gotta data in #                try: #            self.col_len=len(self.sample[:,0]) #            if len(self.sample)==0: #                raise Exception('Your filetype appears to ".csv" or ".txt" but no tab delimited or comma delimited data was found') 7/10/20
         --------------
         Commenting code form about a year ago. The following section handles 
         the creation of a grid around the sample points. The idea is to expand 
         the grid to be 1% larger than the maximum extents of the sample data. 
         I had to modify this on 7/10/20 because the old method didnt work if the
         scale of the data was a lot smaller than the overall scale being used 
         (like UTM) #        self.dy=(self.max_gy-self.min_gy)/self.s2.get() ############################################################################### ############################################################################### #hold ############################################################################### ############################################################################### ############################################################################### ############################################################################### #        plot_bins=[x-360 if x>360 else x for x in plot_bins] ############################################################################### ############################################################################### #this function pretty much calls everything else #        print(self.uniform_sample.shape) #        np.random.seed(1) #        print(len(self.uniform_sample[2,:])) #        print(np.random.uniform(low=0,high=180, size=len(self.sample[2,:]))) ############################################################################### ############################################################################### #        print(filename) #Try to check that we get the write filename, then write the File ############################################################################### ############################################################################### ############################################################################### ############################################################################### #------------------------------------------------------------------------------ #        self.mult_cont_ax.cla() #        xy=np.vstack([self.output_df['x'].values,self.output_df['y'].values]) #i think this is needed for other gridding algorithms #        if grid_n>y_num*50 #            self.cont_grid_x=self.cont_grid_xy[:,0] #            self.cont_grid_y=self.cont_grid_xy[:,1] #----------------------------------------------------- #needed to add this to solve contouring problems #----------------------------------------------------------------- #            print('test') #print(self.cont_grid_y) this rotates the strikes so they are drawn correctly ############################################################################## ############################################################################## ############################################################################## Handle Plotting point plots at sample locations ############################################################################## #------------------------------------------------------------------------------ #        self.mult_point_ax.cla() will probably need this #        if self.mult_point_axis_label_val.get()==1: #            self.mult_point_ax.set_title(self.mult_point_title.get()) #            self.mult_point_ax.set_xlabel(self.mult_point_x_label.get()) #            self.mult_point_ax.set_ylabel(self.mult_point_y_label.get()) #create scatterplot ############################################################################### ############################################################################### ############################################################################### ############################################################################### ############################################################################### ############################################################################### ############################################################################### ############################################################################### ############################################################################### ############################################################################### #update multinomial contour plot with new cmap ############################################################################### ############################################################################### #update multinomial contour plot with new cmap ############################################################################### ############################################################################### #update multinomial contour plot with new cmap ############################################################################### ############################################################################### #this is the code that handles the beta contour plot #------------------------------------------------------------------------------ #if the checkbox is clicked then plot the axis labels this is how the strikes are drawn #neeed to figure out htis toolbar part ############################################################################### ############################################################################### ############################################################################## Handle plotting beta plots at sample locations ############################################################################## #------------------------------------------------------------------------------ #        self.beta_point_ax.cla() will probably need this #        if self.beta_point_axis_label_val.get()==1: #            self.beta_point_ax.set_title(self.beta_point_title.get()) #            self.beta_point_ax.set_xlabel(self.beta_point_x_label.get()) #            self.beta_point_ax.set_ylabel(self.beta_point_y_label.get()) #create scatterplot #        self.mult_slide=False ############################################################################### ############################################################################### #this is the code that handles the fracture density contour plot #------------------------------------------------------------------------------ this is how the strikes are drawn #        angles=self.sample[2,:]+90 #        self.uniform_mult_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.uniform_mult_strike_marker, #          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0) #right now I don't want a toolbar for this #        if self.fdense_toolbar==None: #            self.fdense_toolbar=tkagg.NavigationToolbar2Tk(self.fdense_canvas, self.tab1_fdense_frame) # #        self.fdense_toolbar.update() #        self.tab1_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05 #                , relwidth=0.454) #        self.fdense_canvas.get_tk_widget().pack(fill="both", expand=True) ############################################################################### ############################################################################### #this is the code that handles the fracture density contour plot #------------------------------------------------------------------------------ this is how the strikes are drawn #        angles=self.sample[2,:]+90 #        self.uniform_beta_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.uniform_beta_strike_marker, #          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0) #right now I don't want a toolbar for this #        if self.fdense_toolbar==None: #            self.fdense_toolbar=tkagg.NavigationToolbar2Tk(self.fdense_canvas, self.tab1_fdense_frame) # #        self.fdense_toolbar.update() #        self.tab1_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05 #                , relwidth=0.454) #        self.fdense_canvas.get_tk_widget().pack(fill="both", expand=True) ############################################################################### ############################################################################### #this is the code that handles the fracture density contour plot #------------------------------------------------------------------------------ this is how the strikes are drawn #        angles=self.sample[2,:]+90 #        self.fdense_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.fdense_strike_marker, #          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0) #right now I don't want a toolbar for this #        if self.fdense_toolbar==None: #            self.fdense_toolbar=tkagg.NavigationToolbar2Tk(self.fdense_canvas, self.tab1_fdense_frame) # #        self.fdense_toolbar.update() #        self.tab1_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05 #                , relwidth=0.454) #        self.fdense_canvas.get_tk_widget().pack(fill="both", expand=True) ############################################################################### ############################################################################### #this is the code that handles the fracture density contour plot #------------------------------------------------------------------------------ this is how the strikes are drawn #        angles=self.sample[2,:]+90 #        self.log_fdense_ax.quiver(self.sample[0,:], self.sample[1,:], 1,1, angles=angles, scale=1/self.log_fdense_strike_marker, #          units="dots", color="k", pivot="mid",width=1, headwidth=1, headlength=0) #right now I don't want a toolbar for this #        if self.log_fdense_toolbar==None: #            self.log_fdense_toolbar=tkagg.NavigationToolbar2Tk(self.log_fdense_canvas, self.tab1_log_fdense_frame) # #        self.log_fdense_toolbar.update() #        self.tab1_log_fdense_frame.place(relx=0.020, rely=0.928, relheight=0.05 #                , relwidth=0.454) #        self.log_fdense_canvas.get_tk_widget().pack(fill="both", expand=True) ############################################################################### ############################################################################### #this function updates the plot with a new type of cmap ############################################################################## ############################################################################### Updates bin spin visualization Learned a very important lesson on this one
         1. Plot elements need to be part of the class 'TopLevel1'
         or you cannot refer to them to update them
         2. Need to make sure not re redefine any plot 
         element like 'self.binspin_fig = Figure()' more 
         than once. This will precent you from being able to update
         that plot element later. The first if statements after this
         comment are examples of preventing this error. #        print(plot_bins) # #        print(bins) #also plot the rose on the smaple summary page #        if self.rose_canvas==None: #            self.rose_canvas =  FigureCanvasTkAgg(self.binspin_fig, master=self.RoseCanvas) # #        self.rose_canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=1) #        self.rose_canvas.draw() ############################################################################## ############################################################################### Updates bin spin visualization for the artificial data #        print(plot_bins) # #        print(bins) #also plot the rose on the smaple summary page #        if self.rose_canvas==None: #            self.rose_canvas =  FigureCanvasTkAgg(self.artificial_binspin_fig, master=self.RoseCanvas) # #        self.rose_canvas.get_tk_widget().pack(side=tk.TOP, fill=tk.BOTH, expand=1) #        self.rose_canvas.draw() #self.plot_grid() ############################################################################### ############################################################################### #------------------------------------------------------------------------------ #This next line is very important, it uses permuations to get the grid locs #        print(np.shape(self.grid_xy)) Average Distance to {}th Fracture: {:.5f} #        self.preview_ax.set_aspect(aspect='equal') ############################################################################### ############################################################################### #        print(self.output_df['Multinomial']==self.uniform_df['Multinomial']) #        g._legend.texts.set_text('test') ############################################################################### ############################################################################### #clear the figure to start afresh #this is the actual scatter plot of the Beta Vs Multinomial Spearman Correlation (Beta vs Multinomial)::{:+.2f} #        self.beta_mult_ax.text(0.5,6,corr) #        self.beta_mult_ax.text(0.5,7,spearmanr) #        print('this is where I work') #self.HistogramCanvas ############################################################################### ############################################################################### ############################################################################### ############################################################################### ############################################################################### ############################################################################### ############################################################################### ############################################################################### #        print(getattr(np.random, 'uniform')(0,100,100)) #this is where I generate an artificial smaple from user inputs ############################################################################### ############################################################################### #        sample_x=self.random_sample[0,:] #        sample_y=self.random_sample[1,:] #        self.artificial_ax.scatter(sample_x,sample_y,s=0.5,marker='o',c='g',alpha=0.8) ############################################################################### ############################################################################### ############################################################################### ############################################################################### #clear the figure to start afresh #this is the actual scatter plot of the Beta Vs Multinomial #        spearmanr=stats.spearmanr(self.output_df['Beta'], self.output_df['Multinomial'])[0] # #        self.PearsonLabel.configure(text='Pearson Correlation (Beta vs Multinomial):{:+.2f}'.format(corr)) #        self.FrontPearsonLabel.configure(text='Multinomial vs. Beta Pearson R:{:+.2f}'.format(corr)) #        self.SpearmanLabel.configure(text='''Spearman Correlation (Beta vs Multinomial)::{:+.2f}'''.format(spearmanr)) #        self.frac_mult_ax.text(0.5,6,corr) #        self.frac_mult_ax.text(0.5,7,spearmanr) #        self.frac_mult_canvas.draw() #        if self.frac_mult_toolbar==None: #            self.frac_mult_toolbar=tkagg.NavigationToolbar2Tk(self.frac_mult_canvas, self.FracDenseMultCanvas) # #        self.frac_mult_toolbar.update() #        self.CorrToolbarFrame.place(relx=0.03, rely=0.93, relheight=0.05 #                , relwidth=0.44) #        self.frac_mult_canvas.get_tk_widget().pack(fill="both", expand=True) ############################################################################### ############################################################################### #clear the figure to start afresh #this is the actual scatter plot of the Beta Vs betainomial #        self.frac_mult_canvas.draw() #        if self.frac_mult_toolbar==None: #            self.frac_mult_toolbar=tkagg.NavigationToolbar2Tk(self.frac_mult_canvas, self.FracDenseMultCanvas) # #        self.frac_mult_toolbar.update() #        self.CorrToolbarFrame.place(relx=0.03, rely=0.93, relheight=0.05 #                , relwidth=0.44) #        self.frac_mult_canvas.get_tk_widget().pack(fill="both", expand=True) ############################################################################### ############################################################################### Use this to test out functions #        self.ax.set_theta_direction(1) #        self.binspin_fig.add_subplot(111, projection='polar') #        self.canvas.draw() ############################################################################### ###############################################################################