Page 1 of 1

Modifying properties of the shape plot

Posted: Thu Mar 15, 2007 2:37 am
by Sherif
Hello All,

I want to modify the shape plot in order to visualize a variable (other than voltage, e.g., ina) using the color map. I tried implementing that by having a shape plot whose object ID was PlotShape[0], then I used the following code to modify its properties:

Code: Select all

PlotShape[0].varaible("ina")              // high value is negative as ina 
                                                  // is an inward current
PlotShape[0].scale(0, -0.01)             // I know that the max magnitude
                                                 // of ina is 0.01


When I used that code, I didn’t see changes in the color map during changes of ina. Is there anything that is missing?

Also, the function '.scale' allows for setting the high and low values of the color map, but can we set the range of each color band in the map independently (e.g., yellow band: 0 to -0.001; red -0.001 to -0.003 and so on)?

Thank you very much.

Sherif

Posted: Thu Mar 15, 2007 10:37 am
by ted
Maybe it's not being updated during every fadvance(). Have you tried
fast_flush_list.append(PlotShape[0])
?
can we set the range of each color band in the map independently
Yes, using the colormap() method.--see
http://www.neuron.yale.edu/neuron/stati ... l#colormap
plotshapename.colormap(i, rrr, ggg, bbb)
sets the ith entry in the map to the RGB color specified by rrr, ggg, bbb
Calling colormap with a single integer argument with value N destroys the existing color
map, and creates a new map with N entries--all gray at first, waiting for you to set new
colors.