mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-17 04:29:28 +02:00
TAChart: Fit confidence level can be changed in FitDemo now. Issue #37354.
git-svn-id: trunk@63566 -
This commit is contained in:
parent
b62203729f
commit
ba09e05aa3
@ -1,28 +1,28 @@
|
|||||||
object frmMain: TfrmMain
|
object frmMain: TfrmMain
|
||||||
Left = 319
|
Left = 319
|
||||||
Height = 503
|
Height = 543
|
||||||
Top = 133
|
Top = 133
|
||||||
Width = 1026
|
Width = 1026
|
||||||
Caption = 'frmMain'
|
Caption = 'frmMain'
|
||||||
ClientHeight = 503
|
ClientHeight = 543
|
||||||
ClientWidth = 1026
|
ClientWidth = 1026
|
||||||
OnCreate = FormCreate
|
OnCreate = FormCreate
|
||||||
ShowHint = True
|
ShowHint = True
|
||||||
LCLVersion = '2.1.0.0'
|
LCLVersion = '2.1.0.0'
|
||||||
object pnlParams: TPanel
|
object pnlParams: TPanel
|
||||||
Left = 8
|
Left = 8
|
||||||
Height = 487
|
Height = 527
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 400
|
Width = 400
|
||||||
Align = alLeft
|
Align = alLeft
|
||||||
BorderSpacing.Around = 8
|
BorderSpacing.Around = 8
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 487
|
ClientHeight = 527
|
||||||
ClientWidth = 400
|
ClientWidth = 400
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object PageControl1: TPageControl
|
object PageControl1: TPageControl
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 487
|
Height = 527
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 400
|
Width = 400
|
||||||
ActivePage = TabSheet1
|
ActivePage = TabSheet1
|
||||||
@ -31,7 +31,7 @@ object frmMain: TfrmMain
|
|||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
object TabSheet1: TTabSheet
|
object TabSheet1: TTabSheet
|
||||||
Caption = 'Preparation'
|
Caption = 'Preparation'
|
||||||
ClientHeight = 459
|
ClientHeight = 499
|
||||||
ClientWidth = 392
|
ClientWidth = 392
|
||||||
object gbDataGeneration: TGroupBox
|
object gbDataGeneration: TGroupBox
|
||||||
Left = 4
|
Left = 4
|
||||||
@ -101,11 +101,11 @@ object frmMain: TfrmMain
|
|||||||
AnchorSideTop.Control = gbDataGeneration
|
AnchorSideTop.Control = gbDataGeneration
|
||||||
AnchorSideRight.Control = gbDataGeneration
|
AnchorSideRight.Control = gbDataGeneration
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 101
|
Left = 100
|
||||||
Height = 23
|
Height = 23
|
||||||
Hint = 'Select a dataset for fitting'
|
Hint = 'Select a dataset for fitting'
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 271
|
Width = 272
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 16
|
BorderSpacing.Left = 16
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
@ -123,7 +123,7 @@ object frmMain: TfrmMain
|
|||||||
Left = 16
|
Left = 16
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 69
|
Width = 68
|
||||||
BorderSpacing.Left = 16
|
BorderSpacing.Left = 16
|
||||||
Caption = 'Test function'
|
Caption = 'Test function'
|
||||||
ParentColor = False
|
ParentColor = False
|
||||||
@ -134,7 +134,7 @@ object frmMain: TfrmMain
|
|||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = edNoiseY
|
AnchorSideTop.Control = edNoiseY
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 175
|
Left = 174
|
||||||
Height = 15
|
Height = 15
|
||||||
Top = 35
|
Top = 35
|
||||||
Width = 64
|
Width = 64
|
||||||
@ -159,23 +159,22 @@ object frmMain: TfrmMain
|
|||||||
AnchorSideLeft.Control = cbTestFunction
|
AnchorSideLeft.Control = cbTestFunction
|
||||||
AnchorSideTop.Control = cbTestFunction
|
AnchorSideTop.Control = cbTestFunction
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 101
|
Left = 100
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 66
|
Width = 66
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
DecimalPlaces = 0
|
DecimalPlaces = 0
|
||||||
MinValue = 0
|
|
||||||
OnChange = edNoiseYChange
|
OnChange = edNoiseYChange
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Value = 10
|
Value = 10
|
||||||
end
|
end
|
||||||
object EdPointsCount: TSpinEdit
|
object edPointsCount: TSpinEdit
|
||||||
AnchorSideLeft.Control = cbTestFunction
|
AnchorSideLeft.Control = cbTestFunction
|
||||||
AnchorSideTop.Control = edNoiseY
|
AnchorSideTop.Control = edNoiseY
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
Left = 101
|
Left = 100
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 58
|
Top = 58
|
||||||
Width = 66
|
Width = 66
|
||||||
@ -183,14 +182,14 @@ object frmMain: TfrmMain
|
|||||||
BorderSpacing.Bottom = 8
|
BorderSpacing.Bottom = 8
|
||||||
MaxValue = 65535
|
MaxValue = 65535
|
||||||
MinValue = 1
|
MinValue = 1
|
||||||
OnChange = EdPointsCountChange
|
OnChange = edPointsCountChange
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 2
|
TabOrder = 2
|
||||||
Value = 100
|
Value = 100
|
||||||
end
|
end
|
||||||
object lblNoiseY1: TLabel
|
object lblNoiseY1: TLabel
|
||||||
AnchorSideLeft.Control = lblTestFunction
|
AnchorSideLeft.Control = lblTestFunction
|
||||||
AnchorSideTop.Control = EdPointsCount
|
AnchorSideTop.Control = edPointsCount
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 16
|
Left = 16
|
||||||
Height = 15
|
Height = 15
|
||||||
@ -202,7 +201,7 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object Bevel1: TBevel
|
object Bevel1: TBevel
|
||||||
AnchorSideLeft.Control = gbDataGeneration
|
AnchorSideLeft.Control = gbDataGeneration
|
||||||
AnchorSideTop.Control = EdPointsCount
|
AnchorSideTop.Control = edPointsCount
|
||||||
AnchorSideTop.Side = asrBottom
|
AnchorSideTop.Side = asrBottom
|
||||||
AnchorSideRight.Control = gbDataGeneration
|
AnchorSideRight.Control = gbDataGeneration
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
@ -251,15 +250,17 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
object gbFitting: TGroupBox
|
object gbFitting: TGroupBox
|
||||||
Left = 0
|
Left = 4
|
||||||
Height = 290
|
Height = 330
|
||||||
Top = 169
|
Top = 169
|
||||||
Width = 392
|
Width = 384
|
||||||
Align = alClient
|
Align = alClient
|
||||||
|
BorderSpacing.Left = 4
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
|
BorderSpacing.Right = 4
|
||||||
Caption = ' Fitting '
|
Caption = ' Fitting '
|
||||||
ClientHeight = 270
|
ClientHeight = 310
|
||||||
ClientWidth = 388
|
ClientWidth = 380
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
@ -272,13 +273,13 @@ object frmMain: TfrmMain
|
|||||||
Left = 14
|
Left = 14
|
||||||
Height = 109
|
Height = 109
|
||||||
Top = 151
|
Top = 151
|
||||||
Width = 360
|
Width = 352
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 16
|
BorderSpacing.Top = 16
|
||||||
Caption = 'Fit range'
|
Caption = 'Fit range'
|
||||||
ClientHeight = 89
|
ClientHeight = 89
|
||||||
ClientWidth = 356
|
ClientWidth = 348
|
||||||
Font.Style = [fsBold]
|
Font.Style = [fsBold]
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -303,7 +304,7 @@ object frmMain: TfrmMain
|
|||||||
Left = 16
|
Left = 16
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 31
|
Top = 31
|
||||||
Width = 96
|
Width = 97
|
||||||
BorderSpacing.Top = 8
|
BorderSpacing.Top = 8
|
||||||
Caption = 'Use maximum'
|
Caption = 'Use maximum'
|
||||||
OnClick = cbFitRangeUseMaxClick
|
OnClick = cbFitRangeUseMaxClick
|
||||||
@ -405,7 +406,7 @@ object frmMain: TfrmMain
|
|||||||
Height = 23
|
Height = 23
|
||||||
Hint = 'Select a function type to be used for fitting to the generated data'
|
Hint = 'Select a function type to be used for fitting to the generated data'
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 285
|
Width = 277
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
BorderSpacing.Left = 12
|
BorderSpacing.Left = 12
|
||||||
BorderSpacing.Top = 4
|
BorderSpacing.Top = 4
|
||||||
@ -445,13 +446,13 @@ object frmMain: TfrmMain
|
|||||||
Left = 14
|
Left = 14
|
||||||
Height = 61
|
Height = 61
|
||||||
Top = 74
|
Top = 74
|
||||||
Width = 360
|
Width = 352
|
||||||
Anchors = [akTop, akLeft, akRight]
|
Anchors = [akTop, akLeft, akRight]
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
BorderSpacing.Top = 16
|
BorderSpacing.Top = 16
|
||||||
Caption = 'Fixed parameters (check to keep constant)'
|
Caption = 'Fixed parameters (check to keep constant)'
|
||||||
ClientHeight = 41
|
ClientHeight = 41
|
||||||
ClientWidth = 356
|
ClientWidth = 348
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
object cbFitParam0Fixed: TCheckBox
|
object cbFitParam0Fixed: TCheckBox
|
||||||
AnchorSideLeft.Control = GroupBox1
|
AnchorSideLeft.Control = GroupBox1
|
||||||
@ -483,12 +484,11 @@ object frmMain: TfrmMain
|
|||||||
OnChange = FixedParamsChanged
|
OnChange = FixedParamsChanged
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
Value = 0
|
|
||||||
end
|
end
|
||||||
object cbFitParam1Fixed: TCheckBox
|
object cbFitParam1Fixed: TCheckBox
|
||||||
AnchorSideTop.Control = cbFitParam0Fixed
|
AnchorSideTop.Control = cbFitParam0Fixed
|
||||||
AnchorSideRight.Control = edFitParam1
|
AnchorSideRight.Control = edFitParam1
|
||||||
Left = 220
|
Left = 212
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 6
|
Top = 6
|
||||||
Width = 44
|
Width = 44
|
||||||
@ -502,7 +502,7 @@ object frmMain: TfrmMain
|
|||||||
AnchorSideTop.Control = edFitParam0
|
AnchorSideTop.Control = edFitParam0
|
||||||
AnchorSideRight.Control = GroupBox1
|
AnchorSideRight.Control = GroupBox1
|
||||||
AnchorSideRight.Side = asrBottom
|
AnchorSideRight.Side = asrBottom
|
||||||
Left = 264
|
Left = 256
|
||||||
Height = 23
|
Height = 23
|
||||||
Top = 4
|
Top = 4
|
||||||
Width = 80
|
Width = 80
|
||||||
@ -513,18 +513,52 @@ object frmMain: TfrmMain
|
|||||||
OnChange = FixedParamsChanged
|
OnChange = FixedParamsChanged
|
||||||
ParentFont = False
|
ParentFont = False
|
||||||
TabOrder = 3
|
TabOrder = 3
|
||||||
Value = 0
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
object edConfLevel: TFloatSpinEdit
|
||||||
|
AnchorSideTop.Control = gbFitRange
|
||||||
|
AnchorSideTop.Side = asrBottom
|
||||||
|
AnchorSideRight.Control = cbFitEquation
|
||||||
|
AnchorSideRight.Side = asrBottom
|
||||||
|
Left = 312
|
||||||
|
Height = 23
|
||||||
|
Top = 272
|
||||||
|
Width = 54
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Top = 12
|
||||||
|
BorderSpacing.Bottom = 8
|
||||||
|
Increment = 0.01
|
||||||
|
MaxValue = 1
|
||||||
|
OnChange = edConfLevelChange
|
||||||
|
ParentFont = False
|
||||||
|
TabOrder = 4
|
||||||
|
Value = 0.95
|
||||||
|
end
|
||||||
|
object lblConfLevel: TLabel
|
||||||
|
AnchorSideLeft.Side = asrBottom
|
||||||
|
AnchorSideTop.Control = edConfLevel
|
||||||
|
AnchorSideTop.Side = asrCenter
|
||||||
|
AnchorSideRight.Control = edConfLevel
|
||||||
|
Left = 220
|
||||||
|
Height = 15
|
||||||
|
Top = 276
|
||||||
|
Width = 88
|
||||||
|
Anchors = [akTop, akRight]
|
||||||
|
BorderSpacing.Left = 8
|
||||||
|
BorderSpacing.Right = 4
|
||||||
|
Caption = 'Confidence level'
|
||||||
|
ParentColor = False
|
||||||
|
ParentFont = False
|
||||||
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object TabSheet2: TTabSheet
|
object TabSheet2: TTabSheet
|
||||||
Caption = 'Results'
|
Caption = 'Results'
|
||||||
ClientHeight = 459
|
ClientHeight = 499
|
||||||
ClientWidth = 392
|
ClientWidth = 392
|
||||||
object lbResults: TListBox
|
object lbResults: TListBox
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 459
|
Height = 499
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 392
|
Width = 392
|
||||||
Align = alClient
|
Align = alClient
|
||||||
@ -542,18 +576,18 @@ object frmMain: TfrmMain
|
|||||||
end
|
end
|
||||||
object pnlChart: TPanel
|
object pnlChart: TPanel
|
||||||
Left = 429
|
Left = 429
|
||||||
Height = 487
|
Height = 527
|
||||||
Top = 8
|
Top = 8
|
||||||
Width = 589
|
Width = 589
|
||||||
Align = alClient
|
Align = alClient
|
||||||
BorderSpacing.Around = 8
|
BorderSpacing.Around = 8
|
||||||
BevelOuter = bvNone
|
BevelOuter = bvNone
|
||||||
ClientHeight = 487
|
ClientHeight = 527
|
||||||
ClientWidth = 589
|
ClientWidth = 589
|
||||||
TabOrder = 1
|
TabOrder = 1
|
||||||
object Chart: TChart
|
object Chart: TChart
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 445
|
Height = 485
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 589
|
Width = 589
|
||||||
AxisList = <
|
AxisList = <
|
||||||
@ -662,7 +696,7 @@ object frmMain: TfrmMain
|
|||||||
object pnlLog: TPanel
|
object pnlLog: TPanel
|
||||||
Left = 0
|
Left = 0
|
||||||
Height = 42
|
Height = 42
|
||||||
Top = 445
|
Top = 485
|
||||||
Width = 589
|
Width = 589
|
||||||
Align = alBottom
|
Align = alBottom
|
||||||
AutoSize = True
|
AutoSize = True
|
||||||
@ -676,7 +710,7 @@ object frmMain: TfrmMain
|
|||||||
Left = 0
|
Left = 0
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 92
|
Width = 93
|
||||||
Caption = 'Logarithmic x'
|
Caption = 'Logarithmic x'
|
||||||
OnClick = cbLogClick
|
OnClick = cbLogClick
|
||||||
TabOrder = 0
|
TabOrder = 0
|
||||||
@ -733,7 +767,7 @@ object frmMain: TfrmMain
|
|||||||
OnChange = cbShowPredictionIntervalsChange
|
OnChange = cbShowPredictionIntervalsChange
|
||||||
TabOrder = 4
|
TabOrder = 4
|
||||||
end
|
end
|
||||||
object CbHTML: TCheckBox
|
object cbHTML: TCheckBox
|
||||||
AnchorSideLeft.Control = cbShowConfidenceIntervals
|
AnchorSideLeft.Control = cbShowConfidenceIntervals
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = pnlLog
|
AnchorSideTop.Control = pnlLog
|
||||||
@ -741,46 +775,46 @@ object frmMain: TfrmMain
|
|||||||
Left = 401
|
Left = 401
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 12
|
Top = 12
|
||||||
Width = 53
|
Width = 52
|
||||||
BorderSpacing.Left = 16
|
BorderSpacing.Left = 16
|
||||||
Caption = 'HTML'
|
Caption = 'HTML'
|
||||||
OnChange = CbHTMLChange
|
OnChange = cbHTMLChange
|
||||||
TabOrder = 5
|
TabOrder = 5
|
||||||
end
|
end
|
||||||
object CbCombinedExtent: TCheckBox
|
object cbCombinedExtent: TCheckBox
|
||||||
AnchorSideLeft.Control = CbHTML
|
AnchorSideLeft.Control = cbHTML
|
||||||
AnchorSideLeft.Side = asrBottom
|
AnchorSideLeft.Side = asrBottom
|
||||||
AnchorSideTop.Control = pnlLog
|
AnchorSideTop.Control = pnlLog
|
||||||
AnchorSideTop.Side = asrCenter
|
AnchorSideTop.Side = asrCenter
|
||||||
Left = 470
|
Left = 469
|
||||||
Height = 19
|
Height = 19
|
||||||
Top = 12
|
Top = 12
|
||||||
Width = 111
|
Width = 112
|
||||||
BorderSpacing.Left = 16
|
BorderSpacing.Left = 16
|
||||||
Caption = 'Combined extent'
|
Caption = 'Combined extent'
|
||||||
OnChange = CbCombinedExtentChange
|
OnChange = cbCombinedExtentChange
|
||||||
TabOrder = 6
|
TabOrder = 6
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
object Splitter1: TSplitter
|
object Splitter1: TSplitter
|
||||||
Left = 416
|
Left = 416
|
||||||
Height = 503
|
Height = 543
|
||||||
Top = 0
|
Top = 0
|
||||||
Width = 5
|
Width = 5
|
||||||
ResizeStyle = rsPattern
|
ResizeStyle = rsPattern
|
||||||
end
|
end
|
||||||
object ListChartSource: TListChartSource
|
object ListChartSource: TListChartSource
|
||||||
left = 584
|
Left = 584
|
||||||
top = 120
|
Top = 120
|
||||||
end
|
end
|
||||||
object SaveDialog: TSaveDialog
|
object SaveDialog: TSaveDialog
|
||||||
left = 480
|
Left = 480
|
||||||
top = 64
|
Top = 64
|
||||||
end
|
end
|
||||||
object ChartAxisTransformations: TChartAxisTransformations
|
object ChartAxisTransformations: TChartAxisTransformations
|
||||||
left = 584
|
Left = 584
|
||||||
top = 184
|
Top = 184
|
||||||
object LogarithmAxisTransform: TLogarithmAxisTransform
|
object LogarithmAxisTransform: TLogarithmAxisTransform
|
||||||
Base = 10
|
Base = 10
|
||||||
end
|
end
|
||||||
@ -788,7 +822,7 @@ object frmMain: TfrmMain
|
|||||||
object OpenDialog1: TOpenDialog
|
object OpenDialog1: TOpenDialog
|
||||||
DefaultExt = '.txt'
|
DefaultExt = '.txt'
|
||||||
Filter = 'Text files|*.txt|CSV files|*.csv'
|
Filter = 'Text files|*.txt|CSV files|*.csv'
|
||||||
left = 72
|
Left = 72
|
||||||
top = 184
|
Top = 184
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
@ -24,8 +24,10 @@ type
|
|||||||
cbShowErrorbars: TCheckBox;
|
cbShowErrorbars: TCheckBox;
|
||||||
cbShowConfidenceIntervals: TCheckBox;
|
cbShowConfidenceIntervals: TCheckBox;
|
||||||
cbShowPredictionIntervals: TCheckBox;
|
cbShowPredictionIntervals: TCheckBox;
|
||||||
CbHTML: TCheckBox;
|
cbHTML: TCheckBox;
|
||||||
CbCombinedExtent: TCheckBox;
|
cbCombinedExtent: TCheckBox;
|
||||||
|
edConfLevel: TFloatSpinEdit;
|
||||||
|
lblConfLevel: TLabel;
|
||||||
UpperConfIntervalSeries: TFuncSeries;
|
UpperConfIntervalSeries: TFuncSeries;
|
||||||
LowerConfIntervalSeries: TFuncSeries;
|
LowerConfIntervalSeries: TFuncSeries;
|
||||||
UpperPredIntervalSeries: TFuncSeries;
|
UpperPredIntervalSeries: TFuncSeries;
|
||||||
@ -64,23 +66,21 @@ type
|
|||||||
pnlChart: TPanel;
|
pnlChart: TPanel;
|
||||||
SaveDialog: TSaveDialog;
|
SaveDialog: TSaveDialog;
|
||||||
btnSave: TSpeedButton;
|
btnSave: TSpeedButton;
|
||||||
EdPointsCount: TSpinEdit;
|
edPointsCount: TSpinEdit;
|
||||||
Splitter1: TSplitter;
|
Splitter1: TSplitter;
|
||||||
TabSheet1: TTabSheet;
|
TabSheet1: TTabSheet;
|
||||||
TabSheet2: TTabSheet;
|
TabSheet2: TTabSheet;
|
||||||
procedure BtnLoadClick(Sender: TObject);
|
procedure BtnLoadClick(Sender: TObject);
|
||||||
procedure btnSaveClick(Sender: TObject);
|
procedure btnSaveClick(Sender: TObject);
|
||||||
procedure CbCombinedExtentChange(Sender: TObject);
|
procedure cbCombinedExtentChange(Sender: TObject);
|
||||||
procedure cbDrawFitRangeOnlyClick(Sender: TObject);
|
procedure cbDrawFitRangeOnlyClick(Sender: TObject);
|
||||||
procedure cbFitEquationSelect(Sender: TObject);
|
procedure cbFitEquationSelect(Sender: TObject);
|
||||||
procedure CbHTMLChange(Sender: TObject);
|
procedure cbHTMLChange(Sender: TObject);
|
||||||
procedure cbShowConfidenceIntervalsChange(Sender: TObject);
|
procedure cbShowConfidenceIntervalsChange(Sender: TObject);
|
||||||
procedure cbShowErrorbarsChange(Sender: TObject);
|
procedure cbShowErrorbarsChange(Sender: TObject);
|
||||||
procedure cbShowPredictionIntervalsChange(Sender: TObject);
|
procedure cbShowPredictionIntervalsChange(Sender: TObject);
|
||||||
procedure EdPointsCountChange(Sender: TObject);
|
procedure edConfLevelChange(Sender: TObject);
|
||||||
procedure FitSeriesFitEquationText(ASeries: TFitSeries;
|
procedure edPointsCountChange(Sender: TObject);
|
||||||
AEquationText: IFitEquationText);
|
|
||||||
procedure FixedParamsChanged(Sender: TObject);
|
|
||||||
procedure cbFitRangeUseMaxClick(Sender:TObject);
|
procedure cbFitRangeUseMaxClick(Sender:TObject);
|
||||||
procedure cbFitRangeUseMinClick(Sender:TObject);
|
procedure cbFitRangeUseMinClick(Sender:TObject);
|
||||||
procedure cbLogClick(Sender: TObject);
|
procedure cbLogClick(Sender: TObject);
|
||||||
@ -89,8 +89,11 @@ type
|
|||||||
procedure edFitRangeMaxChange(Sender:TObject);
|
procedure edFitRangeMaxChange(Sender:TObject);
|
||||||
procedure edFitRangeMinChange(Sender:TObject);
|
procedure edFitRangeMinChange(Sender:TObject);
|
||||||
procedure edNoiseYChange(Sender: TObject);
|
procedure edNoiseYChange(Sender: TObject);
|
||||||
procedure FormCreate(Sender: TObject);
|
|
||||||
procedure FitCompleteHandler(Sender:TObject);
|
procedure FitCompleteHandler(Sender:TObject);
|
||||||
|
procedure FitSeriesFitEquationText(ASeries: TFitSeries;
|
||||||
|
AEquationText: IFitEquationText);
|
||||||
|
procedure FixedParamsChanged(Sender: TObject);
|
||||||
|
procedure FormCreate(Sender: TObject);
|
||||||
procedure lbResultsDrawItem(Control: TWinControl; Index: Integer;
|
procedure lbResultsDrawItem(Control: TWinControl; Index: Integer;
|
||||||
ARect: TRect; State: TOwnerDrawState);
|
ARect: TRect; State: TOwnerDrawState);
|
||||||
private
|
private
|
||||||
@ -180,9 +183,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.CbCombinedExtentChange(Sender: TObject);
|
procedure TfrmMain.cbCombinedExtentChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
FitSeries.UseCombinedExtentY := CbCombinedExtent.Checked;
|
FitSeries.UseCombinedExtentY := cbCombinedExtent.Checked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.BtnLoadClick(Sender: TObject);
|
procedure TfrmMain.BtnLoadClick(Sender: TObject);
|
||||||
@ -250,9 +253,9 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.CbHTMLChange(Sender: TObject);
|
procedure TfrmMain.cbHTMLChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
if CbHtml.Checked then Chart.Legend.TextFormat := tfHTML else Chart.Legend.TextFormat := tfNormal;
|
if cbHTML.Checked then Chart.Legend.TextFormat := tfHTML else Chart.Legend.TextFormat := tfNormal;
|
||||||
FitSeries.Title := 'fitted data';
|
FitSeries.Title := 'fitted data';
|
||||||
// the fit equation is appended automatically due to FitSeries.Legend.Format
|
// the fit equation is appended automatically due to FitSeries.Legend.Format
|
||||||
end;
|
end;
|
||||||
@ -288,7 +291,12 @@ begin
|
|||||||
LowerPredIntervalSeries.Active := cbShowPredictionIntervals.Checked;
|
LowerPredIntervalSeries.Active := cbShowPredictionIntervals.Checked;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
procedure TfrmMain.EdPointsCountChange(Sender: TObject);
|
procedure TfrmMain.edConfLevelChange(Sender: TObject);
|
||||||
|
begin
|
||||||
|
FitSeries.ConfidenceLevel := edConfLevel.Value;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TfrmMain.edPointsCountChange(Sender: TObject);
|
||||||
begin
|
begin
|
||||||
CreateData;
|
CreateData;
|
||||||
end;
|
end;
|
||||||
@ -297,7 +305,7 @@ procedure TfrmMain.FitSeriesFitEquationText(ASeries: TFitSeries;
|
|||||||
AEquationText: IFitEquationText);
|
AEquationText: IFitEquationText);
|
||||||
begin
|
begin
|
||||||
AEquationText.NumFormat('%.5f');
|
AEquationText.NumFormat('%.5f');
|
||||||
if CbHTML.Checked then
|
if cbHTML.Checked then
|
||||||
AEquationText.TextFormat(tfHtml)
|
AEquationText.TextFormat(tfHtml)
|
||||||
else
|
else
|
||||||
AEquationText.TextFormat(tfNormal);
|
AEquationText.TextFormat(tfNormal);
|
||||||
@ -355,7 +363,7 @@ var
|
|||||||
xarr, yarr: array of Double;
|
xarr, yarr: array of Double;
|
||||||
begin
|
begin
|
||||||
RandSeed := 875876; // Reproducible noise for testing.
|
RandSeed := 875876; // Reproducible noise for testing.
|
||||||
n := EdPointsCount.Value;
|
n := edPointsCount.Value;
|
||||||
if n = 0 then begin
|
if n = 0 then begin
|
||||||
MessageDlg('No data', mtError, [mbOK], 0);
|
MessageDlg('No data', mtError, [mbOK], 0);
|
||||||
exit;
|
exit;
|
||||||
@ -438,6 +446,9 @@ end;
|
|||||||
|
|
||||||
function MyFormatFloat(x: Double; StdFormat, ExpFormat: String): String;
|
function MyFormatFloat(x: Double; StdFormat, ExpFormat: String): String;
|
||||||
begin
|
begin
|
||||||
|
if IsNaN(x) then
|
||||||
|
Result := 'n/a'
|
||||||
|
else
|
||||||
if (abs(x) <= 1E-6) or (abs(x) >= 1E6) then
|
if (abs(x) <= 1E-6) or (abs(x) >= 1E6) then
|
||||||
Result := Format(ExpFormat, [x])
|
Result := Format(ExpFormat, [x])
|
||||||
else
|
else
|
||||||
@ -461,6 +472,7 @@ var
|
|||||||
decsep: Char;
|
decsep: Char;
|
||||||
paramName: String;
|
paramName: String;
|
||||||
confL, confH: Double;
|
confL, confH: Double;
|
||||||
|
predL, predH: Double;
|
||||||
begin
|
begin
|
||||||
decsep := DefaultFormatSettings.DecimalSeparator;
|
decsep := DefaultFormatSettings.DecimalSeparator;
|
||||||
with lbResults.Items do begin
|
with lbResults.Items do begin
|
||||||
@ -529,6 +541,30 @@ begin
|
|||||||
UpperPredIntervalSeries.OnCalculate := @FitSeries.GetUpperPredictionInterval;
|
UpperPredIntervalSeries.OnCalculate := @FitSeries.GetUpperPredictionInterval;
|
||||||
LowerPredIntervalSeries.OnCalculate := @FitSeries.GetLowerPredictionInterval;
|
LowerPredIntervalSeries.OnCalculate := @FitSeries.GetLowerPredictionInterval;
|
||||||
{$IFEND}
|
{$IFEND}
|
||||||
|
|
||||||
|
Add('');
|
||||||
|
Add('VALUES');
|
||||||
|
{$IF FPC_FullVersion >= 30004}
|
||||||
|
Add(Format('%8s %8s %8s %8s %8s %8s %8s', ['x', 'y', 'y hat', 'confL', 'confH', 'predL', 'predH']));
|
||||||
|
for i := 0 to FitSeries.Count-1 do
|
||||||
|
begin
|
||||||
|
FitSeries.GetLowerConfidenceInterval(FitSeries.XValue[i], confL);
|
||||||
|
FitSeries.GetUpperConfidenceInterval(FitSeries.XValue[i], confH);
|
||||||
|
FitSeries.GetLowerPredictionInterval(FitSeries.XValue[i], predL);
|
||||||
|
FitSeries.GetUpperPredictionInterval(FitSeries.XValue[i], predH);
|
||||||
|
Add(Format('%8.2f %8.2f %8.2f %8.2f %8.2f %8.2f %8.2f', [
|
||||||
|
FitSeries.XValue[i], FitSeries.YValue[i], FitSeries.Calculate(FitSeries.XValue[i]),
|
||||||
|
confL, confH, predL, predH]));
|
||||||
|
end;
|
||||||
|
{$ELSE}
|
||||||
|
Add(Format('%8s %8s %8s', ['x', 'y', 'y hat']));
|
||||||
|
for i := 0 to FitSeries.Count-1 do
|
||||||
|
begin
|
||||||
|
Add(Format('%8.2f %8.2f %8.2f', [
|
||||||
|
FitSeries.XValue[i], FitSeries.YValue[i], FitSeries.Calculate(FitSeries.XValue[i])
|
||||||
|
]));
|
||||||
|
end;
|
||||||
|
{$IFEND}
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
Add(FitSeries.ErrorMsg);
|
Add(FitSeries.ErrorMsg);
|
||||||
@ -634,6 +670,7 @@ begin
|
|||||||
FitSeries.ListSource.YCount := 1;
|
FitSeries.ListSource.YCount := 1;
|
||||||
FitSeries.ListSource.YErrorBarData.Kind := ebkNone;
|
FitSeries.ListSource.YErrorBarData.Kind := ebkNone;
|
||||||
end;
|
end;
|
||||||
|
FitSeries.BeginUpdate;
|
||||||
|
|
||||||
for i:=0 to L.Count-1 do begin
|
for i:=0 to L.Count-1 do begin
|
||||||
LC.DelimitedText := L[i];
|
LC.DelimitedText := L[i];
|
||||||
@ -650,6 +687,8 @@ begin
|
|||||||
FitSeries.AddXY(x, y);
|
FitSeries.AddXY(x, y);
|
||||||
end;
|
end;
|
||||||
FDemoData := false;
|
FDemoData := false;
|
||||||
|
FitSeries.EndUpdate;
|
||||||
|
FitSeries.ExecFit;
|
||||||
finally
|
finally
|
||||||
L.Free;
|
L.Free;
|
||||||
end;
|
end;
|
||||||
|
@ -1,11 +1,13 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<CONFIG>
|
<CONFIG>
|
||||||
<ProjectOptions>
|
<ProjectOptions>
|
||||||
<Version Value="11"/>
|
<Version Value="12"/>
|
||||||
<PathDelim Value="\"/>
|
<PathDelim Value="\"/>
|
||||||
<General>
|
<General>
|
||||||
|
<Flags>
|
||||||
|
<CompatibilityMode Value="True"/>
|
||||||
|
</Flags>
|
||||||
<SessionStorage Value="InProjectDir"/>
|
<SessionStorage Value="InProjectDir"/>
|
||||||
<MainUnit Value="0"/>
|
|
||||||
<Title Value="fitdemo"/>
|
<Title Value="fitdemo"/>
|
||||||
<ResourceType Value="res"/>
|
<ResourceType Value="res"/>
|
||||||
<UseXPManifest Value="True"/>
|
<UseXPManifest Value="True"/>
|
||||||
|
@ -275,6 +275,10 @@ msgstr "Quadratsumme der Residuen"
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr "Gesamte Quadratsumme (SST)"
|
msgstr "Gesamte Quadratsumme (SST)"
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr "Varianzverhältnis"
|
msgstr "Varianzverhältnis"
|
||||||
|
@ -263,6 +263,10 @@ msgstr ""
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -273,6 +273,10 @@ msgstr "Erreur standard résiduelle"
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr "Total de la somme des carrés (SST)"
|
msgstr "Total de la somme des carrés (SST)"
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr "Rapport de variance F"
|
msgstr "Rapport de variance F"
|
||||||
|
@ -273,6 +273,10 @@ msgstr ""
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -274,6 +274,10 @@ msgstr ""
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -273,6 +273,10 @@ msgstr ""
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -263,6 +263,10 @@ msgstr ""
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -273,6 +273,10 @@ msgstr "Erro residual padrão"
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr "Soma total de quadrados (SST)"
|
msgstr "Soma total de quadrados (SST)"
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr "Razão de variação F"
|
msgstr "Razão de variação F"
|
||||||
|
@ -273,6 +273,10 @@ msgstr "Остаточное стандартное отклонение"
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr "Полная сумма квадратов (SST)"
|
msgstr "Полная сумма квадратов (SST)"
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr "Дисперсионное отношение F"
|
msgstr "Дисперсионное отношение F"
|
||||||
|
@ -276,6 +276,10 @@ msgstr ""
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -276,6 +276,10 @@ msgstr "Остаточна стандартна похибка"
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr "Загальна сума квадратів (SSE)"
|
msgstr "Загальна сума квадратів (SSE)"
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr "Коефіцієнт варіації F"
|
msgstr "Коефіцієнт варіації F"
|
||||||
|
@ -274,6 +274,10 @@ msgstr ""
|
|||||||
msgid "Total sum of squares (SST)"
|
msgid "Total sum of squares (SST)"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
#: tachartstrconsts.rsfittvalue
|
||||||
|
msgid "t value"
|
||||||
|
msgstr ""
|
||||||
|
|
||||||
#: tachartstrconsts.rsfitvarianceratio
|
#: tachartstrconsts.rsfitvarianceratio
|
||||||
msgid "Variance ratio F"
|
msgid "Variance ratio F"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
@ -160,6 +160,7 @@ resourcestring
|
|||||||
rsFitReducedChiSquared = 'Reduced Chi-squared';
|
rsFitReducedChiSquared = 'Reduced Chi-squared';
|
||||||
rsFitResidualStandardError = 'Residual standard error';
|
rsFitResidualStandardError = 'Residual standard error';
|
||||||
rsFitVarianceRatio = 'Variance ratio F';
|
rsFitVarianceRatio = 'Variance ratio F';
|
||||||
|
rsFitTValue = 't value';
|
||||||
rsFitPValue = 'p value';
|
rsFitPValue = 'p value';
|
||||||
|
|
||||||
|
|
||||||
|
@ -105,8 +105,8 @@ type
|
|||||||
function Chi2: Double;
|
function Chi2: Double;
|
||||||
function DOF: Integer; // Degrees of freedom
|
function DOF: Integer; // Degrees of freedom
|
||||||
function F: Double;
|
function F: Double;
|
||||||
property N: Integer read fN;
|
property N: Integer read fN; // Number of data points
|
||||||
property M: Integer read fM;
|
property M: Integer read fM; // Number of fit parameters
|
||||||
function ReducedChi2: Double;
|
function ReducedChi2: Double;
|
||||||
function R2: Double;
|
function R2: Double;
|
||||||
function ResidualStdError: Double;
|
function ResidualStdError: Double;
|
||||||
@ -526,7 +526,7 @@ end;
|
|||||||
procedure TFitStatistics.Report_ANOVA(AText: TStrings; ASeparator: String = ': ';
|
procedure TFitStatistics.Report_ANOVA(AText: TStrings; ASeparator: String = ': ';
|
||||||
ANumFormat: String = '%f');
|
ANumFormat: String = '%f');
|
||||||
const
|
const
|
||||||
FMT = '%.3f';
|
FMT = '%.3e';
|
||||||
begin
|
begin
|
||||||
AText.Add(rsFitNumObservations + ASeparator + IntToStr(N));
|
AText.Add(rsFitNumObservations + ASeparator + IntToStr(N));
|
||||||
AText.Add(rsFitNumFitParams + ASeparator + IntToStr(M));
|
AText.Add(rsFitNumFitParams + ASeparator + IntToStr(M));
|
||||||
@ -548,6 +548,8 @@ begin
|
|||||||
Format(IfThen(Fcrit < 1E-3, FMT, ANumFormat), [Fcrit]));
|
Format(IfThen(Fcrit < 1E-3, FMT, ANumFormat), [Fcrit]));
|
||||||
}
|
}
|
||||||
{$IF FPC_FullVersion >= 30004}
|
{$IF FPC_FullVersion >= 30004}
|
||||||
|
AText.Add(rsFitTValue + ASeparator +
|
||||||
|
Format(IfThen(FtValue < 1E-3, '%.3e', ANumFormat), [FtValue]));
|
||||||
AText.Add(rsFitPValue + ASeparator +
|
AText.Add(rsFitPValue + ASeparator +
|
||||||
Format(IfThen(pValue < 1E-3, '%.3e', ANumFormat), [pValue]));
|
Format(IfThen(pValue < 1E-3, '%.3e', ANumFormat), [pValue]));
|
||||||
{$IFEND}
|
{$IFEND}
|
||||||
|
@ -301,6 +301,7 @@ type
|
|||||||
FErrCode: TFitErrCode;
|
FErrCode: TFitErrCode;
|
||||||
FFitStatistics: TFitStatistics;
|
FFitStatistics: TFitStatistics;
|
||||||
FConfidenceLevel: Double;
|
FConfidenceLevel: Double;
|
||||||
|
FLockFit: Integer;
|
||||||
function GetParam(AIndex: Integer): Double;
|
function GetParam(AIndex: Integer): Double;
|
||||||
function GetParamCount: Integer;
|
function GetParamCount: Integer;
|
||||||
function GetParamError(AIndex: Integer): Double;
|
function GetParamError(AIndex: Integer): Double;
|
||||||
@ -308,6 +309,7 @@ type
|
|||||||
function GetParam_RawValue(AIndex: Integer): Double;
|
function GetParam_RawValue(AIndex: Integer): Double;
|
||||||
function GetParam_tValue(AIndex: Integer): Double;
|
function GetParam_tValue(AIndex: Integer): Double;
|
||||||
function IsFixedParamsStored: Boolean;
|
function IsFixedParamsStored: Boolean;
|
||||||
|
procedure SetConfidenceLevel(AValue: Double);
|
||||||
procedure SetDrawFitRangeOnly(AValue: Boolean);
|
procedure SetDrawFitRangeOnly(AValue: Boolean);
|
||||||
procedure SetFitEquation(AValue: TFitEquation);
|
procedure SetFitEquation(AValue: TFitEquation);
|
||||||
procedure SetFitRange(AValue: TChartRange);
|
procedure SetFitRange(AValue: TChartRange);
|
||||||
@ -337,8 +339,11 @@ type
|
|||||||
constructor Create(AOwner: TComponent); override;
|
constructor Create(AOwner: TComponent); override;
|
||||||
destructor Destroy; override;
|
destructor Destroy; override;
|
||||||
public
|
public
|
||||||
|
procedure BeginUpdate;
|
||||||
function Calculate(AX: Double): Double; virtual;
|
function Calculate(AX: Double): Double; virtual;
|
||||||
|
procedure Clear; override;
|
||||||
procedure Draw(ADrawer: IChartDrawer); override;
|
procedure Draw(ADrawer: IChartDrawer); override;
|
||||||
|
procedure EndUpdate;
|
||||||
function ErrorMsg: String;
|
function ErrorMsg: String;
|
||||||
procedure ExecFit; virtual;
|
procedure ExecFit; virtual;
|
||||||
function Extent: TDoubleRect; override;
|
function Extent: TDoubleRect; override;
|
||||||
@ -364,7 +369,7 @@ type
|
|||||||
{$IFEND}
|
{$IFEND}
|
||||||
property Param_tValue[AIndex: Integer]: Double read GetParam_tValue;
|
property Param_tValue[AIndex: Integer]: Double read GetParam_tValue;
|
||||||
property FitStatistics: TFitStatistics read FFitStatistics;
|
property FitStatistics: TFitStatistics read FFitStatistics;
|
||||||
property ConfidenceLevel: Double read FConfidenceLevel write FConfidenceLevel;
|
property ConfidenceLevel: Double read FConfidenceLevel write SetConfidenceLevel;
|
||||||
property ErrCode: TFitErrCode read FErrCode;
|
property ErrCode: TFitErrCode read FErrCode;
|
||||||
property State: TFitParamsState read FState;
|
property State: TFitParamsState read FState;
|
||||||
published
|
published
|
||||||
@ -1634,6 +1639,12 @@ begin
|
|||||||
FFitRange.SetOwner(ParentChart);
|
FFitRange.SetOwner(ParentChart);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFitSeries.BeginUpdate;
|
||||||
|
begin
|
||||||
|
inherited BeginUpdate;
|
||||||
|
inc(FLockFit);
|
||||||
|
end;
|
||||||
|
|
||||||
function TFitSeries.Calculate(AX: Double): Double;
|
function TFitSeries.Calculate(AX: Double): Double;
|
||||||
var
|
var
|
||||||
i: Integer;
|
i: Integer;
|
||||||
@ -1690,6 +1701,12 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFitSeries.Clear;
|
||||||
|
begin
|
||||||
|
inherited;
|
||||||
|
InvalidateFitResults;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TFitSeries.Assign(ASource: TPersistent);
|
procedure TFitSeries.Assign(ASource: TPersistent);
|
||||||
begin
|
begin
|
||||||
if ASource is TFitSeries then
|
if ASource is TFitSeries then
|
||||||
@ -1762,6 +1779,14 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFitSeries.EndUpdate;
|
||||||
|
begin
|
||||||
|
inherited EndUpdate;
|
||||||
|
dec(FLockFit);
|
||||||
|
if (FLockFit = 0) and FAutoFit then
|
||||||
|
ExecFit;
|
||||||
|
end;
|
||||||
|
|
||||||
function TFitSeries.EquationText: IFitEquationText;
|
function TFitSeries.EquationText: IFitEquationText;
|
||||||
var
|
var
|
||||||
basis: Array of string;
|
basis: Array of string;
|
||||||
@ -1879,7 +1904,7 @@ var
|
|||||||
|
|
||||||
begin
|
begin
|
||||||
if (State <> fpsUnknown) or not Active or IsEmpty or (FChart = nil) or
|
if (State <> fpsUnknown) or not Active or IsEmpty or (FChart = nil) or
|
||||||
([csLoading, csDestroying] * ComponentState <> [])
|
([csLoading, csDestroying] * ComponentState <> []) or (FLockFit > 0)
|
||||||
then
|
then
|
||||||
exit;
|
exit;
|
||||||
FState := fpsInvalid;
|
FState := fpsInvalid;
|
||||||
@ -2242,6 +2267,15 @@ begin
|
|||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TFitSeries.SetConfidenceLevel(AValue: Double);
|
||||||
|
begin
|
||||||
|
if FConfidenceLevel = AValue then exit;
|
||||||
|
FConfidenceLevel := AValue;
|
||||||
|
InvalidateFitResults;
|
||||||
|
if FAutoFit then
|
||||||
|
ExecFit;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TFitSeries.SetDrawFitRangeOnly(AValue: Boolean);
|
procedure TFitSeries.SetDrawFitRangeOnly(AValue: Boolean);
|
||||||
begin
|
begin
|
||||||
if FDrawFitRangeOnly = AValue then exit;
|
if FDrawFitRangeOnly = AValue then exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user