x = np.linspace(-3,3,301)
y = vf(x)
a = 1.5
off = np.where(x==-a)[0][0]
print(off)
z = np.zeros(301)
fig, ax = plt.subplots(1,1)
ax.spines['left'].set_position('center')
# Eliminate upper and right axes
ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')
# Show ticks in the left and lower axes only
ax.xaxis.set_ticks_position('bottom')
ax.yaxis.set_ticks_position('left')
ax.tick_params(axis='x',labelbottom='off')
ax.tick_params(axis='y',labelleft='off')
ax.plot(x,y, 'k');
ax.axvline(a,linestyle='--',color='#999999')
ax.axvline(-a,linestyle='--',color='#999999')
ax.fill_between(x[:off],y[:off],z[:off],color='#ddddff')
ax.fill_between(x[off:-off],y[off:-off],z[off:-off],color='#ffffdd')
ax.fill_between(x[-off:],y[-off:],z[-off:],color='#ddddff');