Otrek Wilke | 9 Feb 08:46
Picon
Picon

{Mayavi} Howto change colormap from within python script

Hello Everybody!

I'm quite new to mayavi, so please make allowance with me if my question is kind of stupid, but right now i just
don't get it.

Anyways here's my problem:

I have a data set, stored in IJ ordered array, with x,y,z and scalar values in separate arrays.
I plot them using mlab:
mlab.mesh(x,y,z,colormap="blue-red",figure=one,scalars=u)

Further i've found that i can show the colorbar via:
mlab.scalarbar(title='Velocity u',orientation='vertical',nb_labels=11)

So far so good :)

Now here comes my problem:
I want to change the maximum and the minimum color of the scalarbar. Like: it should have the boundary values
[0.0 to 1.0] instead of [-0.05 to 1.135]
I found a way to do it via the gui, but i want to do it from within my python script.

I hope it's clear what i wanna do, any help is welcome :)
If this is the wrong board, I would be glad for directions to a proper one

Thanks and best regards
Otrek

--

-- 
Jetzt kostenlos herunterladen: Internet Explorer 8 und Mozilla Firefox 3.5 -
sicherer, schneller und einfacher! http://portal.gmx.net/de/go/chbrowser

Gmane