set isProcReady false
proc qq_dependency {} {
global qq
global ytrans
if {"[$qq getCurrentValue]" == "Y"} {
$ytrans setCurrentValue None
$ytrans setInputAllowed false
} else {
$ytrans setInputAllowed true
}
}
proc qq_validation {} {
global qq
global leastsquares
if {"[$qq getCurrentValue]" == "Y" && "[$leastsquares getCurrentValue]" == "Y"} {
GuidoMessage warning "A line of best fit cannot be drawn on a Q-Q plot."
} else {
return true
}
return false
}
proc leastsquares { isProcInit } {
global isProcReady
if { $isProcInit } {
set isProcReady true
}
if { $isProcReady } {
global xtrans
global ytrans
global leastsquares
if {"[$xtrans getCurrentValue]" == "Log10 (scale)" ||
"[$ytrans getCurrentValue]" == "Log10 (scale)" ||
"[$xtrans getCurrentValue]" == "Log10 (with constant) (scale)" ||
"[$ytrans getCurrentValue]" == "Log10 (with constant) (scale)"} {
$leastsquares setCurrentValue "N"
$leastsquares setInputAllowed false
} else {
$leastsquares setInputAllowed true
}
}
}
GuidoForm frm20440 {
-default_buttons
-layout BoxLayout Y_AXIS
-label "XY PLOT"
-tip "gst_scatter_plot"
GuidoPanel x_y_fields {
-layout BoxLayout X_AXIS
GuidoPanel x_var {
-layout CentreLineLayout
-border etched true
GuidoComboBox xvar {
-label "X Variable"
-format none
-null false
-display_length 20
-max_length 20
-null false
-exclusive false
-tip "Select the variable to be plotted along the X axis."
-default ""
-legacy_validation
-value_in x y z d1 d2 d3 d4 d5 d6 d7 d8 d9
}
GuidoComboBox xtrans {
-action valueChanged {[leastsquares false]}
-display_length 20
-format none
-null false
-value_in  "None" "Log10" "Log10 (scale)" "Log10 (with constant)" "Log10 (with constant) (scale)" "Natural Log" "Natural Log (with constant)" "Natural Exponential" "Power" "Box & Cox" "Standardisation" "Scale Up" "Scale Down"
-tip  "Select the transform to be applied to the variable being plotted along the X axis."
-label "Transform"
}
GuidoField xval {
-dependency {"[$xtrans getCurrentValue]" == "Log10 (with constant)" ||
"[$xtrans getCurrentValue]" == "Log10 (with constant) (scale)" ||
"[$xtrans getCurrentValue]" == "Natural Log (with constant)" ||
"[$xtrans getCurrentValue]" == "Power" ||
"[$xtrans getCurrentValue]" == "Box & Cox" ||
"[$xtrans getCurrentValue]" == "Scale Up" ||
"[$xtrans getCurrentValue]" == "Scale Down"}
-default 1.0
-display_length 5
-format real_8
-tip "Specify, if necessary, the constant to be used in the selected transformation of the X variable."
-label "Constant"
}
}
GuidoPanel y_var {
-layout CentreLineLayout
-border etched true
GuidoComboBox yvar {
-format none
-null false
-display_length 20
-max_length 20
-null false
-exclusive false
-tip "Select the variable to be plotted along the Y axis."
-default ""
-legacy_validation
-value_in x y z d1 d2 d3 d4 d5 d6 d7 d8 d9
-label "Y Variable"
}
GuidoComboBox ytrans {
-action valueChanged {[leastsquares false]}
-display_length 20
-format none
-null false
-value_in  "None" "Log10" "Log10 (scale)" "Log10 (with constant)" "Log10 (with constant) (scale)" "Natural Log" "Natural Log (with constant)" "Natural Exponential" "Power" "Box & Cox" "Standardisation" "Scale Up" "Scale Down"
-tip  "Select the transform to be applied to the variable being plotted along the Y axis."
-label "Transform"
}
GuidoField yval {
-dependency {"[$ytrans getCurrentValue]" == "Log10 (with constant)" ||
"[$ytrans getCurrentValue]" == "Log10 (with constant) (scale)" ||
"[$ytrans getCurrentValue]" == "Natural Log (with constant)" ||
"[$ytrans getCurrentValue]" == "Power" ||
"[$ytrans getCurrentValue]" == "Box & Cox" ||
"[$ytrans getCurrentValue]" == "Scale Up" ||
"[$ytrans getCurrentValue]" == "Scale Down"}
-default 1.0
-display_length 5
-format real_8
-tip "Specify, if necessary, the constant to be used in the selected transformation of the Y variable."
-label "Constant"
}
}
}
GuidoPanel typePanel {
-layout CentreLineLayout
GuidoButtonGroupPanel type {
-label "Draw as"
-layout BoxLayout X_AXIS
-tip "gst_scatter_plot1"
GuidoRadioButton type_lines {
-caption "Lines"
-selected_value "Lines"
-input true
}
GuidoRadioButton type_markers {
-caption "Markers"
-selected_value "Markers"
-input true
}
}
GuidoCheckBox qq {
-default false
-validation {[qq_validation]}
-action initial {[qq_dependency]}
-action valueChanged {[qq_dependency]}
-label "STATS_Q-Q_PLOT"
-next_focus leastsquares
-selected_value Y
-unselected_value N
-tip "STATS_Q_Q_PLOT_HLP"
}
GuidoField number_points {
-default 100.0
-dependency {"[$qq getCurrentValue]" == "Y"}
-label "STATS_Quantile_type"
-display_length 5
-format integer
-tip "STATS_QUANTILE_QUANTILE_POINTS"
}
GuidoCheckBox leastsquares {
-default false
-validation {[qq_validation]}
-action initial {[leastsquares true]}
-label "Linear Regression"
-next_focus apply_button
-selected_value Y
-unselected_value N
-tip "Plots the line of best fit on the scattergram based on the method of least squares."
}
}
}
