This is the data I received from the IMU along the y-axis (pitch). Accelerometer data is in radians and the gyro data is in radians per second. The data points from 0 to 41 are before the motors turned on. 41-89 is the quad tilting left. 89-129 is the quad tilting right. 129- is the quad tilting to the left again.
As you can see the accelerometer data is quite noisy. I tried dampening the vibration using foam underneath the circuit board, but that didn't help much. Looking at the gyro data it is quite smooth in comparison.
So I looked into using filters that combine the accelerometer data with the gyro data. Using the code for a Complementary Filter (thanks to RoyLB). I was able to produce the following results.