minor improvement about removing margin and handling some exceptions when seaborn is not installed