Getting Started Documentation Glish Learn More Programming Contact Us
Version 1.9 Build 1556
News FAQ
Search Home


next up previous contents index
Next: functionfitter.setcoordsys - Function Up: functionfitter - Tool Previous: functionfitter.medianclip - Function


functionfitter.plot - Function



Package utility
Module fitting
Tool functionfitter


Plot data and fit


Synopsis
plot(data, model, fit, resid)


Arguments

data in Plot the data and optional errors
    Allowed: T or F
    Default: T
model in Plot the model
    Allowed: T or F
    Default: T
fit in Plot the fit
    Allowed: T or F
    Default: T
resid in Plot the residual of the data and the fit
    Allowed: T or F
    Default: F


Returns
T or fail



Description

This function lets you plot the data and (optional) errors, model, fit and residuals of the data and fit.

Note that the model is evaluated from the internal functional and its parameters. If you have not explicitly set the parameters of the functional via the setparameters function, the model will evaluate to zero.

Note that at this point, the plotting interface has no impact on the x-space in which the fit is done. The fitting is always done in with the original x (abcissa) vector that you set.



Example
- include 'functionfitter.g'
- ff := functionfitter()
- x := 1:10
- y := 3 + 2*x
- yerr := 0.1*y;
- ff.setdata (x,y,yerr)               # Set data and y errors
- ff.setfunction ('p0 + p1*x')
- ff.setparameters ([2.8, 2.1])       # Set model (a bit wrong)
- ff.fit(fixed=[T,F])                 # Fit holding p0 fixed
- ff.plot()                           # Plot data, model & fit





next up previous contents index
Next: functionfitter.setcoordsys - Function Up: functionfitter - Tool Previous: functionfitter.medianclip - Function   Contents   Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc., Washington, D.C.

Return to AIPS++ Home Page
2006-10-15