Skip to content

Commit b57ca73

Browse files
committed
Show/hide lines in pairwise plot
1 parent 485c876 commit b57ca73

File tree

2 files changed

+17
-2
lines changed

2 files changed

+17
-2
lines changed

vmd/cv_dashboard/cv_dashboard.tcl

+2-2
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,8 @@ Please upgrade to VMD 1.9.4 alpha or later."
132132
if { [vecdist $abc {1 1 1}] < 1e-10 } {
133133
set answer [tk_messageBox -icon warning -type okcancel -title "Warning: unlikely periodic box lengths"\
134134
-message "The periodic box lengths are (1, 1, 1), which can be the output of a\
135-
non-periodic simulation in NAMD. Overwrite with (0, 0, 0) to make Colvars detect as non-periodic?
136-
The command line is:
135+
non-periodic simulation in NAMD. Overwrite with (0, 0, 0) to signal a non-periodic system?
136+
This will run the following commands:
137137
package require pbctools
138138
pbc set {0 0 0} -all -molid $::cv_dashboard::mol"]
139139
if { $answer == "ok" } {

vmd/cv_dashboard/cv_dashboard_plots.tcl

+15
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,8 @@ proc ::cv_dashboard::plot { { type timeline } } {
9292
menubutton $menubar.colvars -text "Colvars" -underline 0 -menu $menubar.colvars.menu
9393
menu $menubar.colvars.menu -tearoff 0
9494
$menubar.colvars.menu add command -label "Swap axes" -command ::cv_dashboard::pairwise_swap_axes
95+
$menubar.colvars.menu add command -label "Turn lines off" -command "::cv_dashboard::display_lines false"
96+
$menubar.colvars.menu add command -label "Turn lines on" -command "::cv_dashboard::display_lines true"
9597
# Add item to existing menu bar
9698
set col [lindex [grid size $menubar] 0]
9799
grid $menubar.colvars -row 0 -column $col -sticky nsw
@@ -544,4 +546,17 @@ proc ::cv_dashboard::pairwise_swap_axes {} {
544546

545547
$plothandle clear
546548
$plothandle add $y $x -xlabel $ylabel -ylabel $xlabel -plot
549+
}
550+
551+
552+
proc ::cv_dashboard::display_lines { yesno } {
553+
554+
variable ::cv_dashboard::plothandle
555+
if $yesno {
556+
set param "-lines"
557+
} else {
558+
set param "-nolines"
559+
}
560+
561+
$plothandle configure $param -plot
547562
}

0 commit comments

Comments
 (0)