tags:

views:

27

answers:

0

Dear all,

I am starting on wx, and I need to plot a matrix (like a grid) that is stored on a list of lists on wx Frame. My matrix have to values, and I would like to set different colors for each values.

mymatrix=[[100,200,200,200,100,200,200,200,100,100], [200,200,100,100,100,100,200,200,100,200], [100,100,200,200,100,100,100,100,100,100], [100,200,200,100,200,100,100,200,200,200], [200,100,200,100,100,100,100,200,100,100], [100,200,200,100,200,200,100,200,100,100], [200,100,200,100,100,100,200,100,100,100], [200,200,100,200,100,200,200,200,200,200], [200,200,200,100,200,200,200,100,100,100], [100,100,100,200,200,200,100,200,200,100]]

a = numpy.array(landscape_matrix) im = Image.fromarray(a)

I can show it using im.show() but I need to plot it on a wx frame.

any help are welcome.

cheers

[email protected]