# Path: metatlas/io/write_utils.py
# def make_dir_for(file_path):
# def check_existing_file(file_path, overwrite=False):
# def export_dataframe(dataframe, file_path, description, overwrite=False, **kwargs):
# def raise_on_diff(dataframe, file_path, description, **kwargs):
# def export_dataframe_die_on_diff(dataframe, file_path, description, overwrite=False, **kwargs):
# 
# Path: metatlas/plots/utils.py
# BACKGROUND_COLORS = ["white", "lightyellow", "whitesmoke", "lavenderblush"]
# def colors() -> Generator:
# def subplot_dimensions(num: int) -> Tuple[int, int]:
# def wrap_subplots(num: int, **kwargs) -> Tuple[matplotlib.figure.Figure, List[matplotlib.axes.Axes]]:
# def is_in_range(a: List[float], start: float, stop: float) -> List[bool]:
# def fill_under(
#     ax: matplotlib.axes.Axes,
#     x: List[float],
#     y: List[float],
#     between: Optional[Tuple[float, float]] = None,
#     **kwargs,
# ) -> None:
# def pdf_with_text(text: str, file_name: str, size: int = 24):


import datetime
import logging
import math
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import numpy.typing as npt
from abc import ABC
from typing import Optional, Sequence, Tuple
from matplotlib.backends.backend_pdf import PdfPages
from metatlas.io import write_utils
from metatlas.plots import utils
"""Set of plots"""
# pylint: disable=invalid-name,too-many-arguments,too-few-public-methods






logger = logging.getLogger(__name__)


def restore_matplotlib_settings(func):
    """Stop function from permanently modifiying rcParams"""

    def wrapper(*args, **kwargs):
        original = matplotlib.rcParams
        out = func(*args, **kwargs)
        matplotlib.rcParams = original
        return out

    return wrapper


class Plot(ABC):
    """A single plot"""

    def __init__(self, title: str, group_name: str):
        self.title = title
        self.group_name = group_name


# Path: metatlas/io/write_utils.py
# def make_dir_for(file_path):
# def check_existing_file(file_path, overwrite=False):
# def export_dataframe(dataframe, file_path, description, overwrite=False, **kwargs):
# def raise_on_diff(dataframe, file_path, description, **kwargs):
# def export_dataframe_die_on_diff(dataframe, file_path, description, overwrite=False, **kwargs):
# 
# Path: metatlas/plots/utils.py
# BACKGROUND_COLORS = ["white", "lightyellow", "whitesmoke", "lavenderblush"]
# def colors() -> Generator:
# def subplot_dimensions(num: int) -> Tuple[int, int]:
# def wrap_subplots(num: int, **kwargs) -> Tuple[matplotlib.figure.Figure, List[matplotlib.axes.Axes]]:
# def is_in_range(a: List[float], start: float, stop: float) -> List[bool]:
# def fill_under(
#     ax: matplotlib.axes.Axes,
#     x: List[float],
#     y: List[float],
#     between: Optional[Tuple[float, float]] = None,
#     **kwargs,
# ) -> None:
# def pdf_with_text(text: str, file_name: str, size: int = 24):


# Path: metatlas/plots/plot_set.py
import datetime
import logging
import math
import matplotlib
import matplotlib.pyplot as plt
import numpy as np
import numpy.typing as npt
from abc import ABC
from typing import Optional, Sequence, Tuple
from matplotlib.backends.backend_pdf import PdfPages
from metatlas.io import write_utils
from metatlas.plots import utils

"""Set of plots"""
# pylint: disable=invalid-name,too-many-arguments,too-few-public-methods






logger = logging.getLogger(__name__)


def restore_matplotlib_settings(func):
    """Stop function from permanently modifiying rcParams"""

    def wrapper(*args, **kwargs):
        original = matplotlib.rcParams
        out = func(*args, **kwargs)
        matplotlib.rcParams = original
        return out

    return wrapper


class Plot(ABC):
    """A single plot"""

    def __init__(self, title: str, group_name: str):
        self.title = title
        self.group_name = group_name


    def plot(self, ax: matplotlib.axes.Axes, back_color: utils.Color = "white") -> None: