importnumpyasnpfrombokeh.modelsimportSlopefrombokeh.plottingimportfigure,show# linear equation parametersslope,intercept=2,10xpts=np.arange(0,20,0.2)ypts=slope*xpts+intercept+np.random.normal(0,4,100)p=figure(width=450,height=450,x_axis_label='x',y_axis_label='y',background_fill_color="#fafafa")p.y_range.start=0p.circle(xpts,ypts,size=6,alpha=0.6,fill_color=None)slope=Slope(gradient=slope,y_intercept=intercept,line_color='orange',line_dash='dashed',line_width=4)p.add_layout(slope)show(p)