# Path: tia/util/decorator.py
# class DeferredExecutionMixin(object):
#     """Mixin which defers execution of methods by adding then to a queue until 'apply' is invoked or the object is
#     invoked '()'.
#     Don't want to use this if you modify object variables between method calls (Deferred calls methods later)
#     """
#     NOT_DEFERRED = ['apply']
# 
#     def __init__(self):
#         self._deferred = []
# 
#     def __getattribute__(self, name):
#         attr = super(DeferredExecutionMixin, self).__getattribute__(name)
#         if callable(attr) and not name.startswith('_') and name not in self.NOT_DEFERRED \
#                 and not isinstance(attr, DeferredExecutionMixin):
#             def wrapped(*args, **kwargs):
#                 self._deferred.append(lambda: attr(*args, **kwargs))
#                 return self
# 
#             return wrapped
#         else:
#             return attr
# 
#     def __call__(self):
#         [f() for f in self._deferred]


import uuid
import os
import matplotlib.pyplot as plt
import numpy as np
import pandas
import tia.util.fmt as fmt
            import tempfile
        import itertools
from matplotlib.ticker import FuncFormatter
from matplotlib.dates import DateFormatter
from tia.util.decorator import DeferredExecutionMixin


class _YAxisFormat(_AxisFormat):
    @property
    def axis(self):
        return self.axes.yaxis

    def rotate(self, rot=40, ha='right'):
        rotate_labels(self.axes, which='y', rot=rot, ha=ha)
        return self

    def label(self, txt, **kwargs):
        self.axes.set_ylabel(txt, **kwargs)
        return self


class _XAxisFormat(_AxisFormat):
    @property
    def axis(self):
        return self.axes.xaxis

    def rotate(self, rot=40, ha='right'):
        rotate_labels(self.axes, which='x', rot=rot, ha=ha)
        return self

    def label(self, txt, **kwargs):
        self.axes.set_xlabel(txt, **kwargs)
        return self



# Path: tia/util/decorator.py
# class DeferredExecutionMixin(object):
#     """Mixin which defers execution of methods by adding then to a queue until 'apply' is invoked or the object is
#     invoked '()'.
#     Don't want to use this if you modify object variables between method calls (Deferred calls methods later)
#     """
#     NOT_DEFERRED = ['apply']
# 
#     def __init__(self):
#         self._deferred = []
# 
#     def __getattribute__(self, name):
#         attr = super(DeferredExecutionMixin, self).__getattribute__(name)
#         if callable(attr) and not name.startswith('_') and name not in self.NOT_DEFERRED \
#                 and not isinstance(attr, DeferredExecutionMixin):
#             def wrapped(*args, **kwargs):
#                 self._deferred.append(lambda: attr(*args, **kwargs))
#                 return self
# 
#             return wrapped
#         else:
#             return attr
# 
#     def __call__(self):
#         [f() for f in self._deferred]


# Path: tia/util/mplot.py
import uuid
import os
import matplotlib.pyplot as plt
import numpy as np
import pandas
import tia.util.fmt as fmt
            import tempfile
        import itertools
from matplotlib.ticker import FuncFormatter
from matplotlib.dates import DateFormatter
from tia.util.decorator import DeferredExecutionMixin



class _YAxisFormat(_AxisFormat):
    @property
    def axis(self):
        return self.axes.yaxis

    def rotate(self, rot=40, ha='right'):
        rotate_labels(self.axes, which='y', rot=rot, ha=ha)
        return self

    def label(self, txt, **kwargs):
        self.axes.set_ylabel(txt, **kwargs)
        return self


class _XAxisFormat(_AxisFormat):
    @property
    def axis(self):
        return self.axes.xaxis

    def rotate(self, rot=40, ha='right'):
        rotate_labels(self.axes, which='x', rot=rot, ha=ha)
        return self

    def label(self, txt, **kwargs):
        self.axes.set_xlabel(txt, **kwargs)
        return self



class AxesFormat(DeferredExecutionMixin):