From: John Stone (johns_at_ks.uiuc.edu)
Date: Fri May 06 2022 - 01:06:40 CDT

Hi,
  Have a look at the underlying script that implements the color scale
bar, you can actually specify the location of the created color scale bar
if you run it as a script rather than using the GUI:

proc ::ColorScaleBar::color_scale_bar {{length 0.5} {width 0.05} {auto_scale 1} {fixed 1} {min 0} {max 100} {label_num 5} {text 16} {fp_format 0} {x_pos -1.0} {y_pos -1.0} {replacebar 1} {molid top} {repid 0} {showlegend 0} {legend "Color Scale:"}} {

So to call it from a script, you would do something like:
  package require colorscalebar
  ::ColorScaleBar::color_scale_bar all-the-parameters-you-need-to-customize...

As an example, I wrote a script for someone else to customize the position
for a particular 3-D plot they were making:

proc plotcolorscalebar { molid datamin datamax tics title textcolor } {
  #
  # useful default colorscalebar parameters
  #
  set lengthsetting 0.8
  set widthsetting 0.05
  set autoscale 0
  set fixedsetting 1
  set bar_text $title ;# "RMSD (Angstroms)"
  set text_show 1
  set minvalue $datamin
  set maxvalue $datamax
  set axislabels [expr $tics - 1] ;# 5
# set textcolor black
  set fpformat 0
  set xcoord -1.4 ;# default VMD camera space coords
  set ycoord 0.8 ;# default VMD camera space coords
  set replacebar 1
# set molid 0
  set repid 0

  ::ColorScaleBar::color_scale_bar $lengthsetting $widthsetting \
      $autoscale $fixedsetting $minvalue $maxvalue \
      $axislabels $textcolor $fpformat \
      $xcoord $ycoord $replacebar $molid $repid \
      $text_show $bar_text
}

Best regards,
  John Stone
  vmd_at_ks.uiuc.edu

On Sat, Mar 26, 2022 at 04:30:06AM +0300, Ahmad Alqaisi wrote:
> Hello all,
> Is there a way to change the location of the color scale bar in VMD?
> Ahmad Alqaisi

-- 
NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801
http://www.ks.uiuc.edu/~johns/           Phone: 217-244-3349
http://www.ks.uiuc.edu/Research/vmd/