diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-04-17 18:31:56 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-04-17 18:31:56 (GMT) |
commit | f960622c2911e07a9f3f6a874bd301902550ce8f (patch) | |
tree | 577882272ba7191322c50970693dfab3f5fab156 /ds9 | |
parent | e2e7af69f3a402890c6c8822d8879dfb442d2655 (diff) | |
download | blt-f960622c2911e07a9f3f6a874bd301902550ce8f.zip blt-f960622c2911e07a9f3f6a874bd301902550ce8f.tar.gz blt-f960622c2911e07a9f3f6a874bd301902550ce8f.tar.bz2 |
update graphs
Diffstat (limited to 'ds9')
-rw-r--r-- | ds9/library/graph.tcl | 23 | ||||
-rw-r--r-- | ds9/library/mview.tcl | 12 |
2 files changed, 23 insertions, 12 deletions
diff --git a/ds9/library/graph.tcl b/ds9/library/graph.tcl index ca507e9..91ffb62 100644 --- a/ds9/library/graph.tcl +++ b/ds9/library/graph.tcl @@ -31,6 +31,7 @@ proc GraphDef {} { # prefs only set pgraph(horz,grid) 1 set pgraph(horz,log) false + set pgraph(thick) 1 set pgraph(vert,grid) 1 set pgraph(vert,log) false } @@ -144,19 +145,17 @@ proc UpdateGraphXAxis {which} { } if {$view(graph,horz)} { - UpdateGraphXAxisHV $which $ds9(graph,horz) graphHorzX graphHorzY 1 + UpdateGraphXAxisHV $which $ds9(graph,horz) graphHorzX } if {$view(graph,vert)} { - UpdateGraphXAxisHV $which $ds9(graph,vert) graphVertX graphVertY 0 + UpdateGraphXAxisHV $which $ds9(graph,vert) graphVertX } } -proc UpdateGraphXAxisHV {which what vectorX vectorY cut} { +proc UpdateGraphXAxisHV {which what vectorX} { global igraph - - global graphHorzX graphHorzY - global graphVertX graphVertY + global graphHorzX graphVertX if {$which != {}} { set xMin [expr "$$vectorX\(min\)"] @@ -182,16 +181,17 @@ proc UpdateGraphYAxis {which} { } if {$view(graph,horz)} { - UpdateGraphYAxisHV $which $ds9(graph,horz) $pgraph(horz,log) + UpdateGraphYAxisHV $which $ds9(graph,horz) graphHorzY $pgraph(horz,log) } if {$view(graph,vert)} { - UpdateGraphYAxisHV $which $ds9(graph,vert) $pgraph(vert,log) + UpdateGraphYAxisHV $which $ds9(graph,vert) graphVertY $pgraph(vert,log) } } -proc UpdateGraphYAxisHV {which what log} { +proc UpdateGraphYAxisHV {which what vectorY log} { global igraph + global graphHorzY graphVertY if {$which != {}} { set minmax [$which get clip] @@ -258,10 +258,11 @@ proc ClearGraphData {} { proc UpdateGraph {which x y sys} { global ds9 global view + global pgraph if {[$which has fits]} { if {$view(graph,horz)} { - if {![catch {$which get horizontal cut graphHorzX graphHorzY $x $y $sys}]} { + if {![catch {$which get horizontal cut graphHorzX graphHorzY $x $y $sys $pgraph(thick)}]} { $ds9(graph,horz) element configure line1 -hide no } else { $ds9(graph,horz) element configure line1 -hide yes @@ -269,7 +270,7 @@ proc UpdateGraph {which x y sys} { } if {$view(graph,vert)} { - if {![catch {$which get vertical cut graphVertX graphVertY $x $y $sys}]} { + if {![catch {$which get vertical cut graphVertX graphVertY $x $y $sys $pgraph(thick)}]} { $ds9(graph,vert) element configure line1 -hide no } else { $ds9(graph,vert) element configure line1 -hide yes diff --git a/ds9/library/mview.tcl b/ds9/library/mview.tcl index 401b887..373a05f 100644 --- a/ds9/library/mview.tcl +++ b/ds9/library/mview.tcl @@ -144,6 +144,7 @@ proc PrefsDialogGraph {} { $dprefs(list) insert end [msgcat::mc {Graphs}] lappend dprefs(tabs) [ttk::frame $w.graph] + # Horz set f [ttk::labelframe $w.graph.horz -text [msgcat::mc {Horizontal}]] ttk::label $f.htitle -text [msgcat::mc {Default}] @@ -158,6 +159,7 @@ proc PrefsDialogGraph {} { grid $f.htitle $f.hgrid $f.hlinear $f.hlog -padx 2 -pady 2 -sticky w + # Vert set f [ttk::labelframe $w.graph.vert -text [msgcat::mc {Vertical}]] ttk::label $f.vtitle -text [msgcat::mc {Default}] @@ -172,7 +174,15 @@ proc PrefsDialogGraph {} { grid $f.vtitle $f.vgrid $f.vlinear $f.vlog -padx 2 -pady 2 -sticky w - pack $w.graph.horz $w.graph.vert -side top -fill both -expand true + # Thickness + set f [ttk::labelframe $w.graph.thick -text [msgcat::mc {Thickness}]] + + ttk::entry $f.thick -textvariable pgraph(thick) -width 13 + + grid $f.thick -padx 2 -pady 2 -sticky w + + pack $w.graph.horz $w.graph.vert $w.graph.thick \ + -side top -fill both -expand true } # Buttons |