diff options
Diffstat (limited to 'ds9/library/graph.tcl')
-rw-r--r-- | ds9/library/graph.tcl | 58 |
1 files changed, 32 insertions, 26 deletions
diff --git a/ds9/library/graph.tcl b/ds9/library/graph.tcl index 6f7d396..09860eb 100644 --- a/ds9/library/graph.tcl +++ b/ds9/library/graph.tcl @@ -54,31 +54,32 @@ proc CreateGraphs {} { set ds9(graph,horz) [blt::graph $ds9(main).horz \ -width $canvas(width) -height $igraph(size) \ -takefocus 0 \ - -background $ds9(bg) \ - -plotbackground $ds9(bg) \ + -background $ds9(plot,bg) \ + -plotbackground $ds9(plot,bg) \ + -foreground $ds9(plot,fg) \ -highlightthickness 0 \ -borderwidth 0 \ - -plotborderwidth 1 \ - -plotrelief solid \ -font [font actual TkDefaultFont] \ -rm $igraph(gap,x) \ -plotpadx -2 \ ] - # we need to manually set the element foreground color, i.e. use graph fg - set fgcolor [$ds9(graph,horz) cget -foreground] $ds9(graph,horz) legend configure -hide yes $ds9(graph,horz) crosshairs configure -color green $ds9(graph,horz) xaxis configure -hide no -showticks no -linewidth 0 \ - -bg $ds9(bg) - $ds9(graph,horz) x2axis configure -hide yes - $ds9(graph,horz) yaxis configure -hide yes - $ds9(graph,horz) y2axis configure -hide no -bg $ds9(bg) \ - -tickfont [font actual TkDefaultFont] - - $ds9(graph,horz) element create line1 -xdata graphHorzX -ydata graphHorzY \ - -color $fgcolor -symbol none + -bg $ds9(plot,bg) -color $ds9(plot,fg) + $ds9(graph,horz) x2axis configure -hide yes \ + -bg $ds9(plot,bg) -color $ds9(plot,fg) + $ds9(graph,horz) yaxis configure -hide yes \ + -bg $ds9(plot,bg) -color $ds9(plot,fg) + $ds9(graph,horz) y2axis configure -hide no -bg $ds9(plot,bg) \ + -tickfont [font actual TkDefaultFont] \ + -bg $ds9(plot,bg) -color $ds9(plot,fg) + + $ds9(graph,horz) element create line1 \ + -xdata graphHorzX -ydata graphHorzY -symbol none \ + -color $ds9(plot,fg) bind $ds9(graph,horz) <Enter> [list EnterGraph $ds9(graph,horz) 1] bind $ds9(graph,horz) <Leave> [list LeaveGraph $ds9(graph,horz)] @@ -96,12 +97,11 @@ proc CreateGraphs {} { -invertxy yes \ -width $igraph(size) -height $canvas(height) \ -takefocus 0 \ - -background $ds9(bg) \ - -plotbackground $ds9(bg) \ + -background $ds9(plot,bg) \ + -plotbackground $ds9(plot,bg) \ + -foreground $ds9(plot,fg) \ -highlightthickness 0 \ -borderwidth 0 \ - -plotborderwidth 1 \ - -plotrelief solid \ -font [font actual TkDefaultFont] \ -bm $igraph(gap,y) \ -plotpady -2 \ @@ -109,15 +109,21 @@ proc CreateGraphs {} { $ds9(graph,vert) legend configure -hide yes $ds9(graph,vert) crosshairs configure -color green - $ds9(graph,vert) xaxis configure -hide yes -descending yes - $ds9(graph,vert) x2axis configure -hide no -descending yes \ - -showticks no -linewidth 0 -bg $ds9(bg) - $ds9(graph,vert) yaxis configure -hide no -descending yes \ - -bg $ds9(bg) -tickfont [font actual TkDefaultFont] - $ds9(graph,vert) y2axis configure -hide yes -descending yes + $ds9(graph,vert) xaxis configure -hide yes -descending yes \ + -bg $ds9(plot,bg) -color $ds9(plot,fg) + $ds9(graph,vert) x2axis configure -hide no -descending yes \ + -showticks no -linewidth 0 \ + -bg $ds9(plot,bg) -color $ds9(plot,fg) \ - $ds9(graph,vert) element create line1 -xdata graphVertX -ydata graphVertY \ - -color $fgcolor -symbol none + $ds9(graph,vert) yaxis configure -hide no -descending yes \ + -tickfont [font actual TkDefaultFont] \ + -bg $ds9(plot,bg) -color $ds9(plot,fg) + $ds9(graph,vert) y2axis configure -hide yes -descending yes \ + -bg $ds9(plot,bg) -color $ds9(plot,fg) + + $ds9(graph,vert) element create line1 \ + -xdata graphVertX -ydata graphVertY -symbol none \ + -color $ds9(plot,fg) bind $ds9(graph,vert) <Enter> [list EnterGraph $ds9(graph,vert) 0] bind $ds9(graph,vert) <Leave> [list LeaveGraph $ds9(graph,vert)] |