# Path: soap/logger.py
# class levels():
# def set_context(**kwargs):
# def get_context():
# def header(s, l=levels.info):
# def format(*args):
# def log(*args, **kwargs):
# def line(*args, **kwargs):
# def rewrite(*args, **kwargs):
# def persistent(name, *args, **kwargs):
# def unpersistent(*args):
# def local_context(**kwargs):
# def log_level(l):
#     def wrapper(f):
#         def wrapped(*args, **kwargs):
# def log_enable(l):
#     def wrapper(f):
#         def wrapped(*args, **kwargs):
# def log_context(l):
#     def wrapper():
# def _init_level():
# 
# Path: soap/analysis/core.py
# def pareto_frontier(points, ignore_last=True):
#     frontier = _pareto_frontier(points, ignore_last)[0]
#     return frontier


import itertools
import matplotlib
from matplotlib import rc, pyplot
from mpl_toolkits.mplot3d import Axes3D
from soap import logger
from soap.analysis.core import pareto_frontier
        figure = self.figure = pyplot.figure()
        self.ax3d = Axes3D(figure)
        self.colors = itertools.cycle('rgbkcmy')
        self.markers = itertools.cycle('+ox.sv^<>')
        self.legends = []
        self.projection_results = []
        self.is_finalized = False

    def values(self, result):
        return result.lut, result.error, result.latency, result.expression

    def add_original(self, original_point):
        self.add([original_point], 'Original')

    def add(self, optimized_results, legend=None):
        if self.is_finalized:
            raise PlotFinalizedError
        values = [self.values(r) for r in optimized_results]
        luts, errors, lats, exprs = zip(*values)
        color = next(self.colors)
        marker = next(self.markers)
        self.ax3d.scatter(
            luts, errors, lats, s=100, color=color, marker=marker)
        # add legend text to add later
        self.legends.append((color, marker, legend))
        # add results to plot projections later
        self.projection_results.append((color, values))

    def _add_projection_frontiers(self, xmin, xmax, ymin, ymax, zmin, zmax):
        def frontier(x, y, start, stop):

# Path: soap/logger.py
# class levels():
# def set_context(**kwargs):
# def get_context():
# def header(s, l=levels.info):
# def format(*args):
# def log(*args, **kwargs):
# def line(*args, **kwargs):
# def rewrite(*args, **kwargs):
# def persistent(name, *args, **kwargs):
# def unpersistent(*args):
# def local_context(**kwargs):
# def log_level(l):
#     def wrapper(f):
#         def wrapped(*args, **kwargs):
# def log_enable(l):
#     def wrapper(f):
#         def wrapped(*args, **kwargs):
# def log_context(l):
#     def wrapper():
# def _init_level():
# 
# Path: soap/analysis/core.py
# def pareto_frontier(points, ignore_last=True):
#     frontier = _pareto_frontier(points, ignore_last)[0]
#     return frontier


# Path: soap/analysis/plot.py
import itertools
import matplotlib
from matplotlib import rc, pyplot
from mpl_toolkits.mplot3d import Axes3D
from soap import logger
from soap.analysis.core import pareto_frontier

        figure = self.figure = pyplot.figure()
        self.ax3d = Axes3D(figure)
        self.colors = itertools.cycle('rgbkcmy')
        self.markers = itertools.cycle('+ox.sv^<>')
        self.legends = []
        self.projection_results = []
        self.is_finalized = False

    def values(self, result):
        return result.lut, result.error, result.latency, result.expression

    def add_original(self, original_point):
        self.add([original_point], 'Original')

    def add(self, optimized_results, legend=None):
        if self.is_finalized:
            raise PlotFinalizedError
        values = [self.values(r) for r in optimized_results]
        luts, errors, lats, exprs = zip(*values)
        color = next(self.colors)
        marker = next(self.markers)
        self.ax3d.scatter(
            luts, errors, lats, s=100, color=color, marker=marker)
        # add legend text to add later
        self.legends.append((color, marker, legend))
        # add results to plot projections later
        self.projection_results.append((color, values))

    def _add_projection_frontiers(self, xmin, xmax, ymin, ymax, zmin, zmax):
        def frontier(x, y, start, stop):

            points = pareto_frontier(zip(x, y), ignore_last=False)