@staticmethod
def save_figure_as(fig, filename):
    """ Saves the figure as a file.

        :param fig: a Matplotlib figure instance
        :param filename: file name to save
        """
    if filename is not None:
        fig.savefig(str(filename), bbox_inches='tight')
