X-Git-Url: https://git.njae.me.uk/?a=blobdiff_plain;f=06-tour-shapes%2Ftour-shapes-build-raw-tours.ipynb;h=7731efa0d2ba79a3bcba4b6cc74f3afafed2507e;hb=a411357b201d8391e5e7c23893fca8705fd4cced;hp=79030704fc2185b126ee6e997df8ba9c649eda90;hpb=9016ac45d2a303fbd6499a902cce3619d1f4f1d4;p=ou-summer-of-code-2017.git diff --git a/06-tour-shapes/tour-shapes-build-raw-tours.ipynb b/06-tour-shapes/tour-shapes-build-raw-tours.ipynb index 7903070..7731efa 100644 --- a/06-tour-shapes/tour-shapes-build-raw-tours.ipynb +++ b/06-tour-shapes/tour-shapes-build-raw-tours.ipynb @@ -1111,9 +1111,14 @@ }, "outputs": [], "source": [ - "def plot_trace(trace, colour='k', xybounds=None, fig=None, subplot_details=None, filename=None):\n", + "def plot_trace(trace, colour='k', highlight_start=True,\n", + " xybounds=None, fig=None, subplot_details=None, filename=None):\n", " plt.axis('on')\n", " plt.axes().set_aspect('equal')\n", + " \n", + " if highlight_start:\n", + " plt.axes().add_patch(plt.Circle((trace[0].x, trace[0].y), 0.2, color=colour))\n", + " \n", " for s, t in chunks(trace, 2):\n", " w, h = plot_wh[t.dir]\n", " plt.arrow(s.x, s.y, w, h, head_width=0.1, head_length=0.1, fc=colour, ec=colour, length_includes_head=True)\n", @@ -3224,7 +3229,9 @@ { "cell_type": "code", "execution_count": 119, - "metadata": {}, + "metadata": { + "collapsed": true + }, "outputs": [], "source": [ "tours_filename = 'tours-random-walk.txt'\n",