We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
`six.moves` incorrectly imported in `errorbar_plot.py`
**Problem Description**
Noticed a stacktrace in my work that pointed out a `NameError` (`global name 'sm' is not defined`) at `errorbar_plot.py:77` of 4.7.1, which is:

    l1, l2, l3 = sm.map(len, (index, value_low, value_high))

It seems that this is because normally `six.moves` is imported like `import six.moves as sm` and the author was used to this, but this file just has `import six.moves`. This seems to result from [`dc08831`](https://github.com/enthought/chaco/commit/dc08831d35c60057b0e26466e412e644dea1c89b#diff-7b3ca9023e76b4689bb2a0e42bf4d8f1)

**Reproduction Steps:**

I don't have clear cut reproduction steps, but a cursory glance at the code seems to make the cause of the error obvious. I'm afraid I'm not actually even able to easily modify the setup we have to create a more minimal example or to even test the proposed change (which should be to just add the alias to the import).

Especially since the traceback doesn't even contain any of our code, so I don't have an easy way to find the offending code, haha. Traceback is:

    Traceback (most recent call last):
      File "/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/qt4/base_window.py", line 202, in paintEvent
        self.handler.paintEvent(event)
      File "/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/qt4/base_window.py", line 54, in paintEvent
        self._enable_window._paint(event)
      File "/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/abstract_window.py", line 468, in _paint
        self.component.draw(gc, view_bounds=(0, 0, size[0], size[1]))
      File "/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/component.py", line 427, in draw
        self._draw(gc, view_bounds, mode)
      File "/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/component.py", line 769, in _draw
        self._dispatch_draw(layer, bb, view_bounds, mode)
      File "/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/container.py", line 272, in _dispatch_draw
        component._dispatch_draw(layer, gc, new_bounds, mode)
      File "/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/container.py", line 272, in _dispatch_draw
        component._dispatch_draw(layer, gc, new_bounds, mode)
      File "/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/component.py", line 799, in _dispatch_draw
        handler(gc, view_bounds, mode)
      File "/[removed]/site-packages/chaco-4.7.1-py2.7-linux-x86_64.egg/chaco/base_xy_plot.py", line 466, in _draw_plot
        self._draw_component(gc, view_bounds, mode)
      File "/[removed]/site-packages/chaco-4.7.1-py2.7-linux-x86_64.egg/chaco/base_xy_plot.py", line 473, in _draw_component
        pts = self.get_screen_points()
      File "/[removed]/site-packages/chaco-4.7.1-py2.7-linux-x86_64.egg/chaco/errorbar_plot.py", line 61, in get_screen_points
        self._gather_points()
      File "/[removed]/site-packages/chaco-4.7.1-py2.7-linux-x86_64.egg/chaco/errorbar_plot.py", line 77, in _gather_points
        l1, l2, l3 = sm.map(len, (index, value_low, value_high))
    NameError: global name 'sm' is not defined

**Expected behavior:**

The traceback does not occur.

**OS, Python version:**

Ubuntu 14.04, Python 2.7.14, and chaco 4.7.1 with enable 4.7.1.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `chaco/errorbar_plot.py`
Content:
```
1 
2 from __future__ import with_statement
3 
4 import six
5 import six.moves
6 
7 # Major library imports
8 from numpy import column_stack, compress, invert, isnan, transpose
9 import logging
10 
11 # Enthought library imports
12 from traits.api import Any, Enum, Float, Instance
13 
14 # Chaco imports
15 from .lineplot import LinePlot
16 from .abstract_data_source import AbstractDataSource
17 
18 # Set up a logger for this module
19 logger = logging.getLogger(__name__)
20 
21 
22 
23 class ErrorBarPlot(LinePlot):
24     """ Renders errorbars at various points.
25     """
26 
27     # The datasource containing the low values
28     value_low = Instance(AbstractDataSource)
29 
30     # The datasource containing the high values
31     value_high = Instance(AbstractDataSource)
32 
33     # The screen-space width of the endcap bars
34     endcap_size = Float(5.0)
35 
36     # The kind of encap to render on error bars
37     endcap_style = Enum("bar", "none", None)
38 
39     # Override the inherited trait definition
40     _cached_data_pts = Any
41 
42     def map_screen(self, data_array):
43         """ data_array can be Nx2 or Nx3.  In the former case, each row is
44         treated as (index, value), and this method returns screen X and Y
45         coordinates.  In the latter case, each row is treated as (index,
46         value_low, value_high), and the method returns either (x, ylow, yhigh)
47         or (y, xlow, xhigh) depending on self.orientation.
48         """
49         if len(data_array) == 0:
50             return []
51         elif data_array.shape[1] == 2:
52             return LinePlot.map_screen(self, data_array)
53         else:
54             x, ylow, yhigh = transpose(data_array)
55             sx = self.index_mapper.map_screen(x)
56             sylow = self.value_mapper.map_screen(ylow)
57             syhigh = self.value_mapper.map_screen(yhigh)
58             return column_stack((sx, sylow, syhigh))
59 
60     def get_screen_points(self):
61         self._gather_points()
62         return self.map_screen(self._cached_data_pts)
63 
64     def _gather_points(self):
65 
66         if self._cache_valid:
67             return
68 
69         if not self.index or not self.value_low or not self.value_high:
70             return
71 
72         index, index_mask = self.index.get_data_mask()
73         value_low, value_low_mask = self.value_low.get_data_mask()
74         value_high, value_high_mask = self.value_high.get_data_mask()
75         value_mask = value_low_mask & value_high_mask
76 
77         l1, l2, l3 = sm.map(len, (index, value_low, value_high))
78         if 0 in (l1, l2, l3) or not (l1 == l2 == l3):
79             logger.warn("Chaco: using empty dataset; index_len=%d, value_low_len=%d, value_high_len=%d." % (l1,l2,l3))
80             self._cached_data_pts = []
81             self._cache_valid = True
82             return
83 
84         index_range_mask = self.index_mapper.range.mask_data(index)
85         value_low_mask = self.value_mapper.range.mask_data(value_low)
86         value_high_mask = self.value_mapper.range.mask_data(value_high)
87         value_range_mask = value_low_mask | value_high_mask
88 
89         nan_mask = invert(isnan(index_mask) | isnan(value_mask))
90         point_mask = index_mask & value_mask & nan_mask & index_range_mask & value_range_mask
91 
92         points = column_stack((index, value_low, value_high))
93 
94         self._cached_data_pts = compress(point_mask, points, axis=0)
95         self._cache_valid = True
96         return
97 
98     def _render(self, gc, points, icon_mode=False):
99         if len(points) == 0:
100             return
101 
102         if not icon_mode:
103             gc.clip_to_rect(self.x, self.y, self.width, self.height)
104 
105         with gc:
106             gc.set_antialias(False)
107             gc.set_stroke_color(self.color_)
108             gc.set_line_width(self.line_width)
109             gc.set_line_dash(self.line_style_)
110 
111             if self.orientation == "h":
112                 x, ylow, yhigh = transpose(points)
113                 start, end = column_stack((x, ylow)), column_stack((x, yhigh))
114                 gc.line_set(start, end)
115                 axis = 0
116                 low = ylow
117                 high = yhigh
118 
119             else:
120                 y, xlow, xhigh = transpose(points)
121                 start, end = column_stack((xlow, y)), column_stack((xhigh, y))
122                 gc.line_set(start, end)
123                 axis = 1
124                 low = xlow
125                 high = xhigh
126 
127             if self.endcap_style == "bar":
128                 self._render_bar_endcap(gc, start, end, low, high, axis)
129             else:
130                 gc.stroke_path()
131 
132         if not icon_mode:
133             self._draw_default_axes(gc)
134         return
135 
136 
137     def _render_bar_endcap(self, gc, start, end, low, high, axis):
138         """ Renders the endcaps for endcap_style == "bar".  start and end are
139         the two endpoints of the bare errorbar.  axis is the column index
140         corresponding to the index direction, so for orientation of 'h', axis
141         is 0.
142 
143         This method modifies start and end.
144         """
145         delta = self.endcap_size / 2.0
146         start[:,axis] -= delta
147         end[:,axis] += delta
148 
149         start[:,1-axis] = low
150         end[:,1-axis] = low
151         gc.line_set(start, end)
152 
153         start[:,1-axis] = high
154         end[:,1-axis] = high
155         gc.line_set(start, end)
156         gc.stroke_path()
157         return
158 
159 
160     def _render_icon(self, gc, x, y, width, height):
161         pass
162 
163
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/chaco/errorbar_plot.py b/chaco/errorbar_plot.py
--- a/chaco/errorbar_plot.py
+++ b/chaco/errorbar_plot.py
@@ -2,7 +2,7 @@
 from __future__ import with_statement
 
 import six
-import six.moves
+import six.moves as sm
 
 # Major library imports
 from numpy import column_stack, compress, invert, isnan, transpose
@@ -159,4 +159,3 @@
 
     def _render_icon(self, gc, x, y, width, height):
         pass
-

{"golden_diff": "diff --git a/chaco/errorbar_plot.py b/chaco/errorbar_plot.py\n--- a/chaco/errorbar_plot.py\n+++ b/chaco/errorbar_plot.py\n@@ -2,7 +2,7 @@\n from __future__ import with_statement\n \n import six\n-import six.moves\n+import six.moves as sm\n \n # Major library imports\n from numpy import column_stack, compress, invert, isnan, transpose\n@@ -159,4 +159,3 @@\n \n     def _render_icon(self, gc, x, y, width, height):\n         pass\n-\n", "issue": "`six.moves` incorrectly imported in `errorbar_plot.py`\n**Problem Description**\r\nNoticed a stacktrace in my work that pointed out a `NameError` (`global name 'sm' is not defined`) at `errorbar_plot.py:77` of 4.7.1, which is:\r\n\r\n    l1, l2, l3 = sm.map(len, (index, value_low, value_high))\r\n\r\nIt seems that this is because normally `six.moves` is imported like `import six.moves as sm` and the author was used to this, but this file just has `import six.moves`. This seems to result from [`dc08831`](https://github.com/enthought/chaco/commit/dc08831d35c60057b0e26466e412e644dea1c89b#diff-7b3ca9023e76b4689bb2a0e42bf4d8f1)\r\n\r\n**Reproduction Steps:**\r\n\r\nI don't have clear cut reproduction steps, but a cursory glance at the code seems to make the cause of the error obvious. I'm afraid I'm not actually even able to easily modify the setup we have to create a more minimal example or to even test the proposed change (which should be to just add the alias to the import).\r\n\r\nEspecially since the traceback doesn't even contain any of our code, so I don't have an easy way to find the offending code, haha. Traceback is:\r\n\r\n    Traceback (most recent call last):\r\n      File \"/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/qt4/base_window.py\", line 202, in paintEvent\r\n        self.handler.paintEvent(event)\r\n      File \"/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/qt4/base_window.py\", line 54, in paintEvent\r\n        self._enable_window._paint(event)\r\n      File \"/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/abstract_window.py\", line 468, in _paint\r\n        self.component.draw(gc, view_bounds=(0, 0, size[0], size[1]))\r\n      File \"/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/component.py\", line 427, in draw\r\n        self._draw(gc, view_bounds, mode)\r\n      File \"/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/component.py\", line 769, in _draw\r\n        self._dispatch_draw(layer, bb, view_bounds, mode)\r\n      File \"/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/container.py\", line 272, in _dispatch_draw\r\n        component._dispatch_draw(layer, gc, new_bounds, mode)\r\n      File \"/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/container.py\", line 272, in _dispatch_draw\r\n        component._dispatch_draw(layer, gc, new_bounds, mode)\r\n      File \"/[removed]/site-packages/enable-4.7.1-py2.7-linux-x86_64.egg/enable/component.py\", line 799, in _dispatch_draw\r\n        handler(gc, view_bounds, mode)\r\n      File \"/[removed]/site-packages/chaco-4.7.1-py2.7-linux-x86_64.egg/chaco/base_xy_plot.py\", line 466, in _draw_plot\r\n        self._draw_component(gc, view_bounds, mode)\r\n      File \"/[removed]/site-packages/chaco-4.7.1-py2.7-linux-x86_64.egg/chaco/base_xy_plot.py\", line 473, in _draw_component\r\n        pts = self.get_screen_points()\r\n      File \"/[removed]/site-packages/chaco-4.7.1-py2.7-linux-x86_64.egg/chaco/errorbar_plot.py\", line 61, in get_screen_points\r\n        self._gather_points()\r\n      File \"/[removed]/site-packages/chaco-4.7.1-py2.7-linux-x86_64.egg/chaco/errorbar_plot.py\", line 77, in _gather_points\r\n        l1, l2, l3 = sm.map(len, (index, value_low, value_high))\r\n    NameError: global name 'sm' is not defined\r\n\r\n**Expected behavior:**\r\n\r\nThe traceback does not occur.\r\n\r\n**OS, Python version:**\r\n\r\nUbuntu 14.04, Python 2.7.14, and chaco 4.7.1 with enable 4.7.1.\r\n\n", "before_files": [{"content": "\nfrom __future__ import with_statement\n\nimport six\nimport six.moves\n\n# Major library imports\nfrom numpy import column_stack, compress, invert, isnan, transpose\nimport logging\n\n# Enthought library imports\nfrom traits.api import Any, Enum, Float, Instance\n\n# Chaco imports\nfrom .lineplot import LinePlot\nfrom .abstract_data_source import AbstractDataSource\n\n# Set up a logger for this module\nlogger = logging.getLogger(__name__)\n\n\n\nclass ErrorBarPlot(LinePlot):\n    \"\"\" Renders errorbars at various points.\n    \"\"\"\n\n    # The datasource containing the low values\n    value_low = Instance(AbstractDataSource)\n\n    # The datasource containing the high values\n    value_high = Instance(AbstractDataSource)\n\n    # The screen-space width of the endcap bars\n    endcap_size = Float(5.0)\n\n    # The kind of encap to render on error bars\n    endcap_style = Enum(\"bar\", \"none\", None)\n\n    # Override the inherited trait definition\n    _cached_data_pts = Any\n\n    def map_screen(self, data_array):\n        \"\"\" data_array can be Nx2 or Nx3.  In the former case, each row is\n        treated as (index, value), and this method returns screen X and Y\n        coordinates.  In the latter case, each row is treated as (index,\n        value_low, value_high), and the method returns either (x, ylow, yhigh)\n        or (y, xlow, xhigh) depending on self.orientation.\n        \"\"\"\n        if len(data_array) == 0:\n            return []\n        elif data_array.shape[1] == 2:\n            return LinePlot.map_screen(self, data_array)\n        else:\n            x, ylow, yhigh = transpose(data_array)\n            sx = self.index_mapper.map_screen(x)\n            sylow = self.value_mapper.map_screen(ylow)\n            syhigh = self.value_mapper.map_screen(yhigh)\n            return column_stack((sx, sylow, syhigh))\n\n    def get_screen_points(self):\n        self._gather_points()\n        return self.map_screen(self._cached_data_pts)\n\n    def _gather_points(self):\n\n        if self._cache_valid:\n            return\n\n        if not self.index or not self.value_low or not self.value_high:\n            return\n\n        index, index_mask = self.index.get_data_mask()\n        value_low, value_low_mask = self.value_low.get_data_mask()\n        value_high, value_high_mask = self.value_high.get_data_mask()\n        value_mask = value_low_mask & value_high_mask\n\n        l1, l2, l3 = sm.map(len, (index, value_low, value_high))\n        if 0 in (l1, l2, l3) or not (l1 == l2 == l3):\n            logger.warn(\"Chaco: using empty dataset; index_len=%d, value_low_len=%d, value_high_len=%d.\" % (l1,l2,l3))\n            self._cached_data_pts = []\n            self._cache_valid = True\n            return\n\n        index_range_mask = self.index_mapper.range.mask_data(index)\n        value_low_mask = self.value_mapper.range.mask_data(value_low)\n        value_high_mask = self.value_mapper.range.mask_data(value_high)\n        value_range_mask = value_low_mask | value_high_mask\n\n        nan_mask = invert(isnan(index_mask) | isnan(value_mask))\n        point_mask = index_mask & value_mask & nan_mask & index_range_mask & value_range_mask\n\n        points = column_stack((index, value_low, value_high))\n\n        self._cached_data_pts = compress(point_mask, points, axis=0)\n        self._cache_valid = True\n        return\n\n    def _render(self, gc, points, icon_mode=False):\n        if len(points) == 0:\n            return\n\n        if not icon_mode:\n            gc.clip_to_rect(self.x, self.y, self.width, self.height)\n\n        with gc:\n            gc.set_antialias(False)\n            gc.set_stroke_color(self.color_)\n            gc.set_line_width(self.line_width)\n            gc.set_line_dash(self.line_style_)\n\n            if self.orientation == \"h\":\n                x, ylow, yhigh = transpose(points)\n                start, end = column_stack((x, ylow)), column_stack((x, yhigh))\n                gc.line_set(start, end)\n                axis = 0\n                low = ylow\n                high = yhigh\n\n            else:\n                y, xlow, xhigh = transpose(points)\n                start, end = column_stack((xlow, y)), column_stack((xhigh, y))\n                gc.line_set(start, end)\n                axis = 1\n                low = xlow\n                high = xhigh\n\n            if self.endcap_style == \"bar\":\n                self._render_bar_endcap(gc, start, end, low, high, axis)\n            else:\n                gc.stroke_path()\n\n        if not icon_mode:\n            self._draw_default_axes(gc)\n        return\n\n\n    def _render_bar_endcap(self, gc, start, end, low, high, axis):\n        \"\"\" Renders the endcaps for endcap_style == \"bar\".  start and end are\n        the two endpoints of the bare errorbar.  axis is the column index\n        corresponding to the index direction, so for orientation of 'h', axis\n        is 0.\n\n        This method modifies start and end.\n        \"\"\"\n        delta = self.endcap_size / 2.0\n        start[:,axis] -= delta\n        end[:,axis] += delta\n\n        start[:,1-axis] = low\n        end[:,1-axis] = low\n        gc.line_set(start, end)\n\n        start[:,1-axis] = high\n        end[:,1-axis] = high\n        gc.line_set(start, end)\n        gc.stroke_path()\n        return\n\n\n    def _render_icon(self, gc, x, y, width, height):\n        pass\n\n", "path": "chaco/errorbar_plot.py"}], "after_files": [{"content": "\nfrom __future__ import with_statement\n\nimport six\nimport six.moves as sm\n\n# Major library imports\nfrom numpy import column_stack, compress, invert, isnan, transpose\nimport logging\n\n# Enthought library imports\nfrom traits.api import Any, Enum, Float, Instance\n\n# Chaco imports\nfrom .lineplot import LinePlot\nfrom .abstract_data_source import AbstractDataSource\n\n# Set up a logger for this module\nlogger = logging.getLogger(__name__)\n\n\n\nclass ErrorBarPlot(LinePlot):\n    \"\"\" Renders errorbars at various points.\n    \"\"\"\n\n    # The datasource containing the low values\n    value_low = Instance(AbstractDataSource)\n\n    # The datasource containing the high values\n    value_high = Instance(AbstractDataSource)\n\n    # The screen-space width of the endcap bars\n    endcap_size = Float(5.0)\n\n    # The kind of encap to render on error bars\n    endcap_style = Enum(\"bar\", \"none\", None)\n\n    # Override the inherited trait definition\n    _cached_data_pts = Any\n\n    def map_screen(self, data_array):\n        \"\"\" data_array can be Nx2 or Nx3.  In the former case, each row is\n        treated as (index, value), and this method returns screen X and Y\n        coordinates.  In the latter case, each row is treated as (index,\n        value_low, value_high), and the method returns either (x, ylow, yhigh)\n        or (y, xlow, xhigh) depending on self.orientation.\n        \"\"\"\n        if len(data_array) == 0:\n            return []\n        elif data_array.shape[1] == 2:\n            return LinePlot.map_screen(self, data_array)\n        else:\n            x, ylow, yhigh = transpose(data_array)\n            sx = self.index_mapper.map_screen(x)\n            sylow = self.value_mapper.map_screen(ylow)\n            syhigh = self.value_mapper.map_screen(yhigh)\n            return column_stack((sx, sylow, syhigh))\n\n    def get_screen_points(self):\n        self._gather_points()\n        return self.map_screen(self._cached_data_pts)\n\n    def _gather_points(self):\n\n        if self._cache_valid:\n            return\n\n        if not self.index or not self.value_low or not self.value_high:\n            return\n\n        index, index_mask = self.index.get_data_mask()\n        value_low, value_low_mask = self.value_low.get_data_mask()\n        value_high, value_high_mask = self.value_high.get_data_mask()\n        value_mask = value_low_mask & value_high_mask\n\n        l1, l2, l3 = sm.map(len, (index, value_low, value_high))\n        if 0 in (l1, l2, l3) or not (l1 == l2 == l3):\n            logger.warn(\"Chaco: using empty dataset; index_len=%d, value_low_len=%d, value_high_len=%d.\" % (l1,l2,l3))\n            self._cached_data_pts = []\n            self._cache_valid = True\n            return\n\n        index_range_mask = self.index_mapper.range.mask_data(index)\n        value_low_mask = self.value_mapper.range.mask_data(value_low)\n        value_high_mask = self.value_mapper.range.mask_data(value_high)\n        value_range_mask = value_low_mask | value_high_mask\n\n        nan_mask = invert(isnan(index_mask) | isnan(value_mask))\n        point_mask = index_mask & value_mask & nan_mask & index_range_mask & value_range_mask\n\n        points = column_stack((index, value_low, value_high))\n\n        self._cached_data_pts = compress(point_mask, points, axis=0)\n        self._cache_valid = True\n        return\n\n    def _render(self, gc, points, icon_mode=False):\n        if len(points) == 0:\n            return\n\n        if not icon_mode:\n            gc.clip_to_rect(self.x, self.y, self.width, self.height)\n\n        with gc:\n            gc.set_antialias(False)\n            gc.set_stroke_color(self.color_)\n            gc.set_line_width(self.line_width)\n            gc.set_line_dash(self.line_style_)\n\n            if self.orientation == \"h\":\n                x, ylow, yhigh = transpose(points)\n                start, end = column_stack((x, ylow)), column_stack((x, yhigh))\n                gc.line_set(start, end)\n                axis = 0\n                low = ylow\n                high = yhigh\n\n            else:\n                y, xlow, xhigh = transpose(points)\n                start, end = column_stack((xlow, y)), column_stack((xhigh, y))\n                gc.line_set(start, end)\n                axis = 1\n                low = xlow\n                high = xhigh\n\n            if self.endcap_style == \"bar\":\n                self._render_bar_endcap(gc, start, end, low, high, axis)\n            else:\n                gc.stroke_path()\n\n        if not icon_mode:\n            self._draw_default_axes(gc)\n        return\n\n\n    def _render_bar_endcap(self, gc, start, end, low, high, axis):\n        \"\"\" Renders the endcaps for endcap_style == \"bar\".  start and end are\n        the two endpoints of the bare errorbar.  axis is the column index\n        corresponding to the index direction, so for orientation of 'h', axis\n        is 0.\n\n        This method modifies start and end.\n        \"\"\"\n        delta = self.endcap_size / 2.0\n        start[:,axis] -= delta\n        end[:,axis] += delta\n\n        start[:,1-axis] = low\n        end[:,1-axis] = low\n        gc.line_set(start, end)\n\n        start[:,1-axis] = high\n        end[:,1-axis] = high\n        gc.line_set(start, end)\n        gc.stroke_path()\n        return\n\n\n    def _render_icon(self, gc, x, y, width, height):\n        pass\n", "path": "chaco/errorbar_plot.py"}]}