prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Draw Legend After WebGL glyphs
  <img width="906" alt="screen shot 2016-06-24 at 6 50 29 pm" src="https://cloud.githubusercontent.com/assets/433221/16357521/c6f00a1c-3abe-11e6-8835-0e4bb17550d4.png">
  
  
  </issue>
  <code>
  [start of examples/webgl/iris_blend.py]
  1 """ The iris dataset, drawn twice with semi-transparent markers. This is
  2 an interesting use-case to test blending, because several samples itself
  3 overlap, and by drawing the set twice with different colors, we realize
  4 even more interesting blending. Also note how this makes use of
  5 different ways to specify (css) colors. This example is a good reference
  6 to test WebGL blending.
  7 
  8 """
  9 
  10 from bokeh.plotting import figure, show, output_file
  11 from bokeh.sampledata.iris import flowers
  12 
  13 colormap1 = {'setosa': 'rgb(255, 0, 0)',
  14              'versicolor': 'rgb(0, 255, 0)',
  15              'virginica': 'rgb(0, 0, 255)'}
  16 colors1 = [colormap1[x] for x in flowers['species']]
  17 
  18 colormap2 = {'setosa': '#0f0', 'versicolor': '#0f0', 'virginica': '#f00'}
  19 colors2 = [colormap2[x] for x in flowers['species']]
  20 
  21 p = figure(title = "Iris Morphology", webgl=True)
  22 p.xaxis.axis_label = 'Petal Length'
  23 p.yaxis.axis_label = 'Petal Width'
  24 
  25 p.diamond(flowers["petal_length"], flowers["petal_width"],
  26           color=colors1, line_alpha=0.5, fill_alpha=0.2, size=25)
  27 
  28 p.circle(flowers["petal_length"], flowers["petal_width"],
  29          color=colors2, line_alpha=0.5, fill_alpha=0.2, size=10)
  30 
  31 output_file("iris_blend.html", title="iris_blend.py example")
  32 
  33 show(p)
  34
  [end of examples/webgl/iris_blend.py]
  </code>
  
  I need you to solve this issue by generating a single patch file that I can apply directly to this repository using git apply. Please respond with a single patch file in the following format.
  <patch>
  diff --git a/file.py b/file.py
  --- a/file.py
  +++ b/file.py
  @@ -1,27 +1,35 @@
   def euclidean(a, b):
  -    while b:
  -        a, b = b, a % b
  -    return a
  +    if b == 0:
  +        return a
  +    return euclidean(b, a % b)
   
   
   def bresenham(x0, y0, x1, y1):
       points = []
       dx = abs(x1 - x0)
       dy = abs(y1 - y0)
  -    sx = 1 if x0 < x1 else -1
  -    sy = 1 if y0 < y1 else -1
  -    err = dx - dy
  +    x, y = x0, y0
  +    sx = -1 if x0 > x1 else 1
  +    sy = -1 if y0 > y1 else 1
   
  -    while True:
  -        points.append((x0, y0))
  -        if x0 == x1 and y0 == y1:
  -            break
  -        e2 = 2 * err
  -        if e2 > -dy:
  -            err -= dy
  -            x0 += sx
  -        if e2 < dx:
  -            err += dx
  -            y0 += sy
  +    if dx > dy:
  +        err = dx / 2.0
  +        while x != x1:
  +            points.append((x, y))
  +            err -= dy
  +            if err < 0:
  +                y += sy
  +                err += dx
  +            x += sx
  +    else:
  +        err = dy / 2.0
  +        while y != y1:
  +            points.append((x, y))
  +            err -= dx
  +            if err < 0:
  +                x += sx
  +                err += dy
  +            y += sy
  +
  +    points.append((x, y))
       return points
  
  </patch>
golden_diff: diff --git a/examples/webgl/iris_blend.py b/examples/webgl/iris_blend.py
  --- a/examples/webgl/iris_blend.py
  +++ b/examples/webgl/iris_blend.py
  @@ -23,10 +23,10 @@
   p.yaxis.axis_label = 'Petal Width'
   
   p.diamond(flowers["petal_length"], flowers["petal_width"],
  -          color=colors1, line_alpha=0.5, fill_alpha=0.2, size=25)
  +          color=colors1, line_alpha=0.5, fill_alpha=0.2, size=25, legend='diamonds')
   
   p.circle(flowers["petal_length"], flowers["petal_width"],
  -         color=colors2, line_alpha=0.5, fill_alpha=0.2, size=10)
  +         color=colors2, line_alpha=0.5, fill_alpha=0.2, size=10, legend='circles')
   
   output_file("iris_blend.html", title="iris_blend.py example")
  
verification_info: {"golden_diff": "diff --git a/examples/webgl/iris_blend.py b/examples/webgl/iris_blend.py\n--- a/examples/webgl/iris_blend.py\n+++ b/examples/webgl/iris_blend.py\n@@ -23,10 +23,10 @@\n p.yaxis.axis_label = 'Petal Width'\n \n p.diamond(flowers[\"petal_length\"], flowers[\"petal_width\"],\n-          color=colors1, line_alpha=0.5, fill_alpha=0.2, size=25)\n+          color=colors1, line_alpha=0.5, fill_alpha=0.2, size=25, legend='diamonds')\n \n p.circle(flowers[\"petal_length\"], flowers[\"petal_width\"],\n-         color=colors2, line_alpha=0.5, fill_alpha=0.2, size=10)\n+         color=colors2, line_alpha=0.5, fill_alpha=0.2, size=10, legend='circles')\n \n output_file(\"iris_blend.html\", title=\"iris_blend.py example\")\n", "issue": "Draw Legend After WebGL glyphs\n<img width=\"906\" alt=\"screen shot 2016-06-24 at 6 50 29 pm\" src=\"https://cloud.githubusercontent.com/assets/433221/16357521/c6f00a1c-3abe-11e6-8835-0e4bb17550d4.png\">\n\n", "before_files": [{"content": "\"\"\" The iris dataset, drawn twice with semi-transparent markers. This is\nan interesting use-case to test blending, because several samples itself\noverlap, and by drawing the set twice with different colors, we realize\neven more interesting blending. Also note how this makes use of\ndifferent ways to specify (css) colors. This example is a good reference\nto test WebGL blending.\n\n\"\"\"\n\nfrom bokeh.plotting import figure, show, output_file\nfrom bokeh.sampledata.iris import flowers\n\ncolormap1 = {'setosa': 'rgb(255, 0, 0)',\n             'versicolor': 'rgb(0, 255, 0)',\n             'virginica': 'rgb(0, 0, 255)'}\ncolors1 = [colormap1[x] for x in flowers['species']]\n\ncolormap2 = {'setosa': '#0f0', 'versicolor': '#0f0', 'virginica': '#f00'}\ncolors2 = [colormap2[x] for x in flowers['species']]\n\np = figure(title = \"Iris Morphology\", webgl=True)\np.xaxis.axis_label = 'Petal Length'\np.yaxis.axis_label = 'Petal Width'\n\np.diamond(flowers[\"petal_length\"], flowers[\"petal_width\"],\n          color=colors1, line_alpha=0.5, fill_alpha=0.2, size=25)\n\np.circle(flowers[\"petal_length\"], flowers[\"petal_width\"],\n         color=colors2, line_alpha=0.5, fill_alpha=0.2, size=10)\n\noutput_file(\"iris_blend.html\", title=\"iris_blend.py example\")\n\nshow(p)\n", "path": "examples/webgl/iris_blend.py"}]}