prompt: You will be provided with a partial code base and an issue statement explaining a problem to resolve.
  <issue>
  Update dataset for parallel coords plot examples
  The example currently does this:
  ```
  df = pd.read_csv("https://raw.githubusercontent.com/bcdunbar/datasets/master/parcoords_data.csv")
  ```
  
  Which is not really great. We should add a data set to `sampledata` and use that. 
  
  
  </issue>
  <code>
  [start of examples/custom/parallel_plot/parallel_plot.py]
  1 import numpy as np
  2 import pandas as pd
  3 
  4 from bokeh.plotting import figure
  5 from bokeh.layouts import column
  6 from bokeh.models import (Range1d, ColumnDataSource, Div, LinearAxis,
  7                           LinearColorMapper, MultiLine,
  8                           FixedTicker, BasicTickFormatter, FuncTickFormatter)
  9 
  10 from parallel_selection_tool import ParallelSelectionTool
  11 from parallel_reset import ParallelResetTool
  12 
  13 
  14 def parallel_plot(df, color=None, palette=None):
  15     """From a dataframe create a parallel coordinate plot
  16     """
  17     npts = df.shape[0]
  18     ndims = len(df.columns)
  19 
  20     if color is None:
  21         color = np.ones(npts)
  22     if palette is None:
  23         palette = ['#ff0000']
  24 
  25     cmap = LinearColorMapper(high=color.min(),
  26                              low=color.max(),
  27                              palette=palette)
  28 
  29     data_source = ColumnDataSource(dict(
  30         xs=np.arange(ndims)[None, :].repeat(npts, axis=0).tolist(),
  31         ys=np.array((df-df.min())/(df.max()-df.min())).tolist(),
  32         color=color))
  33 
  34     p = figure(x_range=(-1, ndims),
  35                y_range=(0, 1),
  36                width=1000,
  37                tools="pan, box_zoom")
  38 
  39     # Create x axis ticks from columns contained in dataframe
  40     fixed_x_ticks = FixedTicker(
  41         ticks=np.arange(ndims), minor_ticks=[])
  42     formatter_x_ticks = FuncTickFormatter(
  43         code="return columns[index]", args={"columns": df.columns})
  44     p.xaxis.ticker = fixed_x_ticks
  45     p.xaxis.formatter = formatter_x_ticks
  46 
  47     p.yaxis.visible = False
  48     p.y_range.start = 0
  49     p.y_range.end = 1
  50     p.y_range.bounds = (-0.1, 1.1) # add a little padding around y axis
  51     p.xgrid.visible = False
  52     p.ygrid.visible = False
  53 
  54     # Create extra y axis for each dataframe column
  55     tickformatter = BasicTickFormatter(precision=1)
  56     for index, col in enumerate(df.columns):
  57         start = df[col].min()
  58         end = df[col].max()
  59         bound_min = start + abs(end-start) * (p.y_range.bounds[0] - p.y_range.start)
  60         bound_max = end + abs(end-start) * (p.y_range.bounds[1] - p.y_range.end)
  61         p.extra_y_ranges.update(
  62             {col: Range1d(start=bound_min, end=bound_max, bounds=(bound_min, bound_max))})
  63 
  64         fixedticks = FixedTicker(
  65             ticks=np.linspace(start, end, 8), minor_ticks=[])
  66 
  67         p.add_layout(LinearAxis(fixed_location=index, y_range_name=col,
  68                                 ticker=fixedticks, formatter=tickformatter), 'right')
  69 
  70     # create the data renderer ( MultiLine )
  71     # specify selected and non selected style
  72     non_selected_line_style = dict(line_color='grey', line_width=0.1, line_alpha=0.5)
  73 
  74     selected_line_style = dict(line_color={'field': 'color', 'transform': cmap}, line_width=1)
  75 
  76     parallel_renderer = p.multi_line(
  77         xs="xs", ys="ys", source=data_source, **non_selected_line_style)
  78 
  79     # Specify selection style
  80     selected_lines = MultiLine(**selected_line_style)
  81 
  82     # Specify non selection style
  83     nonselected_lines = MultiLine(**non_selected_line_style)
  84 
  85     parallel_renderer.selection_glyph = selected_lines
  86     parallel_renderer.nonselection_glyph = nonselected_lines
  87     p.y_range.start = p.y_range.bounds[0]
  88     p.y_range.end = p.y_range.bounds[1]
  89 
  90     rect_source = ColumnDataSource({
  91         'x': [], 'y': [], 'width': [], 'height': []
  92     })
  93 
  94     # add rectangle selections
  95     selection_renderer = p.rect(x='x', y='y', width='width', height='height',
  96                                 source=rect_source,
  97                                 fill_alpha=0.7, fill_color='#009933')
  98     selection_tool = ParallelSelectionTool(
  99         renderer_select=selection_renderer, renderer_data=parallel_renderer,
  100         box_width=10)
  101     # custom resets (reset only axes not selections)
  102     reset_axes = ParallelResetTool()
  103 
  104     # add tools and activate selection ones
  105     p.add_tools(selection_tool, reset_axes)
  106     p.toolbar.active_drag = selection_tool
  107     return p
  108 
  109 if __name__ == '__main__':
  110     from bokeh.palettes import Viridis256
  111     from bokeh.io import show
  112     df = pd.read_csv("https://raw.githubusercontent.com/bcdunbar/datasets/master/parcoords_data.csv")
  113     p = parallel_plot(df=df, color=df[df.columns[0]], palette=Viridis256)
  114     div = Div(text="Select up and down column grid lines to define filters. Double click a filter to reset it.")
  115     show(column(div, p))
  116
  [end of examples/custom/parallel_plot/parallel_plot.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/custom/parallel_plot/parallel_plot.py b/examples/custom/parallel_plot/parallel_plot.py
  --- a/examples/custom/parallel_plot/parallel_plot.py
  +++ b/examples/custom/parallel_plot/parallel_plot.py
  @@ -1,11 +1,11 @@
   import numpy as np
  -import pandas as pd
   
   from bokeh.plotting import figure
   from bokeh.layouts import column
   from bokeh.models import (Range1d, ColumnDataSource, Div, LinearAxis,
                             LinearColorMapper, MultiLine,
                             FixedTicker, BasicTickFormatter, FuncTickFormatter)
  +from bokeh.sampledata.autompg import autompg_clean as df
   
   from parallel_selection_tool import ParallelSelectionTool
   from parallel_reset import ParallelResetTool
  @@ -109,7 +109,9 @@
   if __name__ == '__main__':
       from bokeh.palettes import Viridis256
       from bokeh.io import show
  -    df = pd.read_csv("https://raw.githubusercontent.com/bcdunbar/datasets/master/parcoords_data.csv")
  +    del df['origin']
  +    del df['mfr']
  +    del df['name']
       p = parallel_plot(df=df, color=df[df.columns[0]], palette=Viridis256)
       div = Div(text="Select up and down column grid lines to define filters. Double click a filter to reset it.")
       show(column(div, p))
  
verification_info: {"golden_diff": "diff --git a/examples/custom/parallel_plot/parallel_plot.py b/examples/custom/parallel_plot/parallel_plot.py\n--- a/examples/custom/parallel_plot/parallel_plot.py\n+++ b/examples/custom/parallel_plot/parallel_plot.py\n@@ -1,11 +1,11 @@\n import numpy as np\n-import pandas as pd\n \n from bokeh.plotting import figure\n from bokeh.layouts import column\n from bokeh.models import (Range1d, ColumnDataSource, Div, LinearAxis,\n                           LinearColorMapper, MultiLine,\n                           FixedTicker, BasicTickFormatter, FuncTickFormatter)\n+from bokeh.sampledata.autompg import autompg_clean as df\n \n from parallel_selection_tool import ParallelSelectionTool\n from parallel_reset import ParallelResetTool\n@@ -109,7 +109,9 @@\n if __name__ == '__main__':\n     from bokeh.palettes import Viridis256\n     from bokeh.io import show\n-    df = pd.read_csv(\"https://raw.githubusercontent.com/bcdunbar/datasets/master/parcoords_data.csv\")\n+    del df['origin']\n+    del df['mfr']\n+    del df['name']\n     p = parallel_plot(df=df, color=df[df.columns[0]], palette=Viridis256)\n     div = Div(text=\"Select up and down column grid lines to define filters. Double click a filter to reset it.\")\n     show(column(div, p))\n", "issue": "Update dataset for parallel coords plot examples\nThe example currently does this:\r\n```\r\ndf = pd.read_csv(\"https://raw.githubusercontent.com/bcdunbar/datasets/master/parcoords_data.csv\")\r\n```\r\n\r\nWhich is not really great. We should add a data set to `sampledata` and use that. \r\n\n", "before_files": [{"content": "import numpy as np\nimport pandas as pd\n\nfrom bokeh.plotting import figure\nfrom bokeh.layouts import column\nfrom bokeh.models import (Range1d, ColumnDataSource, Div, LinearAxis,\n                          LinearColorMapper, MultiLine,\n                          FixedTicker, BasicTickFormatter, FuncTickFormatter)\n\nfrom parallel_selection_tool import ParallelSelectionTool\nfrom parallel_reset import ParallelResetTool\n\n\ndef parallel_plot(df, color=None, palette=None):\n    \"\"\"From a dataframe create a parallel coordinate plot\n    \"\"\"\n    npts = df.shape[0]\n    ndims = len(df.columns)\n\n    if color is None:\n        color = np.ones(npts)\n    if palette is None:\n        palette = ['#ff0000']\n\n    cmap = LinearColorMapper(high=color.min(),\n                             low=color.max(),\n                             palette=palette)\n\n    data_source = ColumnDataSource(dict(\n        xs=np.arange(ndims)[None, :].repeat(npts, axis=0).tolist(),\n        ys=np.array((df-df.min())/(df.max()-df.min())).tolist(),\n        color=color))\n\n    p = figure(x_range=(-1, ndims),\n               y_range=(0, 1),\n               width=1000,\n               tools=\"pan, box_zoom\")\n\n    # Create x axis ticks from columns contained in dataframe\n    fixed_x_ticks = FixedTicker(\n        ticks=np.arange(ndims), minor_ticks=[])\n    formatter_x_ticks = FuncTickFormatter(\n        code=\"return columns[index]\", args={\"columns\": df.columns})\n    p.xaxis.ticker = fixed_x_ticks\n    p.xaxis.formatter = formatter_x_ticks\n\n    p.yaxis.visible = False\n    p.y_range.start = 0\n    p.y_range.end = 1\n    p.y_range.bounds = (-0.1, 1.1) # add a little padding around y axis\n    p.xgrid.visible = False\n    p.ygrid.visible = False\n\n    # Create extra y axis for each dataframe column\n    tickformatter = BasicTickFormatter(precision=1)\n    for index, col in enumerate(df.columns):\n        start = df[col].min()\n        end = df[col].max()\n        bound_min = start + abs(end-start) * (p.y_range.bounds[0] - p.y_range.start)\n        bound_max = end + abs(end-start) * (p.y_range.bounds[1] - p.y_range.end)\n        p.extra_y_ranges.update(\n            {col: Range1d(start=bound_min, end=bound_max, bounds=(bound_min, bound_max))})\n\n        fixedticks = FixedTicker(\n            ticks=np.linspace(start, end, 8), minor_ticks=[])\n\n        p.add_layout(LinearAxis(fixed_location=index, y_range_name=col,\n                                ticker=fixedticks, formatter=tickformatter), 'right')\n\n    # create the data renderer ( MultiLine )\n    # specify selected and non selected style\n    non_selected_line_style = dict(line_color='grey', line_width=0.1, line_alpha=0.5)\n\n    selected_line_style = dict(line_color={'field': 'color', 'transform': cmap}, line_width=1)\n\n    parallel_renderer = p.multi_line(\n        xs=\"xs\", ys=\"ys\", source=data_source, **non_selected_line_style)\n\n    # Specify selection style\n    selected_lines = MultiLine(**selected_line_style)\n\n    # Specify non selection style\n    nonselected_lines = MultiLine(**non_selected_line_style)\n\n    parallel_renderer.selection_glyph = selected_lines\n    parallel_renderer.nonselection_glyph = nonselected_lines\n    p.y_range.start = p.y_range.bounds[0]\n    p.y_range.end = p.y_range.bounds[1]\n\n    rect_source = ColumnDataSource({\n        'x': [], 'y': [], 'width': [], 'height': []\n    })\n\n    # add rectangle selections\n    selection_renderer = p.rect(x='x', y='y', width='width', height='height',\n                                source=rect_source,\n                                fill_alpha=0.7, fill_color='#009933')\n    selection_tool = ParallelSelectionTool(\n        renderer_select=selection_renderer, renderer_data=parallel_renderer,\n        box_width=10)\n    # custom resets (reset only axes not selections)\n    reset_axes = ParallelResetTool()\n\n    # add tools and activate selection ones\n    p.add_tools(selection_tool, reset_axes)\n    p.toolbar.active_drag = selection_tool\n    return p\n\nif __name__ == '__main__':\n    from bokeh.palettes import Viridis256\n    from bokeh.io import show\n    df = pd.read_csv(\"https://raw.githubusercontent.com/bcdunbar/datasets/master/parcoords_data.csv\")\n    p = parallel_plot(df=df, color=df[df.columns[0]], palette=Viridis256)\n    div = Div(text=\"Select up and down column grid lines to define filters. Double click a filter to reset it.\")\n    show(column(div, p))\n", "path": "examples/custom/parallel_plot/parallel_plot.py"}]}