diff options
author | William Joye <wjoye@cfa.harvard.edu> | 2017-04-20 16:57:28 (GMT) |
---|---|---|
committer | William Joye <wjoye@cfa.harvard.edu> | 2017-04-20 16:57:28 (GMT) |
commit | 2a75d620242fbd85320b0d48b5ee457d9faeeebc (patch) | |
tree | 8606ac83e3ac25d48446295234a0c4245d093aa8 /ds9/library/graph.tcl | |
parent | 382abeffcc61ef20a0288c52b09142db3cf3585e (diff) | |
download | blt-2a75d620242fbd85320b0d48b5ee457d9faeeebc.zip blt-2a75d620242fbd85320b0d48b5ee457d9faeeebc.tar.gz blt-2a75d620242fbd85320b0d48b5ee457d9faeeebc.tar.bz2 |
enhance graphs
Diffstat (limited to 'ds9/library/graph.tcl')
-rw-r--r-- | ds9/library/graph.tcl | 47 |
1 files changed, 15 insertions, 32 deletions
diff --git a/ds9/library/graph.tcl b/ds9/library/graph.tcl index ab6a987..9b37697 100644 --- a/ds9/library/graph.tcl +++ b/ds9/library/graph.tcl @@ -151,21 +151,26 @@ proc UpdateGraphGrid {} { $ds9(graph,vert) yaxis configure -grid $graph(vert,grid) -tickdefault 4 } -proc UpdateGraphXAxis {which} { +proc UpdateGraphAxis {which} { global ds9 global view + global graph global debug if {$debug(tcl,update)} { - puts stderr "UpdateGraphXAxis" + puts stderr "UpdateGraphAxis" } if {$view(graph,horz)} { UpdateGraphXAxisHV $which $ds9(graph,horz) graphHorzX + UpdateGraphYAxisHV $which $ds9(graph,horz) graphHorzY \ + $graph(horz,log) $graph(horz,thick) $graph(horz,method) } if {$view(graph,vert)} { UpdateGraphXAxisHV $which $ds9(graph,vert) graphVertX + UpdateGraphYAxisHV $which $ds9(graph,vert) graphVertY \ + $graph(vert,log) $graph(vert,thick) $graph(vert,method) } } @@ -185,28 +190,6 @@ proc UpdateGraphXAxisHV {which what vectorX} { } } -proc UpdateGraphYAxis {which} { - global graph - - global ds9 - global view - - global debug - if {$debug(tcl,update)} { - puts stderr "UpdateGraphYAxis" - } - - if {$view(graph,horz)} { - UpdateGraphYAxisHV $which $ds9(graph,horz) graphHorzY \ - $graph(horz,log) $graph(horz,thick) $graph(horz,method) - } - - if {$view(graph,vert)} { - UpdateGraphYAxisHV $which $ds9(graph,vert) graphVertY \ - $graph(vert,log) $graph(vert,thick) $graph(vert,method) - } -} - proc UpdateGraphYAxisHV {which what vectorY log thick method} { global igraph global graphHorzY graphVertY @@ -467,19 +450,19 @@ proc GraphDialog {} { ttk::label $f.htaxis -text [msgcat::mc {Axis}] ttk::radiobutton $f.hlaxis -text [msgcat::mc {Linear}] \ -variable graph(horz,log) -value false \ - -command [list UpdateGraphYAxis $current(frame)] + -command [list UpdateGraphAxis $current(frame)] ttk::radiobutton $f.hgaxis -text [msgcat::mc {Log}] \ -variable graph(horz,log) -value true \ - -command [list UpdateGraphYAxis $current(frame)] + -command [list UpdateGraphAxis $current(frame)] ttk::label $f.htthick -text [msgcat::mc {Thickness}] ttk::entry $f.hthick -textvariable graph(horz,thick) -width 7 ttk::label $f.htmethod -text [msgcat::mc {Method}] ttk::radiobutton $f.hamethod -text [msgcat::mc {Average}] \ -variable graph(horz,method) -value average \ - -command [list UpdateGraphYAxis $current(frame)] + -command [list UpdateGraphAxis $current(frame)] ttk::radiobutton $f.hsmethod -text [msgcat::mc {Sum}] \ -variable graph(horz,method) -value sum \ - -command [list UpdateGraphYAxis $current(frame)] + -command [list UpdateGraphAxis $current(frame)] grid $f.hgrid -padx 2 -pady 2 -sticky w grid $f.htaxis $f.hlaxis $f.hgaxis -padx 2 -pady 2 -sticky w @@ -495,19 +478,19 @@ proc GraphDialog {} { ttk::label $f.vtaxis -text [msgcat::mc {Axis}] ttk::radiobutton $f.vlaxis -text [msgcat::mc {Linear}] \ -variable graph(vert,log) -value false \ - -command [list UpdateGraphYAxis $current(frame)] + -command [list UpdateGraphAxis $current(frame)] ttk::radiobutton $f.vgaxis -text [msgcat::mc {Log}] \ -variable graph(vert,log) -value true \ - -command [list UpdateGraphYAxis $current(frame)] + -command [list UpdateGraphAxis $current(frame)] ttk::label $f.vtthick -text [msgcat::mc {Thickness}] ttk::entry $f.vthick -textvariable graph(vert,thick) -width 7 ttk::label $f.vtmethod -text [msgcat::mc {Method}] ttk::radiobutton $f.vamethod -text [msgcat::mc {Average}] \ -variable graph(vert,method) -value average \ - -command [list UpdateGraphYAxis $current(frame)] + -command [list UpdateGraphAxis $current(frame)] ttk::radiobutton $f.vsmethod -text [msgcat::mc {Sum}] \ -variable graph(vert,method) -value sum \ - -command [list UpdateGraphYAxis $current(frame)] + -command [list UpdateGraphAxis $current(frame)] grid $f.vgrid -padx 2 -pady 2 -sticky w grid $f.vtaxis $f.vlaxis $f.vgaxis -padx 2 -pady 2 -sticky w |