# Buggy code
def get_data(self, element, ranges, style):
    cdim = element.get_dimension(self.color_index or style.get("color"))

    with abbreviated_exception():
        style = self._apply_transforms(element, ranges, style)

    scalar = element.interface.isunique(element, cdim, per_geom=True) if cdim else False
    style_mapping = any(
        isinstance(v, util.arraylike_types) and not (k == "c" and scalar)
        for k, v in style.items()
    )
    dims = element.kdims
    xdim, ydim = dims
    generic_dt_format = Dimension.type_formatters[np.datetime64]
    paths, cvals, dims = [], [], {}
    for path in element.split(datatype="columns"):
        xarr, yarr = path[xdim.name], path[ydim.name]
        if util.isdatetime(xarr):
            dt_format = Dimension.type_formatters.get(type(xarr[0]), generic_dt_format)
            xarr = date2num(xarr)
            dims[0] = xdim(value_format=DateFormatter(dt_format))
        if util.isdatetime(yarr):
            dt_format = Dimension.type_formatters.get(type(yarr[0]), generic_dt_format)
            yarr = date2num(yarr)
            dims[1] = ydim(value_format=DateFormatter(dt_format))
        arr = np.column_stack([xarr, yarr])
        if not (self.color_index is not None or style_mapping):
            paths.append(arr)
            continue
        length = len(xarr)
        for s1, s2 in zip(range(length - 1), range(1, length + 1)):
            if cdim:
                cvals.append(path[cdim.name])
            paths.append(arr[s1 : s2 + 1])
    if self.invert_axes:
        paths = [p[::-1] for p in paths]
    if not (self.color_index or style_mapping):
        if cdim:
            style["array"] = style.pop("c")
            style["clim"] = style.pop("vmin", None), style.pop("vmax", None)
        return (paths,), style, {"dimensions": dims}
    if cdim:
        self._norm_kwargs(element, ranges, style, cdim)
        style["array"] = np.array(cvals)
    if "c" in style:
        style["array"] = style.pop("c")
    if "vmin" in style:
        style["clim"] = style.pop("vmin", None), style.pop("vmax", None)
    return (paths,), style, {"dimensions": dims}


# Traceback (KeyError)
---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
~/miniconda3/envs/py37/lib/python3.7/site-packages/IPython/core/formatters.py in __call__(self, obj, include, exclude)
968
969             if method is not None:
--> 970                 return method(include=include, exclude=exclude)
971             return None
972         else:

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/core/dimension.py in _repr_mimebundle_(self, include, exclude)
1302         combined and returned.
1303         """
-> 1304         return Store.render(self)
1305
1306

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/core/options.py in render(cls, obj)
1393         data, metadata = {}, {}
1394         for hook in hooks:
-> 1395             ret = hook(obj)
1396             if ret is None:
1397                 continue

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/ipython/display_hooks.py in pprint_display(obj)
280     if not ip.display_formatter.formatters['text/plain'].pprint:
281         return None
--> 282     return display(obj, raw_output=True)
283
284

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/ipython/display_hooks.py in display(obj, raw_output, **kwargs)
250     elif isinstance(obj, (CompositeOverlay, ViewableElement)):
251         with option_state(obj):
--> 252             output = element_display(obj)
253     elif isinstance(obj, (Layout, NdLayout, AdjointLayout)):
254         with option_state(obj):

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/ipython/display_hooks.py in wrapped(element)
144         try:
145             max_frames = OutputSettings.options['max_frames']
--> 146             mimebundle = fn(element, max_frames=max_frames)
147             if mimebundle is None:
148                 return {}, {}

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/ipython/display_hooks.py in element_display(element, max_frames)
190         return None
191
--> 192     return render(element)
193
194

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/ipython/display_hooks.py in render(obj, **kwargs)
66         renderer = renderer.instance(fig='png')
67
---> 68     return renderer.components(obj, **kwargs)
69
70

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/plotting/renderer.py in components(self, obj, fmt, comm, **kwargs)
353             plot = obj
354         else:
--> 355             plot, fmt = self._validate(obj, fmt)
356
357         data, metadata = {}, {}

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/plotting/renderer.py in _validate(self, obj, fmt, **kwargs)
278                                  renderer=self)
279         else:
--> 280             plot = self.get_plot(obj, renderer=self, **kwargs)
281
282         all_formats = set(fig_formats + holomap_formats)

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/plotting/renderer.py in get_plot(self_or_cls, obj, doc, renderer, comm, **kwargs)
221             init_key = tuple(v if d is None else d for v, d in
222                              zip(plot.keys[0], defaults))
--> 223             plot.update(init_key)
224         else:
225             plot = obj

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/plotting/mpl/plot.py in update(self, key)
257     def update(self, key):
258         if len(self) == 1 and ((key == 0) or (key == self.keys[0])) and not self.drawn:
--> 259             return self.initialize_plot()
260         return self.__getitem__(key)
261

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/plotting/mpl/plot.py in wrapper(self, *args, **kwargs)
53     def wrapper(self, *args, **kwargs):
54         with _rc_context(self.fig_rcparams):
---> 55             return f(self, *args, **kwargs)
56     return wrapper
57

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/plotting/mpl/element.py in initialize_plot(self, ranges)
508             style['label'] = element.label
509
--> 510         plot_data, plot_kwargs, axis_kwargs = self.get_data(element, ranges, style)
511
512         with abbreviated_exception():

~/miniconda3/envs/py37/lib/python3.7/site-packages/holoviews/plotting/mpl/path.py in get_data(self, element, ranges, style)
66         if not (self.color_index or style_mapping):
67             if cdim:
---> 68                 style['array'] = style.pop('c')
69                 style['clim'] = style.pop('vmin', None), style.pop('vmax', None)
70             return (paths,), style, {'dimensions': dims}

KeyError: 'c'

# Fixed code
def get_data(self, element, ranges, style):
    cdim = element.get_dimension(self.color_index)

    with abbreviated_exception():
        style = self._apply_transforms(element, ranges, style)

    scalar = element.interface.isunique(element, cdim, per_geom=True) if cdim else False
    style_mapping = any(
        isinstance(v, util.arraylike_types) and not (k == "c" and scalar)
        for k, v in style.items()
    )
    dims = element.kdims
    xdim, ydim = dims
    generic_dt_format = Dimension.type_formatters[np.datetime64]
    paths, cvals, dims = [], [], {}
    for path in element.split(datatype="columns"):
        xarr, yarr = path[xdim.name], path[ydim.name]
        if util.isdatetime(xarr):
            dt_format = Dimension.type_formatters.get(type(xarr[0]), generic_dt_format)
            xarr = date2num(xarr)
            dims[0] = xdim(value_format=DateFormatter(dt_format))
        if util.isdatetime(yarr):
            dt_format = Dimension.type_formatters.get(type(yarr[0]), generic_dt_format)
            yarr = date2num(yarr)
            dims[1] = ydim(value_format=DateFormatter(dt_format))
        arr = np.column_stack([xarr, yarr])
        if not (self.color_index is not None or style_mapping):
            paths.append(arr)
            continue
        length = len(xarr)
        for s1, s2 in zip(range(length - 1), range(1, length + 1)):
            if cdim:
                cvals.append(path[cdim.name])
            paths.append(arr[s1 : s2 + 1])
    if self.invert_axes:
        paths = [p[::-1] for p in paths]
    if not (self.color_index or style_mapping):
        if cdim:
            style["array"] = style.pop("c")
            style["clim"] = style.pop("vmin", None), style.pop("vmax", None)
        return (paths,), style, {"dimensions": dims}
    if cdim:
        self._norm_kwargs(element, ranges, style, cdim)
        style["array"] = np.array(cvals)
    if "c" in style:
        style["array"] = style.pop("c")
    if "vmin" in style:
        style["clim"] = style.pop("vmin", None), style.pop("vmax", None)
    return (paths,), style, {"dimensions": dims}