![]() |
Previous | Table Of Contents | Next | ![]() |
Basic Operations
When you first initiate the GRAPHIT.EXE program you will be greeted with the following window:
This is the canvas for a Cartesian plot (i.e., an x/y plot) but at the moment it has no data points. The various ways that you can create data points for the canvas all reside in the File menu on the menu bar. This File menu is shown below:
Select the File menu entry labeled "Manually enter y data..." which will cause the following dialog box to display. On this Enter New Data Set dialog I have already entered 4 data points. Because I selected the "Manually enter y data..." menu item I am only required to enter the y axis values for each data point. The x axis values will be automatically assigned to the sequence of integers starting from 0. That is, via the Enter New Data Set dialog seen below I am defining the four data points (0,2), (1,3), (2,4), and (3,5).
When you click on "OK" to close the Enter New Data Set dialog the cGraph window is redrawn as shown below:
We have defined a single data set which is also known as a data line or a data curve.
You will also notice that the ranges of the x and y axes changed to match the data that we entered. This is because, by default, the cGraph window is in its Auto Range mode.
Now let's define a second data set so that our graph will have two data lines. This time, select the File menu entry labeled "Manually enter x,y data..." which will cause the following dialog box to display. On this dialog box I have already typed in 3 data points. Because I selected the "Manually enter x,y data..." menu item I am now required to enter (x,y) number pairs for each data point. The x and y values can be separated (delimited) by either a comma or a space character.
When you click on OK to close the Enter New Data Set dialog the cGraph window is redrawn as shown below:
The plot axes adjust to the new data because we are still in Auto Range mode. One way to tell whether the cGraph window is in its Auto Range mode is to right-click anywhere on the plot to get the context menu seen below. Incidentally, all the entries in this right-click context menu duplicate entries found on the main menu under the File or Edit menu items.
The check-mark next to the "Auto Range" entry on the context menu assures us that the cGraph window is in its Auto Range mode.
After right-clicking to open the context menu, left click on the "Reformat Plot..." entry on the context menu. The following Reformat Plot dialog box will then display:
Before the Reformat Plot dialog is presented it is first initialized with the current settings. It is via this dialog that you can change the title of the plot, which is currently the word "title". Via this dialog you can also change the horizontal axis label which is currently the phrase "x axis" (the title serves as the vertical axis label). And you can specify a particular plot range and number of tick marks for either the x or y axis. And there are checkboxes that allow you to add horizontal and/or vertical grid lines and to hide or show the legend.
The legend is the very bottom portion of the cGraph window. At the moment the legend is not doing us very much good since each of the data sets has the same label of "manually added", is assigned the same line color of black, the same line style of solid, and the same line width of 1 pixel. We will shortly see how to change these items.
Also on the Reformat Plot dialog are pushbuttons that allow you to change the font and color used for the annotations, the color used for the axes and tick marks, and the background color.
If you cancel out of the Reformat Plot dialog by clicking on the CANCEL pushbutton then you will stay in Auto Range mode (or more accurately, you will stay in whatever mode you were in previously). But if you close the Reformat Plot dialog by clicking on the OK pushbutton then you will definitely shut off cGraph's Auto Range feature. Go ahead and click on the OK pushbutton without making any changes to the min and max values offered for the x and y axes and the cGraph plot will look just like it did before. But we will demonstrate that the Auto Range feature is now inactive.
Again select the "Manually enter y data..." menu choice and type in the three data points seen below:
When you then click on OK to close the Enter New Data Set dialog the cGraph window will appear as shown below. Note that the legend claims there is now a third data set but we can't see it. This is because we requested -- via the Reformat Plot dialog -- a fixed x axis range of 0 to 5 and a fixed y axis range from 2 to 7. The new data set does not fall within this range and hence cannot be seen in the graph.
To further prove that the Auto Range mode has been disabled let's take a look at the Edit menu from the main menu bar. Note the absence of a checkmark next to the "Auto Range" entry.
Select the "Auto Range" entry from either the Edit menu or the right-click context menu and the cGraph window will change as seen below thus allowing us to observe all three data sets.
To summarize the Auto Range mode: the Auto Range mode remains active from the time you select the Auto Range option from the menu until you next click on OK to close the Reformat Plot dialog (that you get via the "Reformat Plot..." menu choice). The Auto Range mode remains inactive from the time you OK out of the Reformat Plot dialog until you next select the Auto Range menu item.
Let's now do something about the legend. Select the "Reformat Line..." entry from either the Edit menu or the right-click context menu and the following Reformat Line dialog will display:
The Reformat Line dialog can only show the particulars for a single data set at a time. You control which data set you are reformatting via the control labeled "Info for Data Line #" located at the very top of the Reformat Line dialog. This dialog offers a pushbutton that allow you to change the color used for the data line. There are other controls that allow you to specify the width of the data line and the line style (solid, dashed, etc.). And there is an EDIT box where you can enter an arbitrary label for this particular data set. It is this label that appears in the legend.
The Graph Type control allows you to connect the data points with straight lines, or with stair steps, or to not connect them at all. Digitally sampled data is traditionally plotted using stair steps. When the data points are not connected the graph is called a scattergram. The "Stoop" option is the traditional way to plot histogram data.
At the very bottom of the Reformat Line dialog you will find two controls labeled Multiplier and Offset. The data that is actually plotted on the cGraph window is given by the following equation:
Hence as long as Multiplier = 1 and Offset = 0 these controls do not influence the data curve. But they provide a handy way to offset or scale the raw data. For example, if you end up with one data set showing grams and another data set showing kilograms then you could align the two data sets by setting the Multiplier control for the first data set to .001 (thus causing both curves to represent kilograms) or by setting the Multiplier control for the second data set to 1000 (thus causing both curves to represent grams).
![]() |
Previous | Table Of Contents | Next | ![]() |