[Chimera-users] Showing color key programatically colouring from a volume...
pconesa at cnb.csic.es
Sat Dec 31 08:06:52 PST 2016
Thank you very much for your detailed explanation.
We finally got it working specifying a cmap for the scolor and setting
same values for color key.
On 30/12/16 17:55, Elaine Meng wrote:
> Hi Pablo,
> Unfortunately “scolor” lacks a “key” option. Some other color-by-value commands (coulombic, rangecolor) have this option, which automatically starts the Color Key dialog and fills it in with colors and values. However, it is similar to using the Surface Color dialog’s option to create color key, in that you still have to use the mouse to set color key location and dimensions in the window, and manually edit the value labels in the Color Key dialog if you want to round them or omit some of them from the display.
> For non-interactive, completely scripted Color Key drawing, you would have to use the “colorkey” command with explicit values and colors. It does not “know” about your data, so you’d have to determine the appropriate values programatically.
> I hope this helps,
> Elaine C. Meng, Ph.D.
> UCSF Computer Graphics Lab (Chimera team) and Babbitt Lab
> Department of Pharmaceutical Chemistry
> University of California, San Francisco
> On Dec 30, 2016, at 1:20 AM, Pablo Conesa <pconesa at cnb.csic.es> wrote:
>> Sorry! I realized that I created the color key through the "Surface color" tool.
>> So, by default there is no color key. I think now this is not doable unless I set the color key in the script.
>> On 30/12/16 09:21, Pablo Conesa wrote:
>>> Dear all
>>> We have this simple script to open a volume (#0) coloured using values from a second volume (#1):
>>> open betaGal.mrc
>>> open extra/MG_Chimera_resolution.vol
>>> volume #1 voxelSize 3.54
>>> vol #1 hide
>>> scolor #0 volume #1 cmap rainbow reverseColors True
>>> For scolor command we are using a volume.
>>> It would be nice to achieve something like this at start up (note the color key is based on the volume):
>>> <Mail Attachment.png>
>>> I've did it dragging the mouse over the canvas while "Color key" utility is open.
>>> And, is there a posibility to round up the values. Some kind of:
>>> Give the resulting color key
>>> for each round values
>>> display the color key
>>> I guess that if there is a way to get the color key, then rest can be done through commands.
>>> Cheers, Pablo.
More information about the Chimera-users