[Matplotlib-users] plot rgb spectrum

2010-04-04 Thread Tymoteusz Jankowski
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.

--
Download Intel#174; 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


Re: [Matplotlib-users] plot rgb spectrum

2010-04-04 Thread Gary Ruben

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#174; 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