// Generate some data.functionf1(x){returnMath.exp(-0.5*(x-1)*(x-1))*Math.sin(x+0.2)+0.05;}functionf2(x){return0.5*Math.cos(x-0.5)+0.1+Math.sqrt(Math.abs(x))/2-0.65;}varxmin=-1.0,xmax=7,N=100,data=d3.range(xmin,xmax,(xmax-xmin)/N).map(function(d){return{x:d,y:f1(d)};})data2=d3.range(xmin,xmax,(xmax-xmin)/N).map(function(d){return{x:d,y:f2(d)};});labels=[{text:"<-- it's going to be legendary",x:200,y:55}]varplot=xkcdplot("The most important graph ever made","Time of Day","Awesomeness",labels);plot("#plt");plot.plot(data);plot.plot(data2,{stroke:"red"});plot.xlim([-1.5,7.5]).draw();