Spaces:
Runtime error
Runtime error
Commit ·
050a1a6
1
Parent(s): 81a0426
Adding step_size to the plot
Browse files57 unmodified lines5859606162636457 unmodified linesinfo_text = 'Start point=' + str(start_point) + '\n' +'End point=' + str([x[-1],y[-1]]) + '\n' +'Displacement =' + str(distance_from_start([x[-1], y[-1]], start_point)) + '\n' +'Max x = ' + str(max(x)) + '\n' + 'Min x = ' + str(min(x)) + '\n' + 'Max y = ' + str(max(y)) + '\n' + 'Min y = ' + str(min(y))ax.legend([info_text], loc='best', handlelength=0, handletextpad=0, fancybox=True, fontsize=8)plt.title('2D Random Walk, iterations = ' + str(iters))plt.grid()fig.canvas.draw()57 unmodified lines5859606162636457 unmodified linesinfo_text = 'Start point=' + str(start_point) + '\n' +'End point=' + str([x[-1],y[-1]]) + '\n' +'Displacement =' + str(distance_from_start([x[-1], y[-1]], start_point)) + '\n' +'Max x = ' + str(max(x)) + '\n' + 'Min x = ' + str(min(x)) + '\n' + 'Max y = ' + str(max(y)) + '\n' + 'Min y = ' + str(min(y))ax.legend([info_text], loc='best', handlelength=0, handletextpad=0, fancybox=True, fontsize=8)plt.title('2D Random Walk, steps = ' + str(iters)+', step size = '+ str(step_size))plt.grid()fig.canvas.draw()
app.py+1-1