We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
bar_plot_stacked example unfinished?
**Problem Description**
The example in https://github.com/enthought/chaco/blob/master/examples/demo/basic/bar_plot_stacked.py
doesn't do any stacking.

**Expected behavior:**
I the bars were really stacked, I would expect the sum of all bars to reach (10+5+2) * array([1,2,3,4,5]) (the sum of all values) respectively. Instead, I am getting the following:
![Screen Shot 2019-05-31 at 10 19 28 AM](https://user-images.githubusercontent.com/593945/58716239-31772f80-838e-11e9-84a8-9a2588263a15.png)

Looking at the code, it doesn't use the bar plot's `starting_value` as expected, so the demo doesn't even seem to try to do the right thing.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `examples/demo/basic/bar_plot_stacked.py`
Content:
```
1 """
2 Simple example of a stacked bar chart
3 """
4 
5 # Major library imports
6 import numpy
7 
8 # Enthought library imports
9 from enable.api import ComponentEditor
10 from traits.api import HasTraits, Instance
11 from traitsui.api import UItem, View
12 
13 # Chaco imports
14 from chaco.api import LabelAxis, Plot, ArrayPlotData
15 
16 class PlotExample(HasTraits):
17     plot = Instance(Plot)
18     traits_view = View(UItem('plot', editor=ComponentEditor()),
19                        width=400, height=400, resizable=True, 
20                       )
21 
22     def __init__(self, index, series_a, series_b, series_c, **kw):
23         super(PlotExample, self).__init__(**kw)
24 
25         plot_data = ArrayPlotData(index=index)
26         plot_data.set_data('series_a', series_a)
27         plot_data.set_data('series_b', series_b)
28         plot_data.set_data('series_c', series_c)
29         self.plot = Plot(plot_data)
30         self.plot.plot(('index', 'series_a'), type='bar', bar_width=0.8, color='auto')
31         self.plot.plot(('index', 'series_b'), type='bar', bar_width=0.8, color='auto')
32         self.plot.plot(('index', 'series_c'), type='bar', bar_width=0.8, color='auto')
33 
34         # set the plot's value range to 0, otherwise it may pad too much
35         self.plot.value_range.low = 0
36 
37         # replace the index values with some nicer labels
38         label_axis = LabelAxis(self.plot, orientation='bottom',
39                                title='Months',
40                                positions = list(range(1, 10)),
41                                labels = ['jan', 'feb', 'march', 'april', 'may'],
42                                small_haxis_style=True)
43 
44         self.plot.underlays.remove(self.plot.index_axis)
45         self.plot.index_axis = label_axis
46         self.plot.underlays.append(label_axis)
47 
48 
49 index = numpy.array([1,2,3,4,5])
50 demo = PlotExample(index, index*10, index*5, index*2)
51 
52 if __name__ == "__main__":
53     demo.configure_traits()
54
```
--- 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/examples/demo/basic/bar_plot_stacked.py b/examples/demo/basic/bar_plot_stacked.py
--- a/examples/demo/basic/bar_plot_stacked.py
+++ b/examples/demo/basic/bar_plot_stacked.py
@@ -11,7 +11,7 @@
 from traitsui.api import UItem, View
 
 # Chaco imports
-from chaco.api import LabelAxis, Plot, ArrayPlotData
+from chaco.api import LabelAxis, Plot, ArrayPlotData, ArrayDataSource
 
 class PlotExample(HasTraits):
     plot = Instance(Plot)
@@ -22,14 +22,18 @@
     def __init__(self, index, series_a, series_b, series_c, **kw):
         super(PlotExample, self).__init__(**kw)
 
+        # Stack them up
+        series_c = series_c + series_b + series_a
+        series_b = series_b + series_a
+
         plot_data = ArrayPlotData(index=index)
         plot_data.set_data('series_a', series_a)
         plot_data.set_data('series_b', series_b)
         plot_data.set_data('series_c', series_c)
         self.plot = Plot(plot_data)
         self.plot.plot(('index', 'series_a'), type='bar', bar_width=0.8, color='auto')
-        self.plot.plot(('index', 'series_b'), type='bar', bar_width=0.8, color='auto')
-        self.plot.plot(('index', 'series_c'), type='bar', bar_width=0.8, color='auto')
+        self.plot.plot(('index', 'series_b'), type='bar', bar_width=0.8, color='auto', starting_value=ArrayDataSource(series_a))
+        self.plot.plot(('index', 'series_c'), type='bar', bar_width=0.8, color='auto', starting_value=ArrayDataSource(series_b))
 
         # set the plot's value range to 0, otherwise it may pad too much
         self.plot.value_range.low = 0

{"golden_diff": "diff --git a/examples/demo/basic/bar_plot_stacked.py b/examples/demo/basic/bar_plot_stacked.py\n--- a/examples/demo/basic/bar_plot_stacked.py\n+++ b/examples/demo/basic/bar_plot_stacked.py\n@@ -11,7 +11,7 @@\n from traitsui.api import UItem, View\n \n # Chaco imports\n-from chaco.api import LabelAxis, Plot, ArrayPlotData\n+from chaco.api import LabelAxis, Plot, ArrayPlotData, ArrayDataSource\n \n class PlotExample(HasTraits):\n     plot = Instance(Plot)\n@@ -22,14 +22,18 @@\n     def __init__(self, index, series_a, series_b, series_c, **kw):\n         super(PlotExample, self).__init__(**kw)\n \n+        # Stack them up\n+        series_c = series_c + series_b + series_a\n+        series_b = series_b + series_a\n+\n         plot_data = ArrayPlotData(index=index)\n         plot_data.set_data('series_a', series_a)\n         plot_data.set_data('series_b', series_b)\n         plot_data.set_data('series_c', series_c)\n         self.plot = Plot(plot_data)\n         self.plot.plot(('index', 'series_a'), type='bar', bar_width=0.8, color='auto')\n-        self.plot.plot(('index', 'series_b'), type='bar', bar_width=0.8, color='auto')\n-        self.plot.plot(('index', 'series_c'), type='bar', bar_width=0.8, color='auto')\n+        self.plot.plot(('index', 'series_b'), type='bar', bar_width=0.8, color='auto', starting_value=ArrayDataSource(series_a))\n+        self.plot.plot(('index', 'series_c'), type='bar', bar_width=0.8, color='auto', starting_value=ArrayDataSource(series_b))\n \n         # set the plot's value range to 0, otherwise it may pad too much\n         self.plot.value_range.low = 0\n", "issue": "bar_plot_stacked example unfinished?\n**Problem Description**\r\nThe example in https://github.com/enthought/chaco/blob/master/examples/demo/basic/bar_plot_stacked.py\r\ndoesn't do any stacking.\r\n\r\n**Expected behavior:**\r\nI the bars were really stacked, I would expect the sum of all bars to reach (10+5+2) * array([1,2,3,4,5]) (the sum of all values) respectively. Instead, I am getting the following:\r\n![Screen Shot 2019-05-31 at 10 19 28 AM](https://user-images.githubusercontent.com/593945/58716239-31772f80-838e-11e9-84a8-9a2588263a15.png)\r\n\r\nLooking at the code, it doesn't use the bar plot's `starting_value` as expected, so the demo doesn't even seem to try to do the right thing.\r\n\n", "before_files": [{"content": "\"\"\"\nSimple example of a stacked bar chart\n\"\"\"\n\n# Major library imports\nimport numpy\n\n# Enthought library imports\nfrom enable.api import ComponentEditor\nfrom traits.api import HasTraits, Instance\nfrom traitsui.api import UItem, View\n\n# Chaco imports\nfrom chaco.api import LabelAxis, Plot, ArrayPlotData\n\nclass PlotExample(HasTraits):\n    plot = Instance(Plot)\n    traits_view = View(UItem('plot', editor=ComponentEditor()),\n                       width=400, height=400, resizable=True, \n                      )\n\n    def __init__(self, index, series_a, series_b, series_c, **kw):\n        super(PlotExample, self).__init__(**kw)\n\n        plot_data = ArrayPlotData(index=index)\n        plot_data.set_data('series_a', series_a)\n        plot_data.set_data('series_b', series_b)\n        plot_data.set_data('series_c', series_c)\n        self.plot = Plot(plot_data)\n        self.plot.plot(('index', 'series_a'), type='bar', bar_width=0.8, color='auto')\n        self.plot.plot(('index', 'series_b'), type='bar', bar_width=0.8, color='auto')\n        self.plot.plot(('index', 'series_c'), type='bar', bar_width=0.8, color='auto')\n\n        # set the plot's value range to 0, otherwise it may pad too much\n        self.plot.value_range.low = 0\n\n        # replace the index values with some nicer labels\n        label_axis = LabelAxis(self.plot, orientation='bottom',\n                               title='Months',\n                               positions = list(range(1, 10)),\n                               labels = ['jan', 'feb', 'march', 'april', 'may'],\n                               small_haxis_style=True)\n\n        self.plot.underlays.remove(self.plot.index_axis)\n        self.plot.index_axis = label_axis\n        self.plot.underlays.append(label_axis)\n\n\nindex = numpy.array([1,2,3,4,5])\ndemo = PlotExample(index, index*10, index*5, index*2)\n\nif __name__ == \"__main__\":\n    demo.configure_traits()\n", "path": "examples/demo/basic/bar_plot_stacked.py"}], "after_files": [{"content": "\"\"\"\nSimple example of a stacked bar chart\n\"\"\"\n\n# Major library imports\nimport numpy\n\n# Enthought library imports\nfrom enable.api import ComponentEditor\nfrom traits.api import HasTraits, Instance\nfrom traitsui.api import UItem, View\n\n# Chaco imports\nfrom chaco.api import LabelAxis, Plot, ArrayPlotData, ArrayDataSource\n\nclass PlotExample(HasTraits):\n    plot = Instance(Plot)\n    traits_view = View(UItem('plot', editor=ComponentEditor()),\n                       width=400, height=400, resizable=True, \n                      )\n\n    def __init__(self, index, series_a, series_b, series_c, **kw):\n        super(PlotExample, self).__init__(**kw)\n\n        # Stack them up\n        series_c = series_c + series_b + series_a\n        series_b = series_b + series_a\n\n        plot_data = ArrayPlotData(index=index)\n        plot_data.set_data('series_a', series_a)\n        plot_data.set_data('series_b', series_b)\n        plot_data.set_data('series_c', series_c)\n        self.plot = Plot(plot_data)\n        self.plot.plot(('index', 'series_a'), type='bar', bar_width=0.8, color='auto')\n        self.plot.plot(('index', 'series_b'), type='bar', bar_width=0.8, color='auto', starting_value=ArrayDataSource(series_a))\n        self.plot.plot(('index', 'series_c'), type='bar', bar_width=0.8, color='auto', starting_value=ArrayDataSource(series_b))\n\n        # set the plot's value range to 0, otherwise it may pad too much\n        self.plot.value_range.low = 0\n\n        # replace the index values with some nicer labels\n        label_axis = LabelAxis(self.plot, orientation='bottom',\n                               title='Months',\n                               positions = list(range(1, 10)),\n                               labels = ['jan', 'feb', 'march', 'april', 'may'],\n                               small_haxis_style=True)\n\n        self.plot.underlays.remove(self.plot.index_axis)\n        self.plot.index_axis = label_axis\n        self.plot.underlays.append(label_axis)\n\n\nindex = numpy.array([1,2,3,4,5])\ndemo = PlotExample(index, index*10, index*5, index*2)\n\nif __name__ == \"__main__\":\n    demo.configure_traits()\n", "path": "examples/demo/basic/bar_plot_stacked.py"}]}