..... 





 

Bill Gillam's Math Pages
Grafprog Examples
Part I: Notation.

This document will use the following notations:

  • Menu or button choices are in bold text. For example: File or OK. 
  • Submenu choices will be denoted by the pipe symbol " | ". For example: Spreadsheet/stats | graphical stats | boxplots tells the user to 
    • Choose Spreadsheet/stats from the main menu. 
    • Move the cursor down to the graphical stats selection. 
    • Move the cursor to boxplots and release. This will choose the boxplot option. 
  • Typed text will be placed in quotes. For example: Type "x^2-6" means to type the five characters x, ^, 2, - and 6 from the keyboard.
  • Box titles are in italics
Part II: Graphing functions.
     
    A) Graphing a function: 
    • Choose Function | Input from the main menu. 
    • Type "x^2-6" into one of the edit fields.
    • Press the OK button.
    B) Changing the graphing window: 
    • Choose Range | Window 
    • In the box marked xmin type "0". 
    • Type "10" in xmax. 
    • Type "-10" in ymin. 
    • Type "0" in ymax. 
    • Select 10^x from the Show Scale radio box 
    • Select decimal places from the Scale Format radio box. 
    • Type "1" into the edit box beside decimal places. 
    • Select the OK button. 
    C) Marking a value on the graph: 
    • Choose Function | Value from the main menu. 
    • Select the Color button. 
    • Select the desired color by clicking on it, then choose the OK button. 
    • Make sure that the value "1" is in the function number edit box 
    • Type "1" into the find value at x = edit box. 
    • Select the OK button. 
    D) Drawing a tangent to a curve. 
    • Choose Function | Tangent from the main menu. 
    • Choose a color as in part C if desired. 
    • Type the x-coordinate of the point of tangency (For example: "1") in the find tangent at edit box.
    • Choose OK. 
    E) Drawing a chord between two points on a curve. 
    • Choose Function | Chord from the main menu. 
    • Type "0.5" into the x1 = edit box. 
    • Type "1.75" into the x2= edit box. 
    • Choose a color as in part C. 
    • Choose the OK button. 
    F) Adding a second function. 
    • Choose Function | Input from the main menu. 
    • Type "-(x-4)^3" in the edit box marked 2.
    • Select a color (I suggest red) by clicking the Color button to the right of edit box 2. 
    • Select the OK button. 
    G) Estimating the area under a curve. 
    • Choose Function | Integral from the main menu. 
    • Type "2" into the function number edit box.
    • Type "4" for a:, "6" for b:, and "10" for n:. This means we are finding the area of the second function, , from x = 4 to x = 6. We are using 10 rectangles to estimate the answer. 
    • Choose the OK button. 
    • When the sum box comes up, note the value then choose OK. 
    H) Choosing the standard range. 
    • The standard range is a 10x10 box centered at (0,0).
    • Choose Range | Standard from the main menu. 
    I) Solving an equation. 
    • This program uses sign change to find roots, and therefore misses double roots. It only finds roots where the sign changes. 
    • Choose Function | Solve from the main menu. 
    • Leave the value at x=1. Choose OK. 
    • Choose a color if you desire. 
    • If you want to mark the points on the graph, choose mark. 
    J) Other Hints: 
    • Selecting the Clear All button in any context (For example chords) deletes all the values for that context. 
    • You can modify functions using the Function | Input menu. 
    • Range | Auto tries to find a nice window for a particular function. 

    Part III: Statistical Graphs 
     
    A) Generating or inputting data 
    • Select File | Close from the menu, then select File | New
    • Choose Spreadsheet/stats | Data from the main menu. 
    • Choose the desired array dimensions. For this example just select OK. 
    • At this point the user may enter, generate or import data. We will generate. 
    • Choose Generate | Sequence from the Data Points menu. 
    • Type in "x^2/100" in the Enter function or use calculator edit box.
    • Select the OK button.
    • You should have representative data in column 1. Select the OK button. 
    B) Plotting a columns points 
    • Choose Spreadsheet/stats | Graphical stats | Column plot from the main menu. 
    • Notice that we are graphing column 1 with dots. You could change to x's and a different color by choosing options. We won't do this. Choose OK
    C) Erasing plots: 
    • Select Spreadsheet/stats | Graphical stats | Column plot from the main menu. 
    • Replace the "1" with a "0" in the columns edit box 
    D) Plotting a line graph: 
    • To prepare for this exercise, go back into Spreadsheet | data and enter the following values into column 2: {1, 20, -5, 3, 6, 9, 5, -3, -3, -2, 10} then choose OK
    • Plot the points. 
      • Select Spreadsheet/stats | Graphical stats | Column plot 
      • Click the Options button beside the column to be graphed. 
      • Choose x from the options screen, then OK to close. 
      • Make sure column 2 is the current column, and click OK. 
    • Choose Spreadsheets|stats | Graphical stats | Line graph
    • Choose OK. 
    • The graph is probably hard to see. Choose a nice viewing window: Select Range | Window from the main menu. 
    • Enter the following values: xmin: "-10" , xmax: "20", ymin: "-10", ymax: "20". 
    • Choose OK. 
    • This graph may seem inverted, but we graphed it this way to match various horizontal graphs. 
    E) Graphing a boxplot: 
    • Choose Spreadsheet/stats | Graphical stats | Box plot. 
    • Make sure that column 2 is selected. 
    • Press OK. 
    • Notice that the endpoints match those of the line graph. 
    F) Graphing Histograms, Polygons and ogives. 
    • Histograms, polygons and ogives are all graphed in a similar fashion. We will graph a histogram as an example. 
    • Clear all previous graphs by choosing File | Close. Choose No at the save query, then choose File | New. 
    • Choose Spreadsheet/stats | Data from the main menu and select OK to use the default matrix dimensions. 
    • Place you cursor in the first column. Choose Generate | Sequence and type in "x^2/100". 
    • Select OK to return to the data entry page then choose Ok to return to the canvas. 
    • Select Spreadsheet/stats | Graphical stats | Histogram
    • Select the auto class size radio button in the class size radio group, and use 11. 
    • Press the use max-min button. 
    • Check to make sure that you are graphing column 1 and press OK
    G) Flipping the axis: 
    • The graph in part C may have seemed inverted to you. It had been graphed to match other horizontal graphs (like the histogram we just did). This means we actually graph the inverse of the functions that generated the data. 
    • If we choose to flip one graph we must flip all of them for consistency. To do this select Spreadsheet/stats | Graphical stats | Flipxy. 

IV. Other single column options under Spreadsheet/stats

1) Frequency table - This option allows you to generate tables for various class sizes. 2) Numeric stats - Mean, median, mode, standard deviation and other statistical measures by column. (one-variable stats) 

V. Two column processes: 
 
  • First open a new file and place data in at least two columns. In this example, I will generate the data. The user will usually be using data they gathered.
    • Choose File | Close. Don't save. 
    • Choose File | New. 
    • Choose Spreadsheet/stats | Data. 
    • Place the cursor in column 1. Choose Generate | Sequence. 
    • Type in "x", then choose OK.
    • Place the cursor in column 2. Choose Generate | Sequence. 
    • Type in "x^2", then choose OK. 
    • Choose OK to return to the canvas.
    • To make a column vs. column scatterplot, choose Spreadsheet/stats | Scatterplots and type in the two columns to use ( "1" and "2" in this case), then choose OK. 
  • Try to find a representative curve by obtaining a regression function: 
    • Choose spreadsheet/stats | regression. 
    • Choose quadratic regression and press the Calc button. 
    • Choose OK on the next screen. This should return you to see your equation.
  • If you wish to graph this equation, choose Copy to copy it to equation #10.
  • . VI. Placing text on the canvas 

    • Use the mouse to place the cursor in the desired position.
    • Double click the mouse. 
    • If you wish to change the font or color, choose Text | Font
    • Type in text. Enter when finished. 
    • If you wish to delete or edit the text later choose Text | Edit. 
    VII. Saving your work 
    • File | Save will save the file in native (*.fun) format, so you can reload it later. 
    • File | Save Bitmap will save the canvas as a bitmap (*.bmp) file. 
    • File | Print will print the canvas. 
    • Edit | Copy will copy the canvas onto the clipboard, so you can paste it into other programs. 
    • To export spreadsheet data to a delimited text (*.txt) file. Choose Spreadsheet/stats | Data. Next choose File | Export from the data screen (spreadsheet) menu. 
    VII. Other stuff. 
    • You can import ascii delimited data by choosing File | Import Data from the main or the data (spreadsheet) menu.
    • There are various speedbuttons and toolbars which can be used instead of the menu commands. You may discover these for yourself. The toolbars can be displayed by the Show tools selection in the Function, Spreadsheet and Range menus.
    • There are some selections for displaying axes and scales under the range menu. Since graphs such as histograms must show a scale, these can cause conflicts when used with the statistical graphs, so be careful. 
    • There is a built-in calculator accessible by choosing Help | Calculator form the main menu, the Calculator option in the function input screen, or when using a function to generate data in a matrix. I sometimes use the calculator to construct especially complex algebraic expressions, then I paste them into the function or sequence screen. 
    VIII. Known problems:
    • The program has problems with fractional roots. I defined fractional exponents using the log function, so it doesn't accept negative numbers raised to a fractional exponent. I know I can fix this in C++ if I port over, but have not yet found an easy solution in Delphi (Pascal). 
    • The equation solver looks for a sign change to solve equations and therefore misses double roots. 
    Back to Software Page

    End of page. This page has been accessed  times.
     

                                                    You may link to this page.