def plot_shaded_data(X,Y,variances,varianceX):
plt.plot(X,Y,color='<STR_LIT:k>',lw=<NUM_LIT:2>)<EOL>nChunks=int(len(Y)/CHUNK_POINTS)<EOL>for i in range(<NUM_LIT:0>,<NUM_LIT:100>,PERCENT_STEP):<EOL><INDENT>varLimitLow=np.percentile(variances,i)<EOL>varLimitHigh=np.percentile(variances,i+PERCENT_STEP)<EOL>varianceIsAboveMin=np.where(variances>=varLimitLow)[<NUM_LIT:0>]<EOL>varianceIsBelowMax=np.where(variances<=varLimitHigh)[<NUM_LIT:0>]<EOL>varianceIsRange=[chunkNumber for chunkNumber in range(nChunks)if chunkNumber in varianceIsAboveMinand chunkNumber in varianceIsBelowMax]<EOL>for chunkNumber in varianceIsRange:<EOL><INDENT>t1=chunkNumber*CHUNK_POINTS/POINTS_PER_SEC<EOL>t2=t1+CHUNK_POINTS/POINTS_PER_SEC<EOL>plt.axvspan(t1,t2,alpha=<NUM_LIT>,color=COLORMAP(i/<NUM_LIT:100>),lw=<NUM_LIT:0>)<EOL><DEDENT><DEDENT>
plot X and Y data, then shade its background by variance.