How to change x-axis from samples to time?
You're getting an error because the two inputs to plt.plot need to be the same length. Notice that len(y)/48000 is just a number, so python tells us it of length 1. 

Try plt.plot(range(len(e))/ 48000, e) **. What this does is change the values of your x axis to correspond to real time. If the sampling rate is $48000 \textrm{Hz}$, this means that $\textrm{sample}=1$ on your current axis now corresponds to 1/48000 of a second in the new axis, as this is the amount of time required to get one sample. Extend this to the whole axis - the time value on the new $x-$axis is simply the amount of time needed to take $y$ samples. 

** if range() doesnt work, try numpy.arange() instead

Also, yes, these two lines

e -= e.min()
e /= e.max()


correspond to first shifting the signal so that its minimum value is now at 0, then dividing by the max. This is just a normalization, as you guessed.