title: AttributeError: 'Line2D' object has no property 'cmap'
body: <p>I'm trying to visualize a dataset in python by matplotlib. I need points connected to each other by lines. I also have a colour pattern to show differences in changes. However, I need a coloured line instead of coloured points in 3D Plotter. Here is my code:</p>
  <pre><code>divnorm = TwoSlopeNorm(vmin=-3., vcenter=0, vmax=5)
      color_array = [get_color(v) for v in vario[1:200]]
      ax.plot3D(coordXList[:199], coordYList[:199], alt[1:200],c=color_array, cmap='RdYlBu_r') #, cmap='RdYlBu_r')
      im = ax.scatter3D(coordXList[:199], coordYList[:199], alt[1:200],
                        norm=divnorm, c=color_array, cmap='RdYlBu_r')
  
  
      ax.set_xlabel('X Axis')
      ax.set_ylabel('Y Axis')
      ax.set_zlabel('Z Axis')
  
      ax.view_init(elev=10., azim=45)
  
      plt.show()
  
      Main()
  </code></pre>
  <p>I can visualize the data if use 'k' instead of <code>c=color_array, cmap='RdYlBu_r'</code>
  but when I try to other cmap, I get</p>
  <pre><code>    Traceback (most recent call last):
    File &quot;C:/Users/HP/PycharmProjects/GPS reading/thermal line_PL (1).py&quot;, line 136, in &lt;module&gt;
      ax.plot3D(coordXList[:199], coordYList[:199], alt[1:200],c=color_array, cmap='RdYlBu_r' ) #, cmap='RdYlBu_r')
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\mpl_toolkits\mplot3d\axes3d.py&quot;, line 1471, in plot
      lines = super().plot(xs, ys, *args, **kwargs)
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\axes\_axes.py&quot;, line 1743, in plot
      lines = [*self._get_lines(*args, data=data, **kwargs)]
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\axes\_base.py&quot;, line 273, in __call__
      yield from self._plot_args(this, kwargs)
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\axes\_base.py&quot;, line 419, in _plot_args
      for j in range(max(ncx, ncy))]
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\axes\_base.py&quot;, line 419, in &lt;listcomp&gt;
      for j in range(max(ncx, ncy))]
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\axes\_base.py&quot;, line 312, in _makeline
      seg = mlines.Line2D(x, y, **kw)
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\lines.py&quot;, line 390, in __init__
      self.update(kwargs)
    File &quot;C:\Users\HP\AppData\Local\Programs\Python\Python37\lib\site-packages\matplotlib\artist.py&quot;, line 996, in update
      raise AttributeError(f&quot;{type(self).__name__!r} object &quot;
  AttributeError: 'Line2D' object has no property 'cmap'
  </code></pre>
  <p>Process finished with exit code 1</p>
  <p>Thanks</p>