Beispiel #1
0
def MI():
    f = plt.figure(1)
    plt.bar(left, list(IDict.values()), tick_label=list(IDict.keys()), width=0.8, color=['red', 'green'])
    plt.xlabel('Months')
    plt.ylabel('Income')
    plt.title('Month vs Income')
    f.show()
Beispiel #2
0
 def open_file_dialog(self):
     """
     A function to open a new window for choosing an experimental script.
     """
     filedialog = QFileDialog(self, 'Open File', directory = self.path, filter ="python (*.py)",\
         options=QtWidgets.QFileDialog.DontUseNativeDialog)
     # use QFileDialog.DontUseNativeDialog to change directory
     filedialog.setStyleSheet(
         "QWidget { background-color : rgb(42, 42, 64); color: rgb(211, 194, 78);}"
     )
     filedialog.setFileMode(QtWidgets.QFileDialog.AnyFile)
     filedialog.fileSelected.connect(self.open_file)
     filedialog.show()
Beispiel #3
0
def Addincome():
    a=SMONTH.get()
    b=Source_of_Income.get()
    c=Income.get()
    income_data = [a, b,c]
    TV1.insert('', 'end', values=income_data)
    IDict[a]=IDict[a]+c
    if plt.fignum_exists(1):
        f = plt.figure(1)
        plt.bar(left, list(IDict.values()), tick_label=list(IDict.keys()), width=0.8, color=['red', 'green'])
        plt.xlabel('Months')
        plt.ylabel('Income')
        plt.title('Month vs Income')
        f.show()
Beispiel #4
0
def clear_income_data():
    TV1.delete(*TV1.get_children())
    global IDict
    IDict = {'Jan': 0, 'Feb': 0, 'Mar': 0, 'Apr': 0, 'May': 0, 'Jun': 0, 'Jul': 0, 'Aug': 0, 'Sep': 0, 'Oct': 0,
             'Nov': 0, 'Dec': 0}
    if plt.fignum_exists(1):
        f = plt.figure(1)
        plt.bar(left, list(IDict.values()), tick_label=list(IDict.keys()), width=0.8, color=['red', 'green'])
        plt.xlabel('Months')
        plt.ylabel('Income')
        plt.title('Month vs Income')
        plt.clf()
        f = plt.figure(1)
        plt.bar(left, list(IDict.values()), tick_label=list(IDict.keys()), width=0.8, color=['red', 'green'])
        plt.xlabel('Months')
        plt.ylabel('Income')
        plt.title('Month vs Income')
        f.show()
Beispiel #5
0
def Deleteincome():
    a = TV1.item(TV1.selection())['values'][0]
    c = TV1.item(TV1.selection())['values'][2]
    IDict[a] = IDict[a] - c
    if plt.fignum_exists(1):
        f = plt.figure(1)
        plt.bar(left, list(IDict.values()), tick_label=list(IDict.keys()), width=0.8, color=['red', 'green'])
        plt.xlabel('Months')
        plt.ylabel('Income')
        plt.title('Month vs Income')
        plt.clf()
        f = plt.figure(1)
        plt.bar(left, list(IDict.values()), tick_label=list(IDict.keys()), width=0.8, color=['red', 'green'])
        plt.xlabel('Months')
        plt.ylabel('Income')
        plt.title('Month vs Income')
        f.show()

    TV1.delete(TV1.selection())