Modifying properties of the shape plot

Using the graphical user interface to build and exercise models. Includes customizing the GUI by writing a little bit of hoc.
Post Reply
Sherif
Posts: 27
Joined: Thu Oct 13, 2005 4:32 pm

Modifying properties of the shape plot

Post 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
ted
Site Admin
Posts: 5810
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Post 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.
Post Reply