Add massspectrum trim method for svg generation