def sav(myString):
    return fig.savefig(myString, bbox_inches='tight', dpi=100, pad_inches=0.1)
    if (output_dir is not None):
        sav(f'{output_dir}/{variable}.png')
    else:
        sav(f'{variable}.png')
def sav(myString):
    return fig.savefig(myString, bbox_inches='tight', dpi=100, pad_inches=0.1)
    if (output_dir is not None):
        sav(f'{output_dir}/{variable}.png')
    else:
        sav(f'{variable}.png')