summaryrefslogtreecommitdiffstats
path: root/ds9/library
diff options
context:
space:
mode:
authorWilliam Joye <wjoye@cfa.harvard.edu>2019-03-06 19:38:48 (GMT)
committerWilliam Joye <wjoye@cfa.harvard.edu>2019-03-06 19:38:48 (GMT)
commit8e49fdc04b3373f337fe78915ba375b0cde02185 (patch)
treea8e939656d7366fe014c115c581fa4311c857480 /ds9/library
parent879d80b47fdfa7d5f3d54c765b2e28877dabb939 (diff)
downloadblt-8e49fdc04b3373f337fe78915ba375b0cde02185.zip
blt-8e49fdc04b3373f337fe78915ba375b0cde02185.tar.gz
blt-8e49fdc04b3373f337fe78915ba375b0cde02185.tar.bz2
PLOT: support graph bg color
Diffstat (limited to 'ds9/library')
-rw-r--r--ds9/library/plot.tcl6
-rw-r--r--ds9/library/plotbar.tcl2
-rw-r--r--ds9/library/plotdialog.tcl4
-rw-r--r--ds9/library/plotline.tcl2
-rw-r--r--ds9/library/plotprocess.tcl9
-rw-r--r--ds9/library/plotscatter.tcl2
6 files changed, 17 insertions, 8 deletions
diff --git a/ds9/library/plot.tcl b/ds9/library/plot.tcl
index 8b626d2..1749e3c 100644
--- a/ds9/library/plot.tcl
+++ b/ds9/library/plot.tcl
@@ -12,6 +12,7 @@ proc PlotDef {} {
set iap(windows) {}
set iap(unique) 0
+ set pap(graph,bg) white
set pap(graph,title) {}
set pap(graph,title,family) helvetica
set pap(graph,title,size) 12
@@ -837,6 +838,8 @@ proc PlotSaveConfigFile {varname filename} {
set ch [open $filename w]
+ set analysisplot(graph,bg) $var(graph,bg)
+
set analysisplot(graph,title) $var(graph,title)
set analysisplot(graph,title,family) $var(graph,title,family)
set analysisplot(graph,title,size) $var(graph,title,size)
@@ -1094,7 +1097,8 @@ proc PlotUpdateGraph {varname} {
# Graph
$var(graph) configure -plotpadx 0 -plotpady 0 \
-title $var(graph,title) \
- -font "{$ds9($var(graph,title,family))} $var(graph,title,size) $var(graph,title,weight) $var(graph,title,slant)"
+ -font "{$ds9($var(graph,title,family))} $var(graph,title,size) $var(graph,title,weight) $var(graph,title,slant)" \
+ -bg $var(graph,bg) -plotbackground $var(graph,bg)
$var(graph) xaxis configure \
-grid $var(axis,x,grid) -logscale $var(axis,x,log) \
diff --git a/ds9/library/plotbar.tcl b/ds9/library/plotbar.tcl
index 3779aa6..3a1a75c 100644
--- a/ds9/library/plotbar.tcl
+++ b/ds9/library/plotbar.tcl
@@ -145,8 +145,6 @@ proc PlotDialogBar {varname} {
-width 600 \
-height 500 \
-highlightthickness 0 \
- -bg $ds9(bg) \
- -plotbackground $ds9(bg) \
]
$var(graph) xaxis configure -grid no -stepsize 0
diff --git a/ds9/library/plotdialog.tcl b/ds9/library/plotdialog.tcl
index 730889d..1e83a86 100644
--- a/ds9/library/plotdialog.tcl
+++ b/ds9/library/plotdialog.tcl
@@ -122,6 +122,8 @@ proc PlotDialog {varname wtt title xaxis yaxis} {
-menu $var(mb).graph.legend
$var(mb).graph add cascade -label [msgcat::mc {Font}] \
-menu $var(mb).graph.font
+ $var(mb).graph add cascade -label [msgcat::mc {Background}] \
+ -menu $var(mb).graph.bg
$var(mb).graph add separator
$var(mb).graph add command -label "[msgcat::mc {Title}]..." \
-command [list PlotTitleDialog $varname]
@@ -186,6 +188,8 @@ proc PlotDialog {varname wtt title xaxis yaxis} {
FontMenu $var(mb).graph.font.legendtitle $varname legend,title,family legend,title,size legend,title,weight legend,title,slant [list $var(proc,updategraph) $varname]
FontMenu $var(mb).graph.font.legend $varname legend,font,family legend,font,size legend,font,weight legend,font,slant [list $var(proc,updategraph) $varname]
+ PlotColorMenu $var(mb).graph.bg $varname graph,bg [list $var(proc,updategraph) $varname]
+
# dataset
menu $var(mb).dataset
diff --git a/ds9/library/plotline.tcl b/ds9/library/plotline.tcl
index eae53f3..7ad08cc 100644
--- a/ds9/library/plotline.tcl
+++ b/ds9/library/plotline.tcl
@@ -225,8 +225,6 @@ proc PlotDialogLine {varname} {
-width 600 \
-height 500 \
-highlightthickness 0 \
- -bg $ds9(bg) \
- -plotbackground $ds9(bg) \
]
pack $var(graph) -expand yes -fill both
diff --git a/ds9/library/plotprocess.tcl b/ds9/library/plotprocess.tcl
index 7575013..d4bef17 100644
--- a/ds9/library/plotprocess.tcl
+++ b/ds9/library/plotprocess.tcl
@@ -12,6 +12,13 @@ proc PrefsDialogPlot {} {
$dprefs(list) insert end [msgcat::mc {Plot}]
lappend dprefs(tabs) [ttk::frame $w.plot]
+ # Graph
+ set f [ttk::labelframe $w.plot.graph -text [msgcat::mc {Graph}]]
+ ttk::label $f.tbg -text [msgcat::mc {Background}]
+ ColorMenuButton $f.bg pap graph,bg {}
+
+ grid $f.tbg $f.bg -padx 2 -pady 2 -sticky w
+
# Grid
set f [ttk::labelframe $w.plot.grid -text [msgcat::mc {Grid}]]
ttk::label $f.ttitle -text [msgcat::mc {Title}]
@@ -95,7 +102,7 @@ proc PrefsDialogPlot {} {
grid $f.errortitle $f.error $f.errorcap $f.errorcolor $f.errorwidth \
-padx 2 -pady 2 -sticky w
- pack $w.plot.grid $w.plot.axis $w.plot.dataset \
+ pack $w.plot.graph $w.plot.grid $w.plot.axis $w.plot.dataset \
-side top -fill both -expand true
}
diff --git a/ds9/library/plotscatter.tcl b/ds9/library/plotscatter.tcl
index 18f7944..a9b7fc5 100644
--- a/ds9/library/plotscatter.tcl
+++ b/ds9/library/plotscatter.tcl
@@ -152,8 +152,6 @@ proc PlotDialogScatter {varname} {
-width 600 \
-height 500 \
-highlightthickness 0 \
- -bg $ds9(bg) \
- -plotbackground $ds9(bg) \
]
pack $var(graph) -expand yes -fill both