<commit_before>'''
Created on Jan 18, 2017

@author: lubo
'''

import tkinter as tk
from tkinter import ttk

import scgv.tkviews.mpl_backend  # noqa

from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, \
    NavigationToolbar2TkAgg
from matplotlib.figure import Figure  # @IgnorePep8 @Reimport


class CanvasWindow(object):

    def __init__(self, root, controller, legend=True):
        self.legend = legend
        self.controller = controller

        self.root = root
        self.root.protocol("WM_DELETE_WINDOW", self.on_closing)

        self.fig = Figure(figsize=(12, 8))

        self.content = tk.Frame(self.root)
        self.content.pack(side="top", fill="both", expand=True)

        self.canvas = FigureCanvasTkAgg(self.fig, self.content)
        self.canvas.show()

        toolbar_frame = ttk.Frame(
            self.content,
            # relief='sunken',
            borderwidth=5,
        )
        self.toolbar = NavigationToolbar2TkAgg(self.canvas, toolbar_frame)
        self.toolbar.update()

        self.toolbar_ext = ttk.Frame(
            toolbar_frame,
            # relief='sunken',
            borderwidth=5,
            # width=550
        )
        self.button_ext = ttk.Frame(
            self.content, borderwidth=2,
            # relief='sunken',
            relief='groove',
            # width=550<commit_msg>matplotlib deprecated api updated<commit_after>'''
Created on Jan 18, 2017

@author: lubo
'''

import tkinter as tk
from tkinter import ttk

import scgv.tkviews.mpl_backend  # noqa

from matplotlib.backends.backend_tkagg import FigureCanvasTkAgg, \
    NavigationToolbar2Tk
from matplotlib.figure import Figure  # @IgnorePep8 @Reimport


class CanvasWindow(object):

    def __init__(self, root, controller, legend=True):
        self.legend = legend
        self.controller = controller

        self.root = root
        self.root.protocol("WM_DELETE_WINDOW", self.on_closing)

        self.fig = Figure(figsize=(12, 8))

        self.content = tk.Frame(self.root)
        self.content.pack(side="top", fill="both", expand=True)

        self.canvas = FigureCanvasTkAgg(self.fig, self.content)
        self.canvas.draw()

        toolbar_frame = ttk.Frame(
            self.content,
            # relief='sunken',
            borderwidth=5,
        )
        self.toolbar = NavigationToolbar2Tk(self.canvas, toolbar_frame)
        self.toolbar.update()

        self.toolbar_ext = ttk.Frame(
            toolbar_frame,
            # relief='sunken',
            borderwidth=5,
            # width=550
        )
        self.button_ext = ttk.Frame(
            self.content, borderwidth=2,
            # relief='sunken',
            relief='groove',
            # width=550
{'fraction_non_alphanumeric': 0.10395314787701318, 'fraction_numerical': 0.015373352855051245, 'mean_word_length': 2.2691387559808613, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1051901', 'n_tokens_mistral': 883, 'n_tokens_neox': 819, 'n_words': 160}