<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Hi Roberto,<div class=""><br class=""></div><div class=""> That's a pretty cool hack! You could even have two labels for each color one that just shows the color (all space characters) and to the right of it another label showing the number.</div><div class=""><br class=""></div><div class=""> Here's an image I made with your script.</div><div class=""><br class=""></div><div class=""><span class="Apple-tab-span" style="white-space:pre"> </span>Tom</div><div class=""><br class=""></div><div class=""><img apple-inline="yes" id="BAFE8EEF-3089-4DEE-98E0-E2B141B82B10" width="314" height="227" src="cid:D4DF36A8-4BB2-4AE4-B469-3B87AFAA9B66" class=""></div><div class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On Jul 1, 2020, at 3:30 PM, Roberto Marabini <<a href="mailto:roberto@cnb.csic.es" class="">roberto@cnb.csic.es</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="">Hi,<br class=""><br class=""> Thanks for the information. Finally, I decided to write a small<br class="">python script that use"2dlabels" to create a kind of keybar. The<br class="">solution is not a generic one but works for me. I attach the output of<br class="">the python script to this email since it may be helpful for someone.<br class="">====<br class="">from chimerax.core.commands import run<br class="">from chimerax.graphics.windowsize import window_size<br class="">from PyQt5.QtGui import QFontMetrics<br class="">from PyQt5.QtGui import QFont<br class="">run(session, 'set bgColor white')<br class="">run(session, 'open<br class="">Runs/000215_ProtRelionLocalRes/extra/relion_locres_filtered.mrc')<br class="">run(session, 'open Runs/000215_ProtRelionLocalRes/extra/relion_locres.mrc')<br class="">run(session, 'volume #1 voxelSize 7.08')<br class="">run(session, 'volume #2 voxelSize 7.08')<br class="">run(session, 'hide #2')<br class="">run(session, 'color sample #1 map #2 palette<br class="">14.16,#0000da:17.15,#001cff:20.13,#006cff:23.12,#00b8ff:26.11,#1cffdb:29.09,#5dff9a:32.08,#9aff5d:35.07,#dbff1c:38.05,#ffcc00:41.04,#ff8600:44.03,#ff3b00:47.01,#da0000:50.0,#800000')<br class="">font = QFont("Ariel", 12)<br class="">f = QFontMetrics(font)<br class="">_height = f.height()<br class="">v = session.main_view<br class="">vx,vy=v.window_size<br class="">step = run(session, "2dlabel text 14.16 bgColor #0000da xpos 0.01 ypos<br class="">%f size 12" % (0.000000*_height/vx))<br class="">run(session, "2dlabel text 17.15 bgColor #001cff xpos 0.01 ypos %f<br class="">size 12" % (2.000000*_height/vx))<br class="">run(session, "2dlabel text 20.13 bgColor #006cff xpos 0.01 ypos %f<br class="">size 12" % (4.000000*_height/vx))<br class="">run(session, "2dlabel text 23.12 bgColor #00b8ff xpos 0.01 ypos %f<br class="">size 12" % (6.000000*_height/vx))<br class="">run(session, "2dlabel text 26.11 bgColor #1cffdb xpos 0.01 ypos %f<br class="">size 12" % (8.000000*_height/vx))<br class="">run(session, "2dlabel text 29.09 bgColor #5dff9a xpos 0.01 ypos %f<br class="">size 12" % (10.000000*_height/vx))<br class="">run(session, "2dlabel text 32.08 bgColor #9aff5d xpos 0.01 ypos %f<br class="">size 12" % (12.000000*_height/vx))<br class="">run(session, "2dlabel text 35.07 bgColor #dbff1c xpos 0.01 ypos %f<br class="">size 12" % (14.000000*_height/vx))<br class="">run(session, "2dlabel text 38.05 bgColor #ffcc00 xpos 0.01 ypos %f<br class="">size 12" % (16.000000*_height/vx))<br class="">run(session, "2dlabel text 41.04 bgColor #ff8600 xpos 0.01 ypos %f<br class="">size 12" % (18.000000*_height/vx))<br class="">run(session, "2dlabel text 44.03 bgColor #ff3b00 xpos 0.01 ypos %f<br class="">size 12" % (20.000000*_height/vx))<br class="">run(session, "2dlabel text 47.01 bgColor #da0000 xpos 0.01 ypos %f<br class="">size 12" % (22.000000*_height/vx))<br class="">run(session, "2dlabel text 50.00 bgColor #800000 xpos 0.01 ypos %f<br class="">size 12" % (24.000000*_height/vx))<br class="">====<br class=""><br class="">On Wed, Jul 1, 2020 at 5:18 PM Elaine Meng <<a href="mailto:meng@cgl.ucsf.edu" class="">meng@cgl.ucsf.edu</a>> wrote:<br class=""><blockquote type="cite" class=""><br class="">Hi Roberto,<br class="">No, ChimeraX does not yet have a color key. It is listed in the "missing features" section on the ChimeraX download page.<br class=""><br class="">I do not know of other alternatives, although they probably do exist. This has been discussed in previous posts, such as this thread:<br class=""><<a href="http://www.rbvi.ucsf.edu/pipermail/chimerax-users/2020-June/001282.html" class="">http://www.rbvi.ucsf.edu/pipermail/chimerax-users/2020-June/001282.html</a>><br class=""><br class="">Best,<br class="">Elaine<br class="">-----<br class="">Elaine C. Meng, Ph.D.<br class="">UCSF Chimera(X) team<br class="">Department of Pharmaceutical Chemistry<br class="">University of California, San Francisco<br class=""><br class=""><br class=""><blockquote type="cite" class="">On Jul 1, 2020, at 4:25 AM, Roberto Marabini <<a href="mailto:roberto@cnb.csic.es" class="">roberto@cnb.csic.es</a>> wrote:<br class=""><br class="">hi,<br class="">Is there a colorkey command in chimeraX<br class="">(<a href="http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/2dlabels/2dlabels.html#colorkey" class="">http://www.rbvi.ucsf.edu/chimera/docs/ContributedSoftware/2dlabels/2dlabels.html#colorkey</a>>)?<br class="">If it does not exist, is there any alternative other than using<br class="">chimera and photoshop?<br class=""> Thanks<br class=""> Roberto<br class=""></blockquote><br class=""></blockquote>_______________________________________________<br class="">ChimeraX-users mailing list<br class=""><a href="mailto:ChimeraX-users@cgl.ucsf.edu" class="">ChimeraX-users@cgl.ucsf.edu</a><br class="">Manage subscription:<br class="">https://www.rbvi.ucsf.edu/mailman/listinfo/chimerax-users<br class=""><br class=""></div></div></blockquote></div><br class=""></div></body></html>