  #!/usr/bin python3
  """ Graph functions for Display Frame of the Faceswap GUI """
  import datetime
  import logging
  import os
  import tkinter as tk
  
 
</s> remove # pylint: disable=wrong-import-position
matplotlib.use("TkAgg")

from matplotlib import style  # noqa
from matplotlib.figure import Figure  # noqa
from matplotlib.backends.backend_tkagg import (FigureCanvasTkAgg,  # noqa
 </s> add from matplotlib import style
from matplotlib.figure import Figure
from matplotlib.backends.backend_tkagg import (FigureCanvasTkAgg, </s> remove from .custom_widgets import Tooltip  # noqa
from .utils import get_config, get_images, LongRunningTask  # noqa

logger = logging.getLogger(__name__)  # pylint: disable=invalid-name


class NavigationToolbar(NavigationToolbar2Tk):  # pylint: disable=too-many-ancestors
    """ Same as default, but only including buttons we need
        with custom icons and layout
        From: https://stackoverflow.com/questions/12695678 """
    toolitems = [t for t in NavigationToolbar2Tk.toolitems if
                 t[0] in ("Home", "Pan", "Zoom", "Save")]

    @staticmethod
    def _Button(frame, text, file, command, extension=".gif"):  # pylint: disable=arguments-differ
        """ Map Buttons to their own frame.
            Use custom button icons, Use ttk buttons pack to the right """
        iconmapping = {"home": "reload",
                       "filesave": "save",
                       "zoom_to_rect": "zoom"}
        icon = iconmapping[file] if iconmapping.get(file, None) else file
        img = get_images().icons[icon]
        btn = ttk.Button(frame, text=text, image=img, command=command)
        btn.pack(side=tk.RIGHT, padx=2)
        return btn

    def _init_toolbar(self):
        """ Same as original but ttk widgets and standard tool-tips used. Separator added and
            message label packed to the left """
        xmin, xmax = self.canvas.figure.bbox.intervalx
        height, width = 50, xmax-xmin
        ttk.Frame.__init__(self, master=self.window, width=int(width), height=int(height))

        sep = ttk.Frame(self, height=2, relief=tk.RIDGE)
        sep.pack(fill=tk.X, pady=(5, 0), side=tk.TOP)

        self.update()  # Make axes menu

        btnframe = ttk.Frame(self)
        btnframe.pack(fill=tk.X, padx=5, pady=5, side=tk.RIGHT)
 </s> add from .custom_widgets import Tooltip
from .utils import get_config, get_images, LongRunningTask </s> remove     """ Session Graph for session pop-up """
    def __init__(self, parent, data, ylabel, scale):
 </s> add     """ Session Graph for session pop-up.

    Parameters
    ----------
    parent: :class:`tkinter.ttk.Frame`
        The parent frame that holds the graph
    data: :class:`lib.gui.analysis.stats.Calculations`
        The statistics class that holds the data to be displayed
    ylabel: str
        The data label for the y-axis
    scale: str
        Should be one of ``"log"`` or ``"linear"``
    """
    def __init__(self, parent: ttk.Frame, data, ylabel: str, scale: str) -> None:
""" Graph functions for Display Frame area of the Faceswap GUI """
  #!/usr/bin python3
""" Graph functions for Display Frame area of the Faceswap GUI """
  import datetime
  import logging
  import os
  import tkinter as tk
  
keep replace keep keep keep keep keep
 Update matplotlib requirement
  - bump min requirement to 3.5.1
  - Fix custom toolbar for v3.5.1
  - Documentation + linting 
lib/gui/display_graph.py