Updates to dark theme

This commit is contained in:
LSaldyt
2017-10-21 13:38:38 -07:00
parent f51525450d
commit 95eb1a0b97
5 changed files with 14113 additions and 88537 deletions

102616
copycat.log

File diff suppressed because it is too large Load Diff

View File

@ -17,8 +17,6 @@ font2 = ('Helvetica', str(font2Size))
style = dict(background='black', style = dict(background='black',
foreground='white', foreground='white',
borderwidth=5,
relief=tk.GROOVE,
font=font2) font=font2)
class MainApplication(ttk.Frame): class MainApplication(ttk.Frame):

View File

@ -11,14 +11,12 @@ font2 = ('Helvetica', str(font2Size))
style = dict(background='black', style = dict(background='black',
foreground='white', foreground='white',
borderwidth=5,
relief=tk.GROOVE,
font=font2) font=font2)
def create_main_canvas(root, initial, final, new, guess): def create_main_canvas(root, initial, final, new, guess):
padding = 100 padding = 100
canvas = tk.Canvas(root, borderwidth=5, relief=tk.GROOVE, background='#70747a') canvas = tk.Canvas(root, background='black')
def add_sequences(sequences, x, y): def add_sequences(sequences, x, y):
for sequence in sequences: for sequence in sequences:

View File

@ -10,28 +10,27 @@ import time
import matplotlib.animation as animation import matplotlib.animation as animation
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
plt.style.use('dark_background')
LARGE_FONT = ('Verdana', 20) LARGE_FONT = ('Verdana', 20)
plt.style.use('dark_background')
class StatusFrame(tk.Frame): class StatusFrame(tk.Frame):
def __init__(self, parent, status, title): def __init__(self, parent, status, title, toolbar=False):
self.status = status self.status = status
tk.Frame.__init__(self, parent) tk.Frame.__init__(self, parent)
label = tk.Label(self, text=title, font=LARGE_FONT) self.canvas = FigureCanvasTkAgg(status.figure, self)
label.pack(pady=10,padx=10) self.canvas.show()
self.canvas.get_tk_widget().pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True)
canvas = FigureCanvasTkAgg(status.figure, self)
canvas.show()
canvas.get_tk_widget().pack(side=tk.BOTTOM, fill=tk.BOTH, expand=True)
toolbar = NavigationToolbar2TkAgg(canvas, self)
toolbar.update()
canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
self.animation = animation.FuncAnimation(status.figure, lambda i : status.update_plots(i), interval=1000) self.animation = animation.FuncAnimation(status.figure, lambda i : status.update_plots(i), interval=1000)
if toolbar:
toolbar = NavigationToolbar2TkAgg(self.canvas, self)
toolbar.update()
self.canvas._tkcanvas.pack(side=tk.TOP, fill=tk.BOTH, expand=True)
class Status(object): class Status(object):
def __init__(self): def __init__(self):
@ -39,10 +38,12 @@ class Status(object):
self.subplot = self.figure.add_subplot(111) self.subplot = self.figure.add_subplot(111)
self.x = [] self.x = []
self.y = [] self.y = []
self.update_plots(0)
def update_plots(self, i): def update_plots(self, i):
self.subplot.clear() self.subplot.clear()
self.subplot.plot(self.x, self.y) with plt.style.context(('dark_background')):
self.subplot.plot(self.x, self.y)
if __name__ == '__main__': if __name__ == '__main__':
app = tk.Tk() app = tk.Tk()

View File

@ -2,6 +2,7 @@ import matplotlib.pyplot as plt; plt.rcdefaults()
import numpy as np import numpy as np
import matplotlib.pyplot as plt import matplotlib.pyplot as plt
plt.style.use('dark_background')
def plot_answers(answers): def plot_answers(answers):
answers = sorted(answers.items(), key=lambda kv : kv[1]['count']) answers = sorted(answers.items(), key=lambda kv : kv[1]['count'])