title: RGB cube of an image
body: <p>I'm trying to create a RGB cube of a image with matplotlib in python. I have a python list with the RGB of all the pixels in format <code>[(2,152,255),(0,0,0)...]</code>. I plot all the points with scatter function, but i don't know how to plot each RGB point with it's respective RGB colour. </p>
  
  <p>I've tried doing something like this <code>ax.scatter(paleta[0],paleta[1],paleta[2],c = RGBlist)</code>, but the function expect a RGBa value...</p>
  
  <p>I expect somthig like this:</p>
  
  <p><img src="https://i.stack.imgur.com/umq8h.png" alt="enter image description here"></p>
  
  <p><strong>CODE :</strong></p>
  
  <p><pre></p>
  
  <code>paleta=zip(*RGBlist)        
  fig = plt.figure()
  ax = fig.add_subplot(111, projection='3d')
  ax.scatter(paleta[0],paleta[1],paleta[2])
  ax.grid(False)
  ax.set_title('grid on')
  plt.savefig('Images\\RGBcube.png')
  </code></pre>
  
  <p></p>