Hi Tymoteusz,

I think this does what you want (see attached).

I'm not sure about 3D though.

Gary R.

Tymoteusz Jankowski wrote:
Hi!

Can anyone help me to achive this?
I'd like to plot rgb spectrum with matplotlib.
For example let the x axis be green element, and for example... let the y axis be red element.
Eventually i'd like to plot 3D figure with all of three elements RGB.
Regards,
T.

import matplotlib.pyplot as plt
import numpy as np

a = np.outer(np.arange(0,256), np.ones(256,dtype=np.uint8))
rgb = np.zeros((256,256,3), dtype=np.uint8)
rgb[:,:,0] = a
rgb[:,:,1] = a.T
plt.imshow(rgb, origin='lower', interpolation='nearest')
plt.show()
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to