The three statistics—slope, intercept, and correlation—tell the whole story of our data set and its relation to the best line through it, but pictures are easier to understand. In this chapter, we’ll add a window with a custom view that generates a simple graph of the points in the data set and the regression line.
Let’s start thinking about this new window by imagining how it should make its appearance. The user would issue a command, either by selecting a menu item or by clicking a button, for the window to appear. Commands are issued to objects in the Mac OS human interface; what would the target of the command be? Plainly, it should be the same
MyDocument instance that manages the
Regression model. ...