# -*- coding: utf-8 -*-
"""
Created on Wed Aug  9 11:47:19 2023

@author: veenstra
"""

import matplotlib.pyplot as plt


def close(fig=None):
    """
    wrapper around matplotlib.pyplot.close() to enable closing of plots generated by hatyan without explicitly importing matplotlib

    Parameters
    ----------
    fig : None or int or str or .Figure
        The figure to close. There are a number of ways to specify this:
        None: the current figure
        .Figure: the given .Figure instance
        int: a figure number
        str: a figure name
        'all': all figures.

    Returns
    -------
    None.

    """
    
    plt.close(fig)
