KaleidaGraph Manual
KaleidaGraph Manual
Fourth Edition
Introduction
Welcome to KaleidaGraph®. You have purchased a thoughtfully designed graphing tool which provides the
most powerful visual displays of quantitative information available in either the Windows or Macintosh
environment. Through our documentation, you will learn how to develop accurate journal quality graphs that
mathematically transform even the most complex data into elegant but functional graphical displays.
The manual assumes that you are familiar with basic operations, such as clicking, double-clicking, and dragging. It
also assumes familiarity with the components of the user interface, such as menus, windows, dialogs, buttons, and
check boxes. If you are not familiar with these terms, review the documentation that came with your computer.
3
KaleidaGraph
• Chapter 10, “Importing and Exporting Graphics,” discusses how to import graphic objects into a plot
and export the plots to a printer, file, or another program.
• Chapter 11, “Working with the Layout Window,” discusses how to use the layout window to place
multiple plots on a single page.
• The Appendixes contain information on the program commands, settings files, and toolbox
shortcuts, as well as general reference information.
Learning KaleidaGraph
If you are new to KaleidaGraph, it is recommended that you take the guided tour in Chapter 2. This tutorial
guides you through the process of generating a data set, creating and editing two different plots, and placing
the plots onto a single page. Other topics in the tutorial include modifying the legend, using Formula Entry,
applying a General curve fit, and modifying data in a saved plot.
Once you start using KaleidaGraph, you can refer to the manual and the online help for step-by-step
instructions to complete specific tasks. The online help also includes detailed information on the commands
and dialogs available in the program.
Conventions
This manual uses the following conventions:
• Instructions for choosing commands are displayed in bold type. Levels are separated with a greater
than symbol (>). For example: Choose Gallery > Linear > Line.
• Dialog buttons and options are displayed in bold type. For example: Click OK.
• Keys that you should press appear in bold type. If joined with a plus sign (+), press and hold the first
key while you press the remaining keys. For example: Press Ctrl+Period.
Synergy Software
2457 Perkiomen Avenue
Reading, PA 19606-2049
Internet addresses:
Sales/Upgrades: [email protected]
Tech support: [email protected]
4
Introduction
5
KaleidaGraph
6
Getting Started
Chapter 1
This chapter lists the hardware and operating system requirements and explains how to install KaleidaGraph
onto your computer. It also covers some basic concepts, including:
• Starting KaleidaGraph.
• Introducing the data and plot windows.
• Opening saved files.
• Opening KaleidaGraph files on another platform.
• Getting help.
• Setting preferences.
• Quitting the program.
Note: If you do not have a CD-ROM drive, the KaleidaGraph CD-ROM contains a Makedisk program that
can be used to create a set of installation disks. This program is located in the Software\Kgdisk.img
directory on the CD-ROM.
Note: If AutoPlay is enabled on your system, the CDSetup program starts automatically. You can
click the Install KaleidaGraph button and skip to Step 4.
3. Run SETUP from the Software\Kgraph\Disk1 directory on the CD-ROM. Alternately, you can run
the CDSetup program to install the software.
4. Proceed through the Welcome screen, license agreement, and ReadMe information to display the
KaleidaGraph Installer dialog.
5. Specify where to install the KaleidaGraph program and its related files. To specify a different
directory, click Browse. When you are finished, click Next.
6. Choose the type of installation you want to perform and click Next. The choices are
• Typical - installs all of the KaleidaGraph files.
• Custom - allows you to select which components to install.
• Network - displays a dialog to locate the KaleidaGraph program on the network server. Only
use this if you have purchased a multi-user license.
7. Once all of the program files have been installed, a message is displayed to let you know the
installation of KaleidaGraph is complete.
Note: If you do not have a CD-ROM drive, the KaleidaGraph CD-ROM contains disk image files that can
be used to create a set of installation disks. The disk images and instructions for doing this are located
in the disk images folder on the CD-ROM.
Note: If you experience any problems during installation, you may need to use the Extensions Manager
control panel to disable third-party extensions. Once KaleidaGraph is successfully installed, you can
return the Extensions Manager to its original settings.
Macintosh Version
To remove the KaleidaGraph software from your hard disk:
1. Quit any other programs that are currently running.
2. Insert the KaleidaGraph CD-ROM.
3. Double-click the KaleidaGraph 3.5 Installer icon. Alternately, you can run the CDSetup program
to remove the software.
4. Proceed through the Welcome screen, license agreement, and ReadMe information to display the
KaleidaGraph Installer dialog.
5. Choose Remove from the pop-up menu and locate the folder that contains the KaleidaGraph
program.
6. Click Remove.
After you click OK, two windows are displayed; a data window and the Formula Entry window. The next
section contains an introduction to the data window. Refer to Chapter 5 for information on using the Formula
Entry window to analyze and manipulate data in the active data window.
1 5
Each column in the data window can contain a different data type. You can change the data type for any of the
columns by choosing Data > Column Format. Figure 1-3 shows a data window that contains columns
formatted as Text, Time, and Float.
1 5
3
6
Figure 1-5 shows the main elements found in a standard plot. There are other items that can be added to the
plot, but the elements shown here are common to almost every kind of plot.
1
Test #1
5
2 Example
7
6
6
5 7
4
Test #1
3
3
2
1
4
0
0 2 4 6 8 10 12 14
Time
Add Ascending
New Save Cut Paste Undo Rows Sort Statistics
The File menu contains a Recent Files command that lists the last eight data or plot files that have been opened
or saved in KaleidaGraph. You can open one of the files in the list by choosing its file name from the submenu
For information on opening KaleidaGraph files created on another platform, refer to Section 1.3.7.
Mac to Windows
To take a Macintosh file and open it on a Windows computer, the proper file name extension must be added.
For example, if you created a data file named Results in the Macintosh version, the file needs to be renamed
Results.QDA to be recognized by the Windows version.
The Preferences dialog contains an option that helps when sharing files across platforms. If Add Windows
file extensions is selected, the appropriate Windows file name extension is appended to the file name in the
Save dialog.
Windows to Mac
The method to open Windows files on a Macintosh depends on what version of KaleidaGraph is running on
the Macintosh. The two cases are listed below:
• Version 3.0.8 or later - No extra steps are necessary. The Open dialog automatically lists files that
have the appropriate file name extension and opens them correctly.
• Version 3.0.5 or earlier - For files coming across a network, the file type needs to be modified with
a resource editor before KaleidaGraph can read these files correctly. For files stored on disks, the
appropriate file conversion software (for example, PC Exchange) must be installed and configured,
as shown in the preceding table. If the conversion software asks for the creator, QKPT should be
entered.
Note: There are two AppleScript droplets available on our web site that make the task of sharing files much
easier. By dragging a file or folder onto these programs, the appropriate file name extension or file type
is automatically applied.
Note: If the Help dialog is not displayed, the Help file was not loaded during launch. This occurs if the
KGHelp file is renamed or is not in the Help folder (within the KGraph folder). If necessary, you can
perform a custom installation to reinstall the Help files.
Macintosh Version
To get online help, do one of the following:
• Choose Help > KaleidaGraph Help.
• Press the Help key on the keyboard.
• Click Help in any dialog that contains a Help button.
Note: If the Help dialog is not displayed, the KaleidaGraph Help file could not be found or the QuickHelp
program was deleted. The KaleidaGraph Help file must be in the same folder as the KaleidaGraph
program and it cannot be renamed. If necessary, you can perform a custom installation to reinstall the
Help files.
Help Dialog
The Help dialog, shown in Figure 1-8, contains a table of contents for the topics available in the KaleidaGraph
program. Double-click the topic and the dialog displays the information available for the selected topic. If you
are unable to locate the desired information from the table of contents page, you can use the Index or search
the entire Help system for a particular term.
If you need information on using the Help system, choose the How to Use Help (Windows) or Help with
QuickHelp (Macintosh) command under the Help menu.
The pop-up menus in the upper section of the dialog control what happens to each of the different file types
when quitting the program. For data and plot files, you can choose to Always save changes or to display a
Prompt if there are any unsaved windows. If a data or plot window has not been saved previously, a Save
dialog is displayed.
For the remaining types of files (Layout, Macros, Script, and Style), you can choose whether to display the
Prompt dialog if any changes have occurred, Always save, or Never save the changes. For details on the
information stored in each of these files, see Appendix B.
Note: The settings for this dialog are saved as part of the Style file. If you choose Never for the Style, you
must manually overwrite the default Style file by choosing File > Export > Style.
If Prompt is selected for any of the items in the Preferences dialog and changes have occurred to those
particular items, a dialog similar to the one in Figure 1-11 is displayed.
Chapter 2
This chapter contains four major examples to guide you through the operation of KaleidaGraph. These
examples show you how to:
• Create a new data set, change the column titles and format, sort the data, and calculate simple statistics
for the data.
• Create a Scatter plot, change the display of the variable, use a few plot tools, and add a curve fit and error
bars.
• Create a Column plot from a saved data set, modify the axes, change the display of the axis labels, and
add value labels above the columns.
• Display the plots from the preceding examples on the same page using the layout window.
Some optional examples are also included to show you how to perform common operations not covered in the
main examples. The topics include editing the legend text and frame, using Formula Entry, applying a user-
defined curve fit, and modifying data in a saved plot.
This dialog can also be used to change the format of the data columns. The following steps change the display
of the data so that each value only has one decimal place.
1. Press Shift and click both the Time and Test 1 entries.
2. From the Format pop-up menu, choose Fixed.
3. From the Decimals pop-up menu, choose 1.
4. Click OK to apply the changes to the data window.
Your data window should resemble the one shown in Figure 2-1.
At this point, you can proceed to the next example or save your data by choosing File > Save Data.
The X variable you selected is the independent variable and the Y variable is the dependent variable. By
default, the X variable is plotted on the horizontal axis and the Y variable is plotted on the vertical axis.
The title of the plot is taken from the name of the data window. The X and Y axis titles are taken from the
column titles of the variables being plotted. The Y variable title is also used in the legend.
The position of the equation can be changed using the Selection Arrow.
1. Click the Selection Arrow on the toolbox.
2. Drag the equation to a new position.
3. When the move is complete, click anywhere else in the window and the object handles disappear.
4. You can use the same technique to move the legend.
Data 1
y = 1.0205 + 1.7131x R= 0.9255
10
9 Test 1
8
Test 1
6
3.2, 5.7
4
2 2.5 3 3.5 4 4.5 5
Time
Data 1
y = 1.0205 + 1.7131x R= 0.9255
10
9 Test 1
8
Test 1
6
3.2, 5.7
4
2 2.5 3 3.5 4 4.5 5
Time
You have just created a customized plot. You can continue on to the next example or you can save the plot by
choosing File > Save Graph. If you save the graph, a copy of the data window is saved with the plot (in the
same file). The process of opening a saved plot and extracting the data is covered in Section 2.5.4.
2. Click Grids. The dialog changes to show the options that can be selected for the major and minor
grids.
3. Choose None from the pop-up menu to the right of Major.
The next change is to remove the tick marks on the X axis.
1. Click Ticks. The dialog changes to show the options that can be selected for the major and minor
ticks.
2. Choose None from the pop-up menus below both Major and Minor.
The next change also involves the tick marks, but this time on the Y axis.
1. Select the Y axis from the pop-up menu under Axis.
2. Choose Out from the pop-up menus below both Major and Minor.
The last step is to change the maximum Y axis limit from 140 to 160.
1. Click Limits. The dialog changes to show the options that can be selected for the limits.
2. Change the value in the Max field from 140 to 160.
3. Click OK to update the plot with all of the changes that were made while in the Axis Options dialog
At this point, your plot should resemble the one shown in Figure 2-7.
160
140
120
100
1966 (K)
80
60
40
20
0
Jan Feb March April May June July Aug Sept Oct Nov Dec
Month
Note: The following steps assume the two plots from the previous examples are still available. If you saved
the plots and quit before reaching this example, use the Open command (File menu) to open these
plots. If you do not have them any longer, you can open any two plots from the Plots folder in the
Examples folder.
Feel free to print the layout by choosing File > Print Layout. The contents of the layout window can be copied
to the Clipboard using the Copy Layout command (Edit menu). It is also possible to export the layout in a
variety of formats using the appropriate command from the Export submenu (File menu).
The layout window can be closed by choosing File > Close. This completes the main portion of the guided
tour. You can either stop at this point or proceed to the additional examples in Section 2.5 to learn more about
KaleidaGraph.
1. Select the Text tool ( ) from the toolbox. You can select this tool by either clicking it or pressing
T on your keyboard.
2. Double-click any of the three labels inside the legend. A dialog is displayed to modify the text.
3. Delete the text in this dialog and type any information you like. Feel free to change the font, size, and
style as well.
4. Click OK to return to the plot and see the change.
The changes you made only affect this one label. If you use the Selection Arrow instead of the Text tool, you
can change the attributes of all legend items at once. However, you cannot edit the text with the Selection
Arrow.
Memory locations and column numbers can be used in formulas. Memory locations range from 0 to 99 and
need to be preceded by an m when used in a formula (m15, m35, and so on).
Column numbers range from 0 to 999 and need to be preceded by a c when used in a formula (c10, c55, and
so on). Column numbers are displayed in a box at the top of the column. Please note that when a selection is
made in the data window, the first column in the selection becomes column 0.
The following are a few examples of basic formulas along with a description of each:
c2=c0+c1; Adds the first two columns together and stores the results in column 2.
c1=c0/1000; Divides column 0 by 1000 and stores the results in column 1.
c2=cos(c0); Calculates the cosine of column 0 and stores the results in column 2.
6. Click F5, type cell(0,3)=csum(c2), and click Run. This formula calculates the total sum of the values
in column 2 and stores the result in the cell at row 0, column 3. You need to click the right scroll
arrow to see the result of this formula.
To the left of the F1 button is a Posted Note button ( ). Clicking this button displays a text editor. You
can enter multiple formulas into the editor and run them all at once by clicking Run. The formulas must be on
separate lines and each must be terminated with a semicolon.
Let’s try using the same formulas from before, but this time executing them using the Posted Note window:
1. Choose File > New to display an empty data window.
2. Choose Windows > Formula Entry.
3. Click the Posted Note button in the Formula Entry window to display a text editor.
4. Type the following formulas into the Posted Note window. Note that each formula ends with a
semicolon and appears on a separate line.
c0=index() + 1;
c1=log(c0);
c2=c1^2;
cell(0,3)=csum(c2);
5. After the formulas are entered, choose File > Exit to return to the Formula Entry window. A message
is displayed in the Formula Entry window telling you to click Run to execute the Formula Posted
Note.
6. Click Run to execute all of the formulas at once.
As you can see, this is a very convenient method to execute multiple formulas at once. Using this method, you
can save the formulas as a text file that can be opened at a later time within the Posted Note dialog.
5. Click F2, enter c1=5+10*exp(–c0*c0/(20*20)), and click Run. The results are placed in the second
data column (column 1).
A Gaussian curve fit is of the form y=a+b*e^(–(x–c)^2/d^2). In KaleidaGraph, enter the equation
(using m0 as X and m1–m9 as your unknowns) with some initial guesses to give the algorithm a
starting point. The format for adding initial guesses is to follow the equation with a semicolon and
separate each initial guess with a semicolon.
5. Type m1+m2*exp(–(m0–m3)*(m0–m3)/(m4*m4));m1=1;m2=5;m3=1;m4=10 into the Curve Fit
Definition dialog and click OK to each dialog to return to the plot.
Chapter 3
Note: If you do not want to save the data, this dialog can be avoided by pressing Shift while either clicking
the close box or choosing File > Close/NoSave.
You can also use the Home button ( ) in the upper-left corner of the data window to return the window
to its origin (row 0, column 0). This is useful for quickly returning to the start of the data window.
Key Direction
Left/Right Arrow Move one cell left/right.
Up/Down Arrow Move one cell up/down.
Tab Move one cell to the right.
Shift+Tab Move one cell to the left.
Return Move down one cell.
Shift+Return Move up one cell.
Enter Windows: Same as the Return key.
Macintosh: Move one cell in the same direction as the last move.
Page Up/Down Move one window view up/down.
Home Move to top of column.
End Move to bottom of column.
If Overwrite Mode is active, cells are automatically selected when using the mouse or keyboard to move to a
cell. Typing data into the current cell replaces any existing data.
If Insert Mode is active, clicking a cell does not automatically select the cell. Instead, a cursor is placed in the
cell to edit the current value. To select a cell in Insert Mode, double-click the active cell.
• Click the first column to be included, press Shift, and click the last column. You can use the scroll
bars to move to the last column.
To select a large block of data, click the first cell of the block, press Shift, and click the cell in the opposite
corner of the block. You can use the scroll bars to move to the second cell.
Note: If the active cell is in the last row of the data window, pressing the Enter (Windows), Return
(Macintosh), or Down Arrow key automatically adds 100 rows to the data window.
Adding Columns
To add more columns to the data window, do one of the following:
• Choose Data > Append Columns and enter the number of columns to be appended to the data
window.
• Press the Right Arrow key (if the active cell is in the last column of the data window).
• Click the Add button in the Column Format dialog (Data menu).
To insert a row:
1. Make a selection in the data window. The row is inserted above the selection.
2. Choose Data > Insert Row. A row of blank cells is inserted into the data window.
Inserting Columns
To insert a column into the data window:
1. Select a column in the data window.
2. Choose Data > Insert Column. A blank column is inserted before the selected column in the data
window.
Columns can also be inserted by pressing Alt (Windows) or Option (Macintosh) and clicking a column. A
new column is inserted before the selected column.
Deleting Columns
Columns can be deleted from the data window by making a selection and choosing Data > Delete Column.
The selection is deleted and the remaining data shifts over to take the place of the deleted data.
Note: The column titles in the data window do not display the superscripts, subscripts, and alternate fonts.
The \n, \f, \u, and \d characters are mixed in with the normal text. However, when you create a plot,
these characters are converted to obtain the desired results, as shown in the following figures.
Chapter 4
Note: To enter numbers in scientific notation, enter the number, followed by an e and the power
(for example, 1.23e–4).
4. Press Enter (Windows) or Return (Macintosh) to move down one row, or use the arrow keys to
move around the data window.
5. Repeat steps 3 and 4 until all of the data is entered.
Note: If KaleidaGraph detects any characters that are not associated with the selected data type, a beep
sounds when you move to the next cell. Examples of incorrect characters for numeric data include:
text, multiple decimal points, and separators for date and time numbers.
Note: When entering two digit years less than 40, the Promote 2 digit dates less than 40 option in
the Preferences dialog determines whether the dates are interpreted as 19xx or 20xx.
6. Press Enter (Windows) or Return (Macintosh) to move down one row, or use the arrow keys to
move around the data window.
7. Repeat steps 5 and 6 until all of the data is entered.
If you import date or time data from a file, the format must closely match the actual format shown to enable
KaleidaGraph to recognize the column properly. However, if you are typing the data or pasting the data from
the Clipboard (to a column that has been set to a date or time format), variations from the exact format are
allowed. Valid separators for the date and time formats include: slashes (/), colons (:), commas, and spaces.
When importing dates from another program, the Default Date Format setting in the Preferences dialog (File
menu) determines how the dates are interpreted by KaleidaGraph.
Note: Any data that is entered into a Text column appears left-justified.
When plotting, if the independent variable (X) contains missing values, KaleidaGraph searches for the first
and last cells that contain data and plots all values in between, ignoring any empty cells. If the dependent
variable (Y) contains missing values, the empty cells are ignored when plotting.
There is an option in the Plot Extras dialog (Format menu) that controls how missing values are treated in
Line, Double Y, Double X, Double XY, High/Low, Step, X-Y Probability, and Polar plots. When Missing
Data Breaks is selected, a missing data point in an X or Y variable causes a break in the line being plotted.
Otherwise, the line is continuous and the missing data points are ignored.
The one method that does give you complete control is the Create Series command from the Functions menu.
This command allows you to specify an initial value, an increment, a multiplier, and a final value for the series
You can create a numeric series in any column that contains a Float, Double, or Integer data format. A date or
time series can be created in any column that contains a Date or Time format.
To create a series:
1. Select a column or a range of columns in the data window.
2. Choose Functions > Create Series. A dialog similar to one of the following appears, based on the
format of the column.
3
1
4
2
The settings in the Text File Input Format dialog are discussed below:
1. Delimiter:
Delimiters are characters that separate the data values in a text file. The two common delimiters, Tab and
Space, assume that the data contains numbers, dates, or text, and that it is organized in columns, separated
by either tabs or spaces. A delimiter can also be user-defined by selecting Other and typing the desired
delimiter. This delimiter is set to a comma by default.
The Special format can be used to control how the data file is imported into KaleidaGraph. The Special
format is covered in Section 4.3.4.
2. Number:
This setting determines the number of delimiters (tabs, spaces, or user-defined) that are present between
data values. The four options are described below:
• Select = 1 if a single delimiter separates the data values.
• Select >= 1 if one or more delimiters separate the data values.
• Select >= 2 if two or more delimiters separate the data values. If less than two delimiters are present,
they are treated as part of the same column.
• Select >= 3 if three or more delimiters separate the data values. If less than three delimiters are
present, they are treated as part of the same column.
3. Lines Skipped:
This setting determines the number of lines at the beginning of the file which are skipped before
interpreting the rest of the data. As this number changes, the data displayed in the preview window adjusts
to reflect the change. The skipped lines are automatically placed into the Posted Note, unless you are
merging a text file with a data set that already contains information in the Posted Note.
4. Options:
When the Read Titles check box is selected, the first line in the preview window is used for the column
titles.
5. Preview Window
This window displays 40 characters from the first four lines of the text file. To see a larger sample of the
file, click View Text.
A period can also be used to represent an empty data cell. There is a mainframe program called SAS that uses
the period as a default character for empty data cells.
Looking at the preview window of this dialog, you can see that:
• This particular file is tab-separated.
• A single tab is present between the values.
• None of the lines need to be skipped.
• The first line of the file should be used for the column titles.
4. Make the settings shown in the previous dialog and click OK. The text file is opened into a new data
window. Figure 4-5 shows the data window that results from importing the example data set.
Looking at the preview window of this dialog, you can see that:
• The file begins with an unusable line which must be skipped.
• There is a title line containing three labels.
• The data is spread across six columns. Three of the columns contain labels and should be
skipped. The other three contain values which should be read as one fixed width field (Time
values) and two variable width fields (Temperature and Volume values).
5. Using the above information, you can now specify the format of the titles and the data. Figure 4-8
shows how the dialog should appear after making the following selections.
• Lines Skipped should be 1 to skip the first line.
• Read Titles should be selected to read in the column titles.
• The Title Format should be either a a a or 3(a). Either one of these formats reads in three
labels, separated by white space.
• The Data Format should be either A f3 A v A v or A f3 2(A v). Using either one of these
formats, the three columns of labels are skipped and only the three columns of data are read into
the data window.
Binary editing is much faster than text editing and allows you to quickly move large amounts of data. Use Text
mode if you need to copy more than 1000 cells and paste them into the plot window or another program.
To view the active mode, click the Edit menu. The active mode is displayed in the menu and has a check mark
in front of it. To switch between modes, choose the active mode.
The sort commands are located in the Functions menu. The Ascending Sort command sorts the data from
low value to high value. The Descending Sort command sorts from high value to low value. Both of these
commands use the same dialog, shown in Figure 4-11. This dialog allows you to select which columns to
reorder during the sort. Any columns you select before entering this dialog are preselected for you.
• To deselect a column, press Ctrl (Windows) or (Macintosh) and click the column name.
5. Click OK to perform the sort.
Figure 4-12 shows a sample data window. Figure 4-13 shows the same data window after selecting all of the
columns and using the Transpose command. Notice that the data originally in column 0 is now in row 0 after
being transposed.
• Your selection contains more than 1000 rows, because the data window is limited to a maximum of
1000 columns.
Data can be masked using any of the following: the Mask command (Functions menu), the Data Selection
tool from the toolbox, macros, and Formula Entry. Using Formula Entry to mask data is covered in
Section 5.4. The other methods are discussed below.
Note: The Unmask command (Functions menu) can be used to unmask selected data cells.
Mask Command
To mask data with the Mask command:
1. Select the cells to be masked.
2. Choose Functions > Mask. A stipple pattern appears in each of the masked data cells.
Note: Double-clicking this tool unmasks the data and returns the plot to its original state.
Macros
KaleidaGraph contains three default macros in the Macros menu that mask data upon execution. These
macros are Filter, Simplify, and Invert Mask. Refer to the online help for information on these macros.
Binned Data B
35
30
25
20
15
10
5
0
-1.5
-0.5
-1.25
-0.75
-0.25
0
1
-1
0.25
0.5
0.75
1.25
Figure 4-18 Histogram plot of binned data
Binned Data B
35
30
25
20
15
10
5
0
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
Binned Data B
35
30
25
20
15
10
5
0
-2 -1.5 -1 -0.5 0 0.5 1 1.5
To execute a macro:
1. Open the data window to be operated on by the macro. A sample data set is shown in Figure 4-22.
3. Type the appropriate values into any dialogs that appear. Click OK to continue execution or click
Cancel to stop the macro. Figure 4-25 shows the results of executing the Integrate - Area macro.
The Save Data and Save Data As commands always save the data in binary format, because this is
considerably faster and more compact than text format. Binary files can only be read by KaleidaGraph.
If text format is desired, choose File > Export > Tab-Delimited Text. A Save dialog appears, allowing you
to specify the location and file name for the text file.
If nothing is selected in the data window, KaleidaGraph prints the entire data set. A maximum of 15 columns
can be printed on each page. Decreasing the width of the columns and scaling the output does not increase this
limit.
KaleidaGraph supports Dynamic Data Exchange (DDE) for inserting data from a source document created in
another program into the data window. This is accomplished by creating a link to the data in the source
document. KaleidaGraph displays a copy of the linked data, but the actual data is stored in the source file. The
linked data is updated whenever the original data is modified in the source document.
The linked data appears in the data window. A dark border surrounds the data, indicating that it is linked. To
remove the border, choose Edit > Hide Borders.
The linked data appears in the data window. A dark border surrounds the data, indicating that it is linked. To
remove the border, choose Edit > Hide Borders.
The published data is surrounded by a dark border in the data window. This border indicates that the data is
published. To remove the border, choose Edit > Hide Borders.
A new edition is created every time you create a publisher. If several sections of the same file are published,
each publisher has a separate edition.
To cancel a publisher:
1. Click any portion of the published edition.
2. Choose Edit > Publisher Options.
3. Click Cancel Publisher to stop updating the edition. A dialog verifies that you want to remove the
publisher.
4. Click OK to return to the data window.
To subscribe to an edition:
1. Create a new data window or select one of the cells in the active data window.
2. Choose Edit > Subscribe To. The dialog in Figure 4-28 is displayed.
The subscribed edition appears in the data window. A dark border surrounds the data, indicating that it is a
subscriber. To remove the border, choose Edit > Hide Borders.
Note: Any changes made to the data in a subscriber are lost when the next edition is received. If you need to
change the data, it is best to make changes directly in the publisher.
To cancel a subscriber:
1. Click any portion of the subscriber.
2. Choose Edit > Subscriber Options.
3. Click Cancel Subscriber to stop receiving updates from the edition. A dialog verifies that you want
to remove the subscriber.
4. Click OK to return to the data window.
Chapter 5
The Formula Entry window is a very powerful tool for data analysis. Using this window, you can apply a wide
range of algebraic functions to your data. It also provides a formula script feature to help automate certain
functions in the program.
1
5
2
6
3 7
4
Figure 5-1 Formula Entry window
1. Formula Entry Menu Bar
These menus contain all of the functions that are available in Formula Entry. The commands in these
menus are described in Section 5.9.
2. Text Field
Formulas are entered in this area of the window.
3. Posted Note
This is an internal text editor where multiple functions can be strung together. See Section 5.2 for more
information on multi-line formulas.
4. Function Buttons
Using these buttons, you can assign frequently used formulas to the first eight function keys of your
keyboard. This topic is discussed in Section 5.1.6.
5. Degrees/Radians Buttons
These buttons determine whether the results of trigonometric functions are in degrees or radians.
6. Help...
Click this button to display the Help dialog.
7. Run
This button is used to execute the current formula. Formulas can also be executed by typing Enter
(Windows) or Return (Macintosh). If a data window is not open, this button is unavailable.
Operators Menu
The operators available within Formula Entry are listed below. Grouped items have the same precedence.
! factorial
^ power
* multiply
/ divide
% modulo
+ add
– subtract
< less than
<= less than or equal to
> greater than
>= greater than or equal to
== equal to (used for comparisons)
!= not equal to
&& logical AND
|| logical OR
?: conditional
() left and right parentheses
= equal (used to store results)
[] matrix operator
Functions Menu
The Functions menu contains general math functions. Examples of these commands include trigonometric
functions (sine, cosine, and tangent), square root, and absolute value.
Statistics Menu
The Statistics menu contains the commands that are used to calculate statistics on data. Section 5.3 explains
how to calculate statistics using these commands. The equations used to calculate these statistics are located
in Section D.2.
Special Menu
The Special menu contains commands that use either a Boolean expression or a text string as part of their
definition.
Library Menu
The Library menu displays all of the definitions in the current library. If the library is empty, this menu is
also empty. For more information on the library, see Section 5.8.
Formulas are created using a combination of column references, operators, and functions. Memory locations
and constants can also be used in a formula. Formulas are usually constructed with the destination to the left
of the equal sign (=) and the calculation to the right of the equal sign. One exception is the name function,
which specifies the output column as one of the parameters.
The results of a formula can be stored in another column, a cell, or a memory register. If a destination is not
specified, the results are displayed in a dialog similar to Figure 5-2. This is useful for formulas that result in a
single value, such as the commands located in the Statistics menu.
Calculations involving columns are performed on a row-by-row basis. If two or more columns are used in a
calculation, corresponding cells in the same row are used to determine the results. If empty or masked cells
are encountered during the calculation, the corresponding cell in the destination column is empty.
Individual cells can be referenced in a formula using the cell function. The syntax of this function is
cell(row#, col#). Using this function, it is possible to store and retrieve data anywhere in the data window.
Memory registers range from 0 to 99 and need to be preceded by an m when used in a formula (m0, m1, and
so on). Memory registers are useful in calculations that result in a single value. The value can be stored in a
memory register and used at a later time in other calculations.
Example Formulas
Note: The results of a formula are based on the data at the time the formula is executed. Changing the data
does not cause the results to automatically recalculate. To update the results, the formula must be
executed again.
Comments can be added anywhere in the Posted Note with the use of a semicolon. Anything after the
semicolon to the first occurrence of a carriage return is treated as a comment. The following lines from the
multi-line formula in Figure 5-3 have had comments added.
c0 = (–0.5 + ran()) * 10; Fill c0 with random numbers between –5 and 5.
macro("Invert Mask"); Execute the Invert Mask macro from the Macros menu.
name("Values", c0); Change the title of c0 to "Values."
Formula Result
mean(c12) Finds the mean of column 12 and displays the result in a dialog.
c4 = stderr(c3) Determines the standard error for column 3 and places the result in
column 4.
cell(0,5) = std(c15) Finds the standard deviation of column 15 and stores the result in row
0 of column 5.
m2 = cmin(c11) Determines the minimum value in column 11 and stores the result in
memory register 2.
It is not necessary to enter starting and ending values if you want to use all of the rows or columns in the
calculation. If the starting and ending values are missing, the entire range of rows or columns is used to
determine the result.
For example:
[,] Operate on the entire data window.
[ , 1:3] Operate on all rows in columns 1 through 3.
[0:25, ] Operate on rows 0 through 25 in all columns.
The following table shows some examples of statistics commands using the matrix operator. Each of these
formulas display the results in a dialog.
Formula Result
stderr([ , ]) Calculates the standard error for the entire data window.
mean([ , 1:1]) Finds the mean for all rows in column 1.
std([0:10, ]) Calculates the standard deviation for rows 0 through 10 in all
columns.
median([0:100, 3:5]) Calculates the median for the data in rows 0 through 100 in columns
3 through 5.
std([–10:10, 0:0]) Finds the standard deviation for a window of data from –10 rows to
+10 rows from the highlighted row in column 0.
npts([0:1000, –3:3]) Finds the number of points in rows 0 through 1000 in a window of
data from –3 columns to +3 columns from the highlighted column.
Note: For more information on masking and unmasking data, refer to Section 4.8.
Formula Result
Figure 5-5 shows an example use of the table function. The first two columns contain X-Y data points. Column
2 contains a new set of X values for which you want to find the corresponding Y values. The Y values in
column 3 were found by executing the formula c3=table(c2, c0, c1) in Formula Entry.
Before you can get values from a curve fit, you must first create a plot and apply a curve fit to the data.
Otherwise, an error message is displayed when you try to run the formula.
Note: It is possible to get the curve fit values and residual values into the data window without using Formula
Entry. See Section 9.6.3 for more information on exporting the results of a curve fit into the data
window.
The following sections show how to get values from a curve fit into the data window. Figure 5-6 shows a plot
with a Polynomial curve fit applied (represented by the dashed line) which will be used as an example.
Sinc(5x)
1 8 9
Y = M0 + M1*x + ... M8*x + M9*x
0.8 M0 0.74336
0.6 M1 -2.2635e-06
M2 -1.5172
0.4
M3 5.393e-06
0.2 M4 0.57377
M5 -2.3555e-06
0
R 0.89315
-0.2
Note: Unless the curve fit is extrapolated to the axis limits (see Section 9.8.1), the results are only accurate
if the X values lie within the original range of the data. If the values fall outside the data range, the
results are linearly interpolated.
Note: This method uses the curve fit points originally calculated when the fit was applied. You may want to
increase the number of calculated points to make the values from the fit more accurate. See
Section 9.8.3 for instructions on increasing the number of curve fit points.
Note: This method can similarly be used to calculate the X value when the Y value on the fit is known. You
need to rearrange the formula so that it solves for X instead of Y.
Note: You do not have to change the format of the column before using it in a calculation. This is because
KaleidaGraph automatically stores the values as a total number of seconds.
The default library provided with KaleidaGraph contains a number of definitions for variables, constants, math
functions, and curve fit equations. The definitions are grouped together to make it easier to locate a particular
function, but this is not a requirement. You can place the definitions in any order you choose.
One of the main reasons for using the library is to form aliases or shorthand references for functions, variables,
and constants. This is particularly useful for defining sections of a formula that exceed the 256 character limit
in the Formula Entry, Function plot, and General curve fit windows.
Use the same syntax shown in the default library to create your own definitions. All of the library definitions
are terminated with a semicolon. Anything following the semicolon is treated as a comment, unless the
semicolon is preceded by a backslash (\). The purpose of the backslash is to treat the data after the semicolon
as a continuation of the function. This is normally used to set up initial conditions when defining curve fit
equations.
When creating your shorthand references, it is important to note that the library is not case sensitive. If you
had two functions named S1() and s1(), either one could be substituted by KaleidaGraph.
KaleidaGraph references whichever library is currently open. To reference a new library, use the Open
command in the editor to locate and load the library you want to use. If you want to tie a particular library to
a macros file, use the File > Export > Macros command to save the macros file. The current library becomes
the default library for that particular macros file.
== - This operator compares two values to see if they are equal to each other.
Examples: mask(c1 == 4, c1), unmask(c3 == c2, c1)
!= - This operator compares two values to see if they are unequal.
Examples: mask(c2 != c4, c2), unmask(c3 != 2, c3)
&& - This operator performs a logical and on two Boolean expressions. The result of both expressions must
be true (non-zero) for the logical and to be true.
Examples: c3 = (c0>1 && c0<15) ? c0 : 0.5, c1 = (c2>3 && c2<11) ? c2 : 0
|| - This operator performs a logical or on two Boolean expressions. The result of one expression must be true
(non-zero) for the logical or to be true.
Examples: c1 = (c2>1 || c3>1) ? c1 : c4, c2 = (c1<0 || c1 == 0.5) ? 0 : c1
?: - This operator performs a conditional test on a Boolean expression. This operator can be expressed in one
of two ways:
• if (Boolean) expression 1 else expression 2
• (Boolean) ? expression 1 : expression 2
If the result of the Boolean is true (non-zero), return expression 1; if it is false, return expression 2.
Examples: c9 = (c2>.5 || c3>.1) ? c11 : c4, c1 = (c2>1 && c2<10) ? c2 : 0.1
= - This operator is used to place the result of a calculation into a column, cell, or memory location.
Examples: m0 = 12 * m1, c1 = sqrt(c0), c2 = cos(c0), cell(0,5) = cmin(c0)
[ ] - The matrix operator is used to specify a range of data for use in a statistical calculation. The syntax of the
operator is: [starting row:ending row, starting column:ending column].
It is not necessary to enter starting and ending values to use all of the rows or columns in the calculation. If
the starting and ending values are missing, the entire range of rows or columns is used to determine the result
Examples: cmax([ 0:23, 3:10]), c18 = median([ , 12:14])
erf(x) - Calculates the error function of a value. This function has the following limiting values: erf(0) = 0,
erf(∞) = 1, and erf(–x) = –erf(x).
Examples: erf(2), c10 = erf(c9)
erfc(x) - Calculates the complementary error function of a value. This function has the following limiting
values: erfc(0) = 1, erfc(∞) = 0, and erfc(–x) = 2–erfc(x).
Examples: erfc(.5), c20 = erfc(c19)
exp(x) - Calculates the value of e (2.7182...) raised to a power.
Examples: exp(3), exp(m1), c10 = exp(c2)
fract(x) - Returns the fractional portion of a number.
Examples: fract(2.83), c12 = fract(c9)
index() - Returns the current row number (starting at 0).
Example: c5 = index() * .5, c11 = index() – 64
inorm(x) - Determines the inverse of the normal distribution for a number between zero and 100%.
Examples: inorm(25), inorm(m2), c10 = inorm(c9)
int(x) - Returns the integer portion of a number.
Examples: int(2.83), c12 = int(c9)
invcos(x) - Determines the inverse cosine of a number. The number is in radians or degrees, based on the
setting in the Formula Entry window.
Examples: invcos(.5), invcos(m3), c6 = invcos(c5)
invsin(x) - Determines the inverse sine of a number. The number is in radians or degrees, based on the setting
in the Formula Entry window.
Examples: invsin(.219), invsin(m0), c15 = invsin(c10)
invtan(x) - Determines the inverse tangent of a number. The number is in radians or degrees, based on the
setting in the Formula Entry window.
Examples: invtan(1), invtan(m2), c9 = invtan(c8)
ln(x) - Calculates the natural logarithm (base e) of a number.
Examples: ln(8), ln(m5), c12 = ln(c9)
log(x) - Calculates the common logarithm (base 10) of a number.
Examples: log(20), log(m10), c18 = log(c15)
norm(x) - Determines the normal distribution of a number between zero and 100%.
Examples: norm(23), norm(m5), c7 = norm(c5)
poly(x, col#) - Given an x value and a column that has a Polynomial curve fit applied, this function determines
the value from the fit at the x point.
Examples: poly(.0034, c15), c14 = poly(c12, c1)
pow(x, col#) - Given an x value and a column that has a Power curve fit applied, this function determines the
value from the fit at the x point.
Examples: pow(119, c10), c3 = pow(c0, c2)
smooth(x, col#) - Given an x value and a column that has a Smooth curve fit applied, this function determines
the value from the fit at the x point.
Examples: smooth(11.15, c2), c4 = smooth(c2, c3)
spline(x, col#) - Given an x value and a column that has a Cubic Spline curve fit applied, this function
determines the value from the fit at the x point.
Examples: spline(–23.098, c17), c4 = spline(c3, c8)
wgt(x, col#) - Given an x value and a column that has a Weighted curve fit applied, this function determines
the value from the fit at the x point.
Examples: wgt(15.657, c2), c9 = wgt(c10, c11)
All of the formula script commands are discussed in Section 5.10.2. In addition, the #FORMULA command
supports all of the functions that are available in the Formula Entry window, except for the execute command
You can save the scripts using the Save As command from the File menu in the Posted Note window. Once
the script has been saved, it can be reopened by choosing File > Open in the Posted Note dialog. Alternately,
you can use the execute function in Formula Entry to load and execute a saved formula script.
The format for specifying a path to a file differs between the Windows and Macintosh versions. Under
Windows, the path starts at the hard disk, with subdirectories separated by a backslash (\). On a Macintosh,
the path starts at the hard disk, with subdirectories separated by a colon (:).
The equal sign (=) is optional in this syntax. Anywhere the equal sign is used, the command is also valid
without it.
The commands are case sensitive. The examples for each command show how it should be entered in the
Posted Note window.
Comments can be added between formula script commands with the use of a semicolon. Any lines that begin
with a semicolon are treated as comments. Place comment lines before or after individual formula script
procedures. A syntax error message is displayed if the comment is included within the formula script
command definition.
List of Commands
#CLOSE - This command closes the active window, without saving its contents. The syntax for this command
follows:
#CLOSE
#CLOSE/ALL - This command closes all visible windows, without saving their contents. The syntax for this
command follows:
#CLOSE/ALL
#CLOSE/OPT - This command closes the specified plot or data window. You have the option of saving the
window before closing it. Only plot and data windows should be taken into account when determining the
position number of the window. The syntax for this command follows:
#CLOSE/OPT
window = # (the position of the window from front to back, where the frontmost window is position 1)
save = BOOLEAN
wintype = plot/data (optional)
#END
#COPY - This command copies the selection in the active data window to the Clipboard. You may optionally
specify a selection as part of the command options. If no selection is specified, the current selection in the
window is used. You may also specify whether to copy column titles in addition to any data. The syntax for
this command follows:
#COPY
[title = BOOLEAN] [Start_Row End_Row Start_Column End_Column]
#END
The numbers should be separated by any white space characters. As a special case, if Start Row has a value of
–1, the entire window is selected. The active cell in the data window is moved to the location specified by Start
Row, Start Column. The selection addresses for both row and column positions begin at zero and are counted
from the upper-left corner of the data window (position 0,0). The default action is not to return titles.
Example: Copy the selection in rows 5–15, columns 1–3 (no titles).
#COPY
5 15 1 3
#END
Example: Copy the selection in rows 0–10, columns 1–2 (with titles).
#COPY
title = true 0 10 1 2
#END
#DATA - This command places tab-separated data in a new data window. The first row should contain titles.
The syntax for this command follows:
#DATA
(First row contains tab-separated titles.)
(The remaining rows contain tab-separated data.)
#END
Example: Use the first row for titles and place the remaining data in a new data window.
#DATA
Time Test#1 Test#2
1.0 38.6 39.7
1.5 41.2 40.9
2.0 42.7 42.3
#END
#DATA/NOTITLE - This command places tab-separated data in a new data window. The first row should
contain data. The syntax for this command follows:
#DATA/NOTITLE
(All rows contain tab-separated data.)
#END
#DATAFILE - This command loads the data file named in the string. If the file is a text file, it is loaded using
the specified parameters. The syntax for this command follows:
#DATAFILE
file = STRING (This string should be either a simple name or a fully or partially qualified path to the
file. The Open dialog is displayed if the path or file name is incorrect, or if "*.*" is used for the
string.)
delimiter = tab/space/special/STRING (if STRING is used, only the first character of the string is
important)
skip = # (the number of lines to be skipped at the beginning of the file)
read_titles = BOOLEAN
del_number = # (0 -> del == 1, 1 -> del >= 1, 2 -> del >= 2, 3 -> del >= 3)
title_format = STRING (only used when delimiter = special)
data_format = STRING (only used when delimiter = special)
#END
Example: Open a comma-delimited text file. The path uses a Windows format.
#DATAFILE
file= "C:\kgraph\Data_1.txt"
delimiter = ","
#END
Example: Open a text file using the special format. The path uses a Macintosh format.
#DATAFILE
file = "Macintosh HD:Data:Test #1"
delimiter = special
skip = 0
read_titles = TRUE
title_format = "3(a)"
data_format = "A f3 2(A v)"
#END
#FORMULA - This command executes a list of standard formulas. A semicolon should be placed at the end
of each formula. It is valid to omit the #FORMULA and #END statements if you wish. The syntax for this
command follows:
#FORMULA
(List of standard formulas.)
#END
Example: Calculate the average of two columns and give the output column a title.
#FORMULA
c3 = (c1 + c2) /2;
name("Average", c3);
#END
#MERGEFILE - This command loads the data file named in the string, starting at the specified row and
column position. The file is loaded using the specified parameters. The syntax for this command follows:
#MERGEFILE
file = STRING (This string should be either a simple name or a fully or partially qualified path to the
file. The Open dialog is displayed if the path or file name is incorrect, or if "*.*" is used for the
string.)
delimiter = tab/space/special/STRING (if STRING is used, only the first character of the string is
important)
skip = # (the number of lines to be skipped at the beginning of the file)
read_titles = BOOLEAN
del_number = # (0 -> del == 1, 1 -> del >= 1, 2 -> del >= 2, 3 -> del >= 3)
title_format = STRING (only used when delimiter = special)
data_format = STRING (only used when delimiter = special)
position = # # (row number and column number separated by a tab)
#END
Example: Merge a comma-delimited text file. The path uses a Windows format.
#MERGEFILE
file= "C:\kgraph\Data_1.txt"
delimiter = ","
#END
#METAFILE - This command exports the active plot window as a Metafile image via the Clipboard. This
command is only available under Windows. The syntax for this command follows:
#METAFILE
#METAFILE/OPT - This command exports the active plot as a Metafile image to a file or the Clipboard,
using the specified parameters. It is not possible to export the plot as an OLE object using this command. This
command is only available under Windows. The syntax for this command follows:
#METAFILE/OPT
scale = # (ranging from 1 to 1000)
hires = BOOLEAN
min_whitespace = BOOLEAN
file = STRING
#END
#OPEN - This command opens the specified file. It can be used to open any file that KaleidaGraph recognizes.
The syntax for this command follows:
#OPEN
file = STRING (This string should be either a simple name or a fully or partially qualified path to the
file. The Open dialog is displayed if the path or file name is incorrect, or if "*.*" is used for the
string.)
#END
Example: Open a saved Style file. The path uses a Macintosh format.
#OPEN
file = "Macintosh HD:KaleidaGraph:KG Style"
#END
Example: Open a saved Layout file. The path uses a Windows format.
#OPEN
file = "C:\KGraph\Layouts\Layout_1.qpl"
#END
#PAGE_PRINT - This command prints one or more plot windows using the current settings in the layout
window. The syntax for this command follows:
#PAGE_PRINT
#PASTE - This command pastes text or binary data from the Clipboard into the active data window. You may
optionally specify a selection as part of the command options. You may also specify whether to paste column
titles in addition to any text data. The syntax for this command follows:
#PASTE
[title = BOOLEAN] [Start_Row End_Row Start_Column End_Column]
#END
The numbers should be separated by any white space characters. As a special case, if Start Row has a value of
–1, the entire window is selected. The active cell in the data window is moved to the location specified by Start
Row, Start Column. The selection addresses for both row and column positions begin at zero and are counted
from the upper-left corner of the data window (position 0,0). The default action is not to return titles.
Example: Replace rows 0–10, columns 1–2 with the data on the Clipboard (with titles).
#PASTE
title = true 0 10 1 2
#END
#PICT - This command exports the active plot window as a PICT image via the Clipboard. The syntax for
this command follows:
#PICT
#PICT/OPT - This command exports the active plot window to a file or the Clipboard, using the specified
parameters. The post_pict parameter is only available for PICT files on a Macintosh. The syntax for this
command follows:
#PICT/OPT
type = pict/bmp/gif/jpeg/png/tiff
scale = # (ranging from 1 to 1000)
post_pict = BOOLEAN (Only use in the Macintosh version when type=pict.)
min_whitespace = BOOLEAN
file = STRING
#END
Example: Export the active plot as a PostScript PICT at 75%. The path uses a Macintosh format.
#PICT/OPT
type = pict
scale = 75
post_pict = TRUE
file = "Macintosh HD:PICT Folder:Test file"
#END
#PLOT_PRINT - This command prints the active plot window. The syntax for this command follows:
#PLOT_PRINT
#SAVE - This command saves the specified plot or data window. Only plot and data windows should be taken
into account when determining the position number of the window. The syntax for this command follows:
#SAVE
window = # (the position of the window from front to back, where the frontmost window is position 1)
wintype = plot/data (optional)
file = STRING
#END
Example: Save the second plot window from the front. The path uses a Windows format.
#SAVE
window = 2
wintype = plot
file = "C:\KGraph\Test Plot.qpc"
#END
#SCRIPT - This command can be used to either load a specific script file or create a script from scratch. The
y2 options in the script are only used for Double Y and Double XY plots. The x2 options in the script are only
used for Double X and Double XY plots. The only way to use a template plot, apply curve fits, or apply error
bars is to open a saved plot script file. The syntax for this command follows:
#SCRIPT
file = STRING (Load the script file. This file should be in the same folder as the last script file that was
opened or specified by a fully qualified path. The Open dialog is displayed if the path or file name is
incorrect, or if "*.*" is used for the string.)
x/y/x2/y2 axis title STRING (These commands are valid for the x, y, x2, and y2 axes.)
x/y/x2/y2 axis limits # # (Limits for dates or times can be entered as a STRING.)
x/y/x2/y2 axis auto
x/y/x2/y2 axis linear/log
auto_print = boolean
print_mode = single/layout
auto_save = boolean
save_mode = with_data/without_data/pict/bitmap/metafile/bmp/gif/jpeg/png/tiff
prefix = STRING (The character limit is 8 (Windows) or 26 (Macintosh))
plot_type =line/scatter/double_y/double_x/double_xy/hilo/step/probability/xy_probability/histogram/
box/percentile/bar/stack_bar/column/ stack_column/polar/pie
begin_group (select variables, plot title, and legend text for the group)
title = STRING (one title per group)
legend = STRING
legend = STRING
x = # (select X column number)
y = # (select Y column number)
y2 = # (if using a Double Y or Double XY plot, select Y2 column number)
x2 = # (if using a Double X or Double XY plot, select X2 column number)
window = # (Specify a data window for plotting. The default is the frontmost data window (window 1).
The last window specified is remembered until a new script is encountered or a new window number
is specified.)
end_group
(Add as many groups as you need to the script. Each group creates a new plot.)
#END
Example: Display the Open dialog to load and execute a plot script.
#SCRIPT
file = "*.*"
#END
Example: Create and save a Scatter plot from two data windows.
#SCRIPT
auto_save = TRUE
save_mode = with_data
prefix = "1/31_Group"
plot_type = scatter
begin_group
title = "Lot 10938"
x=0
y=1
y=2
window = 2
x=0
y=1
y=2
end_group
#END
Example: Create a Line plot from two sets of X-Y data in the same data window.
#SCRIPT
plot_type = line
begin_group
x=0
y=1
x=2
y=3
end_group
#END
#SELECTION - This command sets the selection in the active data window. The syntax for this command
follows:
#SELECTION
Start_Row End_Row Start_Column End_Column
#END
The numbers should be separated by any white space characters. As a special case, if Start Row has a value of
–1, the entire window is selected. The active cell in the data window is moved to the location specified by Start
Row, Start Column. The selection addresses for both row and column positions begin at zero and are counted
from the upper-left corner of the data window (position 0,0).
Example: In the active data window, select rows 5–15, in columns 1–3.
#SELECTION
5 15 1 3
#END
#SET_DIRECTORY - This command sets the default directory. The syntax for this command follows:
#SET_DIRECTORY
directory = STRING (STRING is a fully or partially qualified path to the desired directory. Note: The
path should end in a backslash (Windows) or colon (Macintosh) if the last item is not a file.)
#END
Example: Change the current directory to the Sample Data folder on a Macintosh.
#SET_DIRECTORY
directory = "Macintosh HD:KaleidaGraph:Data:"
#END
Note: The Scripts folder (Examples folder) contains these three example formula scripts. The paths in the
scripts have been modified to be correct for your particular platform.
Basic Example
This example script performs the following functions:
• Selects a portion of the data window.
• Executes four Formula Entry functions, two of which generate columns of data.
• Copies the data and the titles to the Clipboard.
• Pastes the information into another part of the data window.
The example script is listed below, followed by a description of how it operates.
#SELECTION
0 99 0 1
#END
#FORMULA
c0 = index() + 1;
c1 = log(c0);
name("Series", c0);
name("log(x)", c1);
#END
#COPY
title = true –1
#END
#PASTE
title = true 10 110 2 2
#END
The #SELECTION command selects rows 0 through 99 in the first two data columns. The #FORMULA
command executes formulas which operate only on the selected data cells. The formulas create a data series
from 1 to 100 in the first column, calculate the log of each value in the second column, and name the two
columns.
The #COPY command copies the entire data window, including titles, because the starting row is set to –1.
Finally, the #PASTE command pastes the information on the Clipboard into the data window, starting at row
10 in the third data column.
Intermediate Example
This example script performs the following functions:
• Imports a tab-delimited text file.
• Executes two Formula Entry functions.
• Creates a Scatter plot of the raw data.
• Exports the plot to the printer.
The example script is listed below, followed by a description of how it operates.
#DATAFILE
file = "C:\kgraph\Data\example.txt"
delimiter = tab
skip = 0
read_titles = TRUE
del_number = 1
#END
#FORMULA
c3 = (c1 + c2) /2;
name("Average", c3);
#END
#SCRIPT
auto_print = true
print_mode = single
plot_type = scatter
begin_group
title = "Sample Script Plot"
legend = "Mean of Test Data"
x=0
y=3
end_group
#END
The #DATAFILE opens the specified text file. The path to the file uses a Windows format. The text file is
imported as a tab-delimited file which has a single tab between data values, skipping zero lines, and reading
the first line as titles. The #FORMULA command executes two Formula Entry commands which calculate the
average of two columns and place a title in the output column.
The #SCRIPT command generates a Scatter plot from the calculated data. The plot title and legend
information are set directly via the title and legend options within the script. After the plot is created, it is
automatically exported to the printer.
Advanced Example
This example script performs the following functions:
• Sets the program directory as the default directory.
• Opens a data file.
• Makes a selection in the data window.
• Plots the selected data as a Stack Column plot.
• Exports the plot as a TIFF file, scaling the image by 50%.
The example script is listed below, followed by a description of how it operates.
#SET_DIRECTORY
directory = ""
#END
#DATAFILE
file = ":Examples:Data:Housing Starts.QDA"
#END
#SELECTION
0503
#END
#SCRIPT
y axis title "Range"
y axis limits 0 450
plot_type = stack_column
begin_group
x=0
y=1
y=2
y=3
end_group
#END
#PICT/OPT
type = tiff
scale = 50
file = "Example.tif"
#END
The #SET_DIRECTORY command sets the program directory to be the default path. The #DATAFILE
command opens the Housing Starts data file. The path to this file uses a Macintosh format and begins in the
same directory as the program. Since the path to this file does not start at the root directory, the path begins
with a colon (:).
The #SELECTION command selects the first six rows in the data set. The #SCRIPT command creates a Stack
Column plot of the selected data. The title and limits for the Y axis are defined within this command. The plot
is then exported as a TIFF file with 50% reduction using the #PICT/OPT command. The TIFF file is given the
specified name and is saved in the same directory as the program.
Chapter 6
KaleidaGraph provides 19 different plot types for representing your data. All of the available plots are listed
in the Gallery menu. This chapter covers:
• The different types of plots that are available in KaleidaGraph.
• Creating a plot.
• Plotting multiple X-Y pairs on a single graph.
• Plotting a function.
• Generating similar plots.
Line plots give you a great deal of flexibility in how the data is displayed. You can specify the number of
markers, line style, and line thickness for each variable. You can also hide the line and display only the
markers. All of these characteristics are controlled in the Plot Style dialog.
Damped Sine 50 0.15
1
0.8 40
0.6
0.10
0.4 30
0.2
0 20
0.05
-0.2
10
-0.4
-0.6
0 0.00
0.04 0.03 0.02 0.01 0 10 15 20 25 30 35 40
Scatter plots display a marker for each point in the plot. It is not possible to display a partial set of markers or
a line between the points. If you want this kind of flexibility, plot the data as a Line plot.
Dose Response 10 Sample 2896-1
100 8
90
80
70 6
1
60
Mean
50 4
40 0.1
2
30
-6 0.01 0
10 10-5 10-4 10-3 10-2 10-1 100 -2 -1 0 1 2 0 2 4 6 8 10 12 14
The Double Y plot gives you the same amount of control over the display of the data as the Line plot, but with
the added capability of having separate scales on the vertical axes. This plot is useful when you are plotting
two dependent (Y) groups which share a common independent (X) variable.
The Double X plot gives you the same amount of control over the display of the data as the Line plot, but with
the added capability of having separate scales on the horizontal axes. This plot is useful when you are plotting
two groups of data that need to have separate independent (X) axes and share the same dependent (Y) axis.
The Double XY plot gives you the same amount of control over the display of the data as the Line plot, but
with the added capability of having two separate scales on the horizontal and vertical axes. This plot is useful
when you are plotting two groups of data that need to have separate independent (X) and dependent (Y) axes
The order of the columns in the data window does not matter. However, this plot appears differently depending
on how many Y variables are plotted for a given X.
• One Y variable (Line plot) - A standard Line plot is generated. This is often useful when overlaying
a High/Low plot with some additional X-Y data.
• Two Y variables (Spike plot) - A vertical line is drawn between the two data points. The first plotted
variable controls the color, line style, width, and marker style.
• Three or more Y variables (High/Low/Close plot) - A vertical line is drawn between the maximum
and minimum data points. The first plotted variable controls the color, line style, width, and marker
style. All of the data points between the minimum and maximum are drawn as ticks to the right of
the vertical line. The size of the tick is controlled by the marker size of the first plotted variable.
0.6 214
0
213
0.4
212
0.2
211 -5
0
210
Jun 10
Jun 11
Jun 12
Jun 15
Jun 16
Jun 8
Jun 9
-0.2 -10
0 4 8 12 16 20 0 100 200 300 400
Note: It is not possible to display markers on a Step plot. The placement of the steps is controlled using the
Step Options command (Format menu).
8 150
6 125
a
4 100 b
2 75
c
0 50
0 5 10 15 J F MA M J J A S ON D
The Probability plot gives rough information about the local density of the data and symmetry. The plotted
data points do not coincide, even if there are exact duplicates in the data. It is easy to read information from
the plot and it can accommodate a large number of observations. The Probability plot is not a summary but a
display of all the data.
Note: The Probability Options command (Format menu) controls whether a linear or normal distribution
is used.
95
90
15 80
28
Age
70
50
10 30
24 20
10
5 5
1
20
0 20 40 60 80 100 0 .1
Probability of Response 0 20 40 60 80 100
.01
6 8 10 12 14 16 18
You can use the Histogram Options command (Format menu) to specify the bin size, reference value, and
number of extra bins that get added to the plot. A maximum of 200 bins may be plotted.
10 20
300
8
15
6
200
10
4
100 5
2
0
0 0
0.92
0.94
0.96
0.98
1.00
1.02
1.04
1.06
Up to 20 additional variables may (optionally) be overlaid as markers on each plot. The markers are matched
one to one with the plotted variables. The first value in a marker column is matched with the first box, the
second value in a marker column is matched with the second box, and so on. When using markers, the boxes
do not have a fill pattern so that the markers can be clearly identified.
Note: You may not select more than a total of 20 variables and markers from a single data window. If your
needs exceed this limit, place the variables and markers in separate data windows.
8
13.4 A
6
13.2 B
4
13.0 2
C
The bottom and top of each box represent 5% and 95% of the data. Three lines are drawn inside each box. The
middle line represents the median value of the data (50%), while the lower and upper dashed lines represent
25% and 75% of the data, respectively. Due to the importance of these lines, the boxes do not have fill patterns
Up to 20 additional variables may (optionally) be overlaid as markers on each plot. The markers are matched
one to one with the plotted variables. The first value in a marker column is matched with the first box, the
second value in a marker column is matched with the second box, and so on.
Note: It is not possible to display a fill pattern in the boxes. You may not select more than a total of 20
variables and markers from a single data window. If your needs exceed this limit, place the variables
and markers in separate data windows.
8 10
A
8
6
6
4 B
4
2
C 2
0
Test #1 Test #2 Test #3 0
40 60 8 0 100 120 140 160 A B C D
Note: A maximum of one independent (X) variable, with up to 32000 categories, and 20 dependent (Y)
variables may be plotted at once. Customizing Horizontal Bar plots is covered in Section 7.15.
100 Dec
90 1995 Nov
Oct
80
Sep
70
Aug
60 Jul
1996
50 Jun
40 May
Apr
30
Mar
20 1997
Feb
10 Jan
0 5 10 15 20 0 50 100 150 200 250 0 5 10 15 20 25 30 35
Note: A maximum of one independent (X) variable, with up to 32000 categories, and 20 dependent (Y)
variables may be plotted at once. Customizing Stack Bar plots is covered in Section 7.15.
New Sales
Apr A
1997
B
Mar
1996
C
Feb
1995
D
Jan 1994
E
Note: A maximum of one independent (X) variable, with up to 32000 categories, and 20 dependent (Y)
variables may be plotted at once. Customizing Column plots is covered in Section 7.15.
12 20
30
10
8
15
20
6
10
4
10
2 5
0
0
Misc
815B
160A
223D
412U
105C
0
-1.5
-0.5
0.5
1.5
-2
-1
Note: A maximum of one independent (X) variable, with up to 32000 categories, and 20 dependent (Y)
variables may be plotted at once. Customizing Stack Column plots is covered in Section 7.15.
800 14 12
734.10 709.50
700 12
10
600 10
8
500 451.00 8
400 6 6
300 4 4
200 2
2
100 0
Misc
815B
160A
223D
412U
105C
0 0
1996 1997 1998 Jan Feb Mar Apr
Using the Polar Options command (Format menu), you can specify the grid type, data format, reference
angle, and direction for Polar plots. Customizing Polar plots is covered in Section 7.16.
3 0°
10 cm 330° 30°
3 10
8 cm 1
3
6 cm 0.1 60°
3 0.01
4 cm 0.001
3
2 cm 0.0001
3 0.00001 90°
0 cm
240° 120°
210° 150°
180°
Note: If more than 20 categories are selected for plotting, only the first 20 appear on the plot. Customizing
Pie charts is covered in Section 7.17. Negative values cannot be plotted in a Pie chart. If the data
contains negative values, a dialog gives you the option of plotting the absolute value of the data or
canceling the plot.
Housing Starts
Jan
22.8% 19.3%
Feb
Mar
11%
Apr
May 13.8%
June
26.2% 6.9%
6.98%
Once the plot is created, it behaves like a Line plot. You have full control over the line style, markers, and all
other components of the plot. Section 6.3 provides instructions for creating a Function plot.
Y = gaussfit(.5,5,1,10) 0.6 100
6
5 0.4 80
4 0.2 60
3
0 40
2
1 -0.2 20
0 -0.4 0
-50 -25 0 25 50 0 2 4 6 8 10 0 20 40 60 80 100
Note: Certain tools in this window are unavailable, because they can only be used when data is plotted.
To create a plot:
1. Open the data to be plotted.
2. Make any selections in the data windows to plot a subset of the data.
3. Choose a plot type from the Gallery menu. A dialog similar to Figure 6-17 is displayed.
At this point, the plot is linked to the original data window. If another plot is opened, created, or brought to
the front, the data for the previous plot becomes embedded in the plot. If the plot is saved, a copy of the data
is embedded in the plot and saved as part of the plot file. Once data is embedded in a plot, it can be extracted
by choosing Plot > Extract Data or clicking the Find Data button ( ) in the plot window.
The Variable Selection dialog contains a pop-up menu listing the names of all open data windows. Using this
menu, you can select up to 20 independent and 20 dependent variables to be plotted. If a text column is used
as the independent variable, you may not select any other independent variables and you can only plot from
that particular data window.
The dialog in the background of Figure 6-18 displays the variables selected from the first data set
and the pop-up menu used to switch between data windows.
6.2.2 Plotting Multiple X-Y Pairs from the Same Data Window
The Linear, X-Y Probability, and Polar plots allow you to plot multiple independent variables from the same
data window. If the independent variable is a text column, you may only have one independent variable.
For the plot types mentioned above, the Variable Selection dialog contains a pop-up menu listing the
independent variables (X–X9). Using this pop-up menu, you can plot up to nine independent and 20 dependent
variables from one data window.
When defining your function, use x for the independent variable. The operators and math functions found in
Formula Entry can be used in defining your function. Constants and other shorthand references can be defined
in the library. You can also use any of the definitions included in the Curve Fits folder. The table below lists
some example definitions:
5 * x^2
gaussfit(1, 5, 1, 10)
m1 + m2 * exp(–m3 * x); m1 = 5; m2 = 1; m3 = 0.5
a * exp(–b * x) * cos(c * x + d); a = 4; b = 0.7; c = 2.2; d = 15
Once the Function plot is created, it behaves like a Line plot. You have full control over the line style,
markers, and all other components of the plot. If you want to see the data generated by the function, choose
Plot > Extract Data or click the Find Data button ( ) in the plot window.
Each of the plots in the Gallery menu can have its own layout. The layout remembers the default style for the
legend, the position of the axis titles, plot title, axes, and legend, and the size of the axes, frame, and legend.
Defining the layout of a plot only saves the position of the titles and legend. To change the defaults for text
labels, you must use the Text Options command (Format menu).
You need to save the Style file when quitting for these changes to be remembered the next time you start
KaleidaGraph. To create individual Style files for different projects, choose File > Export > Style. This way
you can save any number of different Style files which can be opened at a later time using the Open command
The new data is autoscaled unless the limits are fixed in the Axis Options dialog. The legend reflects the new
variables being plotted, but all other text labels and objects remain the same. Any curve fits or error bars in
the original plot are applied and recalculated on the new plot.
Once a Template plot has been created, it can be modified like any other plot. If you need the ability to generate
multiple plots at once, use the Plot Script feature. This topic is covered in Section 6.4.3.
Note: It is not necessary to use the Template plot if you are only modifying the original data used to create
the plot. Instead, you can extract the data from the plot, modify it, and update the plot. This process is
covered in Section 7.13.
The advantage of a script over a Template plot is that a script can generate multiple plots. Also, you can control
legend descriptions and plot titles using a script. In a Template plot, the legend descriptions come from the
column names of the plotted variables and the plot title remains unchanged.
Choosing Windows > Plot Script displays the dialog in Figure 6-23. This dialog is used to make your
selections for the current script. The script selections include: plot type, variable selections, plot titles, legend
text, auto print, and auto save options.
Each line in the editor corresponds to a different plot. Plot titles are entered on separate lines, followed by a
return. If you choose to set the titles, you must set them for all of the plots. If a specific plot is not to have a
title, create a blank line in the editor by pressing Enter (Windows) or Return (Macintosh). Each title appears
to the right of the corresponding data group in the Plot Script window.
3. Choose File > Exit. The titles are listed to the right of the groups, as shown in Figure 6-27.
The legend information for each plot is also placed on separate lines, followed by a return. To indicate that the
labels belong to the same plot, each legend label should be separated with either a comma or a tab. For Double
Y or Double XY plots, enter the labels for the Y1 legend followed by the Y2 labels (on the same line). All
labels prior to a return belong to the same plot. Only use the Enter (Windows) or Return (Macintosh) key to
separate legend titles associated with different plots.
Note: The pattern recognition feature only works across the columns of a data window or across the columns
of a set of data windows. KaleidaGraph cannot identify a plotting pattern that jumps from one data
window to another.
The sets are listed in the pop-up menu in the order they were created. Selecting one of the sets displays a
submenu containing a list of the open data windows. They are listed in the order they are stacked on the screen,
from front to back. The data window currently associated with a particular set is preceded by a check mark.
Figure 6-29 shows the Plot Script window with the Data Windows pop-up menu and the X Set submenu.
Note: The only other way to change the data window referenced by a set is to use the Change button after
selecting each individual group. This method must be used to select different columns for plotting.
4. Click Run to execute the script. KaleidaGraph displays a dialog allowing you to specify a location
for the saved plots.
Memory Considerations
If KaleidaGraph runs out of memory or you exceed the maximum number of open plot windows while
executing a script, the situation is handled based on the current state of the Automatically dispose of old plots
option in the Preferences dialog (File menu).
When this check box is selected, the oldest plot is discarded from memory, without asking for your approval.
If this check box is cleared, a dialog asks whether to save or dispose the oldest plot. If you choose not to
dispose of a plot to make memory available, the request that caused the out of memory condition is canceled
If you used an existing plot for the Graphic Template, a plot file is created with the plot script document. In
the Windows version, the plot has the same name as the script, but with a .qpc file name extension. In the
Macintosh version, the plot’s file name is the first 25 characters of the script’s file name, followed by .plot.
Any future use of the script causes the plot file to open. Once a script and its template have been saved, the
plot must remain in the same folder as the script and it cannot be renamed. Otherwise, the script no longer
recognizes the plot document.
A default Script file is automatically opened each time KaleidaGraph is started. This way you can save your
plot script and have it opened the next time you use the program.
Custom Script files can be opened at any time from within KaleidaGraph by choosing File > Import > Script
or File > Open. The Plot Script window changes to reflect the contents of the new Script file.
The advantage of using a formula script is that you can open and modify data windows as part of the script.
You can also execute more than one plot script inside of a formula script.
The disadvantage of using this feature is that you cannot select a specific plot to be used as the template. It
must either be a Gallery plot type or a plot that is opened as part of a saved plot script.
Chapter 7
KaleidaGraph provides complete control over the appearance of your plots. This includes the legend, axes,
ticks, grid lines, and labels, in addition to how the data is represented on the plot.
Note: If you do not want to save the plot, this dialog can be avoided by pressing Shift while either clicking
the close box or choosing File > Close/NoSave.
You can have a maximum of 32 plots open at one time in KaleidaGraph. If you have 32 plots open and try to
create another plot, either the oldest plot is automatically disposed or the dialog in Figure 7-1 appears. The
Preferences dialog (File menu) contains an option that controls the automatic disposal of plots. If
Automatically dispose of old plots is selected, the oldest plot is discarded. If this check box is cleared, the
dialog is displayed.
Figure 7-2 Foreground Color palette Figure 7-3 Background Color palette
3. Select a different color from the palette.
You can change the fill or pen pattern by selecting a different pattern from the pop-up menu that appears when
you click the appropriate portion of the Pattern icon. Black portions of the pattern represent the foreground
color and white portions represent the background color.
Figure 7-6 Line style pop-up menu Figure 7-7 Line width pop-up menu
3. Select a different line style or width from the pop-up menu. To completely remove the frame around
the legend, choose None from the Line Style pop-up menu.
This information is saved as part of the Style file. You must save the Style file for the layout to be remembered
the next time you start KaleidaGraph.
The labels in the legend can be moved to different locations using the Text tool. This is accomplished by
dragging a label to a new position with the Text tool. To delete an item in the legend, use the Eraser.
You can specify your own limits in the Axis Options dialog. The Min and Max fields determine the lowest
and highest values on the selected axis. The Anchor Tick field indicates the value from which all major tick
marks on a linear axis are calculated. The Anchor Tick field has no affect on axes with logarithmic scales.
To hide an axis:
1. With the plot window active, choose Plot > Axis Options.
2. Choose the appropriate axis from the pop-up menu in the upper-left corner of the dialog.
3. Click the No Axis check box.
4. Click OK to return to the plot.
Note: Using this option does not change the independent and dependent variables. It only changes their
position in the plot. This option has no affect on Double Y, Double X, Double XY, Bar, Polar, and Pie
plots.
Note: The Link To pop-up menu is not displayed for certain axes in Double Y, Double X, and Double XY
plots because they are independent of the main axis.
Note: Depending on the value entered, you may not notice the change on the screen; however, there
will be a difference when the plot is printed.
3. Click OK to return to the plot.
4. Choose In, Out, Both, or None from the pop-up menus below Major and Minor to specify how the
major and minor ticks should be displayed.
5. Click OK to return to the plot.
Figure 7-12 shows how the tick marks appear when you select (in order): In, Out, Both, and None for the X
and Y axes.
The number of minor tick marks is controlled in the same manner as major ticks. You can either specify a fixed
number or let KaleidaGraph calculate the number of minor ticks.
6. Choose Interval from the pop-up menu to the right of Major and enter the desired interval in the
field below it. For dates, enter the desired number of days for the interval. For time data, use a
D:H:M:S.S format for entering the interval.
7. Click OK to return to the plot.
Note: Depending on the value entered, you may not notice the change on the screen; however, there
will be a difference when the plot is printed.
4. Click OK to return to the plot.
1. With the plot window active, choose Plot > Axis Options.
2. Choose the appropriate axis from the pop-up menu in the upper-left corner of the dialog.
3. Click Grids. The Axis Options dialog changes to display the options available for controlling major
and minor grids.
4. Choose Solid, Gray, or None from the pop-up menus to the right of Major and Minor to specify
how the major and minor grids should be displayed.
5. Click OK to return to the plot.
Note: Depending on the value entered, you may not notice the change on the screen; however, there
will be a difference when the plot is printed.
3. Click OK to return to the plot.
Note: For information on changing the text attributes of the labels, see Section 8.7.2.
Note: This dialog does not have any affect if the data has a Text format in the data window.
Note: The Tab and Down Arrow keys can be used to move to the next variable. You can go to the
previous variable using Shift+Tab or the Up Arrow key. The Left Arrow key takes you to
the first variable; the Right Arrow key takes you to the last variable.
Note: Variable and curve fit lines are controlled independently of each other. Changing the variable color
also changes the marker color. The associated legend text is also changed if Link Text To Variable
Color is selected in the Text Options dialog (Format menu).
To change the line style, width, or color of variable or curve fit lines:
1. With the plot window active, choose Plot > Plot Style.
2. Select the variable to be edited. See Section 7.9.1 if you are unsure of how to do this.
3. If changes are being made to the variable line, proceed to the next step. Otherwise, click Curve Fit
to make changes to the curve fit line.
4. To change the line style, select a different option from the Style column. Choose None from this
list to hide the line. The current style is preceded by a check mark.
5. To change the line width, select a different option from the Width column. The current width is
preceded by a check mark.
6. To change the color, select a different color from the palette. The current color has a white square
around it.
7. Click OK to return to the plot.
If the values in the Frame Size field are larger than the Paper dimensions, a dotted line is displayed to
represent the printable area of the paper. You can hide these lines by clearing the Show the plot paper
boundary check box in the Preferences dialog (File menu).
Note: To resize the plot proportionally about its center, press Alt (Windows) or Option
(Macintosh) when dragging an object handle. By pressing Shift as you drag, you can
constrain the plot to a square.
3. Release the mouse button when the axes are the desired size.
Note: The Extract Data command is unavailable if the plot does not have archived data associated with it,
the plot was just created, or the data has already been extracted.
2. Choose Plot > Extract Data or click the Find Data button ( ) in the upper-right corner of the plot
window. The data used to create the plot is displayed. Figure 7-19 shows an example of an extracted
data set.
The title of the extracted data window begins with the same name as the original data file. Additionally, a date
and time stamp is appended to the name, identifying when the data was archived in the plot.
Note: If you attempt to close an extracted data window, the message in Figure 7-20 appears. If you click OK,
the plot loses its link with the original data.
The difference between the two commands is that Auto Link revises the plot after each individual change in
the data while Update Plot only causes an update when you choose the command. Clicking the Update Plot
button ( ) in the data window performs the same function as choosing the Update Plot command.
These commands are useful if you have a saved plot and need to add or edit points. You can extract the data
from the plot (using either the Extract Data command or the Find Data button), modify the data, and use the
Auto Link or Update Plot commands to revise the plot.
2. Choose Plot > Extract Data or click the Find Data button ( ) to display the data used to create the
plot.
3. Turn on Auto Link in the Plot menu.
4. Modify the data and move to another cell. After each data value is modified, the plot is redrawn to
show the changes.
2. Choose Plot > Extract Data or click the Find Data button ( ) to display the data used to create the
plot.
3. Make any changes to the extracted data.
4. Choose Plot > Update Plot or click the Update Plot button ( ) in the data window to redraw the
plot.
Note: If you just want to add a few points to an existing curve, refer to Section 7.13. The steps below are for
adding a new variable to the plot.
2. Choose Plot > Extract Data or click the Find Data button ( ) to display the data used to create the
plot.
3. Open the new data or add it to an existing data window.
4. Switch back to the plot and choose Gallery > Template.
5. Select all of the data to be plotted (including the data from the original plot) and click New Plot.
A new plot will be created that includes the additional data. Any curve fits and error bars from the original plot
will be applied to the new plot.
Note: Any time the plot is redrawn, the value labels are placed back at their original position. If you are
displaying only a few of the labels, use the Text tool to add them to the plot. You can place them
exactly where you want and you do not have to worry about the label moving when the plot is redrawn
78.5
Jan 57.7
79.8
74.8
Feb 60.2
82.8
116
March 89.2
124
120 120
80 80
40 40
0 0
Jan March May July Jan March May July
Figure 7-23 Sample Column plot Figure 7-24 Plot displaying variable as a line
7.16.1 Changing the Display of Tick Marks, Grid Lines, and Axis Labels
The angular (Ø or X) and the radial (R or Y) axes can be modified using the Axis Options command. Choosing
Plot > Axis Options displays the dialog in Figure 7-25. The options for each of the axes are discussed in the
following paragraphs.
The angular axis is controlled by the X axis settings in the Axis Options dialog. You can use the options for
Ticks, Grids, and Labels to modify this axis. You can also use the No Axis option to remove the angular axis
The radial axis is controlled by the Y axis settings in the Axis Options dialog. You can use the options for
Limits, Ticks, Grids, and Labels to modify the axis. You can also choose between Linear and Log scaling,
or remove the axis with the No Axis option.
Figure 7-27 shows a Polar plot displayed in a Clockwise direction, with a circular grid and a 45o Reference
Angle. Figure 7-28 shows a Polar plot displayed on a square grid.
Radius Radius
3
300 330
10 m
3 0
8m 8 m3
6 m3
4 m3 4m
3
3 30
2m
3
0m 0 m3
210 60 3
4m
180 90 8 m3
150 120 8 m3 4 m3 0 m3 4 m3 8 m3
Figure 7-27 Polar plot on circular grid Figure 7-28 Polar plot on square grid
When the entire Pie is selected, the toolbox displays the icons shown to the right. Click the last
icon to display the pop-up menu shown below. Turn on No Frame in the menu to remove the
frame.
Figure 7-30 shows a Pie chart that contains value labels. These labels can be moved individually with the Text
tool or as a group with the Selection Arrow. The Value Label Format command (Format menu) can be used
to change the numeric format of the labels.
Note: Any time the plot is redrawn, the value labels are placed back at their original position. If you are
displaying only a few of the labels, use the Text tool to add them to the plot. You can place them
exactly where you want and do not have to worry about the label moving when the plot is redrawn.
You can place the toolbox anywhere on the desktop or you can hide it by clicking its
close box. Once the toolbox is hidden, pressing a key on the keyboard makes the
toolbox visible.
Text Tool
This tool is used to add and modify plot labels. Clicking this tool and holding down the mouse button displays
a pop-up menu that can be used to edit selected text labels. Using the Text tool is covered in Section 8.7.
Line/Arrow Tool
This tool is used to draw lines or arrows. Clicking this tool and holding down the mouse button displays a
pop-up menu that contains the lines and arrows that can be drawn. Creating lines and arrows is discussed in
Section 8.8.1.
Object Tool
Clicking the object tool (to the right of the Line/Arrow tool) displays the pop-up menu shown below. This
menu contains six drawing tools that can be used to create various shapes. Creating and editing shapes is
covered in Section 8.8.
Box Tool
This tool is used to draw square and rectangular boxes. Creating boxes is discussed in Section 8.8.2.
Oval Tool
This tool is used to draw ovals and circles. Creating ovals and circles is discussed in Section 8.8.2.
Polygon Tool
This tool is used to draw polygons (multi-sided objects). Creating polygons is discussed in Section 8.8.3.
Arc Tool
This tool is used to create arcs. Creating arcs is discussed in Section 8.8.2.
Table Tool
This tool is used to create tables of data. The use of this tool is covered in Section 8.2.
Eraser Tool
The Eraser is used to delete labels and objects from the plot or layout window. Grouped items, such as the
legend and axis labels, can also be removed using this tool. The Eraser cannot remove any markers or lines
that represent plotted data.
Identify Tool
This tool is used to display the coordinates of points on a plot. The use of this tool is discussed in Section 8.3
Align Tool
This tool is used to align a group of selected objects. Aligning objects is covered in Section 8.6.9.
Color Icon
Pattern Icon
Style Icon
Color Icon
No Color Icon
Color Icon
Style Icon
To create a table:
1. Select the Table tool from the toolbox.
2. Click anywhere in the plot or layout window to display the Edit Table dialog.
3. Customize the appearance of the table by adding rows, adding columns, or applying style changes,
using the commands covered in Section 8.2.2. Then, type data into the cells.
4. Click OK to return to the plot or layout window. Figure 8-3 shows a sample table created with the
Table tool.
• Copy Table - This command copies the table to the Clipboard as an image, for inclusion in another
program.
• Copy Style - This command copies the style of the current selection. This allows you to quickly
apply a particular style to sections of the table. If necessary, this command adds cells to the table
when the style is pasted.
• Select All - This command selects the entire contents of the table.
• Insert Rows - This command inserts a row above the current selection.
• Insert Columns - This command inserts a column to the left of the current selection.
• Delete Rows - This command deletes any selected rows. The entire row is deleted using this
command.
• Delete Columns - This command deletes any selected columns. The entire column is deleted using
this command.
Format Menu
• Left, Right, or Center Justification - These commands control the alignment of the cell’s contents
• Cell Horizontal Line - This command sets the line width and color of the line on the bottom of any
selected cells.
• Cell Vertical Line - This command sets the line width and color of the line on the right side of any
selected cells.
Note: If None is selected for the line width, a vertical line is not displayed between adjacent cells.
The cells are treated as a single unit. Type the string in the leftmost cell and choose the
justification. The contents appear across all cells in the unit. This technique is used to
generate labels that span multiple cells.
• Cell Background - This command sets a background pattern and color within selected cells. If you
want a solid color, choose 100% Fill.
• Frame Style - This command sets the style of the table’s frame.
• Frame Color - This command sets the color of the table’s frame.
Size Menu
This menu contains the sizes that are available for displaying fonts. You can specify a size that is not listed
using the Other command in this menu. The font size is applied to the entire cell, even if only a portion of the
cell is selected.
Style Menu
The Style menu is divided into three sections. The commands in the first section control the style of the entire
cell, even if only a portion of the cell is selected. The color of the text is controlled using the command in the
second section. The commands in the third section allow you to display selected characters in an alternate font,
as subscripts, or as superscripts. The Normal, Superscript, Subscript, and Alt. Font commands are the only
commands in the Edit Table dialog that have an affect on selected portions of a cell.
This tool is particularly useful for eliminating outliers from a plot during a regression analysis. After the Data
Selection tool is used, all curve fits are automatically recalculated based on the remaining data. This allows
arbitrary data points to be removed from a plot in a very selective, graphical manner.
3. Move the mouse to the point where you want the first segment of the polygon to end.
Note: Pressing Alt (Windows) or Option (Macintosh) when creating the polygon removes the
points that lie within it. This feature enables you to select the points you want to remove
instead of the points you want to keep.
4. Move the mouse and click again to create the second segment.
5. Continue moving and clicking the mouse until the desired data is enclosed in a polygon. You can
complete the polygon by clicking the hollow square, double-clicking the mouse, pressing Enter
(Windows) or Return (Macintosh), or clicking when the crosshair is positioned over the toolbox.
Figure 8-5 shows a sample plot that has a region of data selected.
The plot is then redrawn and only the points that lie within the polygon (or outside when using the Alt or
Option key) are replotted. The points that are removed become masked in the data window. Figure 8-6 shows
the plot after being redrawn to only include the points within the polygon.
5 Test #1
4
Range
0
0 2 4 6 8 10 12 14
Time
Figure 8-6 Resulting plot after using the Data Selection tool
Note: Any polygon bounding a selection region can have a maximum of 100 bounding points. To return to
the original plot and unmask the data, double-click the Data Selection tool.
7
Test #1
6
5
Range
2
2 3 4 5 6 7 8 9 10
Time
Figure 8-8 Resulting plot after using the Zoom Selection tool
Note: Double-click the Zoom Selection tool to return to the original plot.
When the plot is zoomed, you can adjust the position by pressing Alt (Windows) or Option (Macintosh) and
clicking on an area of the plot. For Double Y, Double X, and Double XY plots, you can adjust the X2 and Y2
axes by pressing Ctrl+Alt (Windows) or +Option (Macintosh) and clicking. The point you click is placed
in the center of the redrawn plot.
Figure 8-9 Clicking objects individually Figure 8-10 Dragging the Selection Arrow
To deselect objects:
• To deselect all selected objects, click a blank portion of the window.
• To deselect objects one at a time, press Shift while clicking the object. The object you click is
deselected. All other objects remain selected.
To move objects:
1. Select the object to be moved.
2. Position the pointer over the selected object and drag it to a new position. As you drag, an outline of
the object is displayed. If you drag to the edge of the window, the window scrolls.
3. Release the mouse button when the object is in the desired location. Figure 8-11 shows an example
of an object being moved.
Note: You can also move selected objects vertically or horizontally using the arrow keys. If the arrow keys
are used, the objects move one pixel in the specified direction (10 pixels if you press Shift at the same
time).
To resize an object:
1. Select the object to be resized.
2. Drag any one of the handles until the object reaches the desired size. Figure 8-12 shows an object
being resized.
Note: To resize the object proportionally about its center, press Alt (Windows) or Option (Macintosh) when
dragging the handle. By pressing Shift as you drag, you can constrain the shape to a square or circle.
Note: You can also duplicate an object by pressing Alt (Windows) or Option (Macintosh) and dragging the
object.
Note: If you copy anything associated with the original plot (legend, plot title, axis title, and so on),
the entire plot is copied to the Clipboard.
Note: You can also use the Eraser tool to delete individual objects.
To group objects:
1. Select the objects to be grouped. Object handles appear around each object that is selected, as shown
in Figure 8-14.
2. Choose Object > Group. Each object’s handles disappear and are replaced by a single set of object
handles around the grouped object, as shown in Figure 8-15.
Once you have grouped objects together, you can no longer select or modify the objects individually. The
UnGroup command can be used to separate a grouped object into its original components.
To ungroup an object:
1. Select the object to be ungrouped.
2. Choose Object > UnGroup. Object handles appear for each individual object.
To align objects:
1. Select the objects to be aligned. Figure 8-17 shows some sample objects that are selected, along with
a reference line.
2. Choose Object > Align or select the Align tool from the toolbox to display the alignment options.
3. Select one of the icons from the menu. The objects are aligned based on your selection. Figure 8-18
shows the objects after aligning them by their left edges.
Figure 8-17 Objects before being aligned Figure 8-18 Objects after being aligned
There are four commands in the Object menu that enable you to change the ordering of objects. These
commands are: Up, Bring To Front, Down, and Send To Back. These commands are useful when objects
overlap in a plot or layout.
Figure 8-19 shows five stacked objects with the middle object (the oval) selected. The four figures below it
show how the original objects appear after choosing each of the four commands.
It is also possible to move items in the legend to different locations using the Text tool. This is accomplished
by dragging a label to a new position with the Text tool.
Note: Be careful when editing value and axis labels in this manner. If the plot is redrawn, the labels
revert to their original state.
Note: The Edit String dialog does not display characters as subscripts or superscripts. Instead, KaleidaGraph
inserts either \d (subscript) or \u (superscript) before the characters and \n (normal) after the characters.
These extra characters are only displayed in the Edit String dialog. As soon as you return to the plot,
the subscripts or superscripts are displayed correctly.
The Text Options dialog (Format menu) contains four settings (Superscript Offset, Subscript Offset, Sub/
Super Size, and Only use built-in sizes) that affect the appearance of subscripts and superscripts. These
settings can be modified to control the offset and size of these characters.
Format Menu
• Left, Right, or Center Justification - The justification of text labels can be set to either Left, Right,
or Center. This setting determines the label placement in relation to where you clicked in the plot or
layout window with the Text tool.
• 0, 90, 180, and 270o Rotation - These commands set the orientation of the text label to one of four
positions, moving counter-clockwise from horizontal. You will not see any changes to the text until
you return to the plot or layout window.
• Erase Background - When this command is turned on, anything behind the text label is erased.
Font Menu
The Font menu contains all of the fonts that are currently installed. It is possible to use multiple fonts in the
same text label by choosing a different font for selected portions of the label.
Size Menu
This menu contains the sizes that are available for displaying fonts. You can specify a size that is not listed
using the Other command in this menu. Multiple font sizes can be used in the same text label by choosing a
different font size for selected portions of the label.
Style Menu
This menu lists the different styles that can be applied to the text. It also includes commands for displaying
characters as subscripts or superscripts.
Color Menu
This menu displays the current color choices available for the text label. Multiple colors can be used in the
same text label by choosing a different color for selected portions of the label.
To edit an arrowhead:
1. Double-click the arrow (or click once and choose Object > Edit Object) to display the dialog in
Figure 8-25.
Note: If you want to modify the default set of arrowheads, use the Edit Arrow Heads command (Object
menu).
8.8.3 Polygons
The Polygon tool is used to create polygons. Polygons consist of multiple line segments connected at the
segment end points. They can either be closed (the first and last segments connect) or open (the first and last
segments do not connect).
To create a polygon:
1. Select the Polygon tool from the toolbox.
2. Position the crosshair at the point where you want to begin drawing. Then, click the mouse button to
begin drawing. A small square marks the starting point.
3. Move the mouse to where you want the first segment of the polygon to end. By pressing Shift as you
click, you can constrain the segment to rotate in 45o increments.
4. Move the mouse and click again to create the second segment.
5. Continue moving and clicking the mouse until the desired number of segments are created. You can
close the polygon by clicking the hollow square. To leave the polygon open, double-click the mouse,
press Enter (Windows) or Return (Macintosh), or position the crosshair over the toolbox and click
Each segment in a Bezier curve is defined by four points: two anchor points and two direction points. The
anchor points determine where the segments begin and end. The direction points, along with the tangent lines
that connect them to the anchor points, determine the size and positioning of the curve segments.
Tangent Line
Anchor Point
Direction Point
Color Icon
Pattern Icon
Style Icon
The attributes that you select are saved as part of the Style file. This enables you to set your preferences and
have KaleidaGraph remember them the next time you start the program.
Note: To edit the colors that appear in the color palettes, use the Edit Colors command (Object menu).
Figure 8-33 Foreground Color palette Figure 8-34 Background Color palette
3. Select a different color from the palette.
Figure 8-37 Line style menu Figure 8-38 Line width menu
3. Select a different line style or thickness from the pop-up menu.
9.1.1 General
This is the most powerful curve fit in KaleidaGraph. It takes a user-defined equation and uses it to fit a set of
plotted data. Any function of x or m0, where either x or m0 is the independent variable, can be defined using
up to nine parameters (m1–m9).
Examples:
m1 * m0
m1 + m2 * m0
m1 * exp(–m2 * m0)
When a General curve fit is selected, a curve, defined by the equation in the Curve Fit Definition dialog, is
fitted to the data using the Levenberg-Marquardt algorithm. There are no data restrictions associated with this
curve fit.
Section 2.5.3 provides a guided tour of defining and applying a General curve fit. For more information on the
General curve fit, refer to Sections 9.4–9.5. These sections include details about equation structure, initial
guesses, and weighting data.
9.1.2 Linear
This function fits a straight line through your data, of the form y = m0 + m1 * x. There are no data restrictions
associated with this curve fit.
9.1.3 Polynomial
This function fits a curve through your data, of the form y = m0 + m1 * x + m2 * x2 + m3 * x3 +...+ m9 * x9.
The more complex the curvature of the data, the higher the polynomial order required to fit it. There are no
data restrictions associated with this curve fit.
9.1.4 Exponential
This function fits a curve through your data, of the form y = m0 * em1 * x. It is generally used to fit data that
increases or decreases at a high rate. This curve fit cannot fit negative data or data equal to zero.
Note: On a semi-log plot with a linear X axis, the curve appears as a straight line.
9.1.5 Logarithmic
This function fits a curve through your data, of the form y = m0 + m1 * log(x). A logarithmic curve fit is
generally used with data that spans decades (100, 101, 102, and so on). This curve fit cannot be used to fit
negative data or data equal to zero.
Note: On a semi-log plot with a linear Y axis, the curve appears as a straight line.
9.1.6 Power
This function fits a curve through your data, of the form y = m0 * xm1. This curve fit cannot be used to fit
negative data or data equal to zero.
9.1.7 Smooth
This function fits a smoothed curve to the data. KaleidaGraph starts by applying a Stineman function to the
data. The output of this function then has a geometric weight applied to the current point and ±10% of the data
range, to arrive at the smoothed curve.
The only data restriction associated with this curve fit is that the independent (X) variable must be in ascending
order in the data window. There is no single expression that represents this curve; therefore, there are no
parameters to view or copy.
9.1.8 Weighted
This function fits a curve to the data, using the locally weighted Least Squared error method. The result of this
curve fit is to plot a best fit smooth curve through the center of the data. This is an extremely robust fitting
technique. Unlike the standard Least Squared error method, this technique is nearly insensitive to outliers.
However, this does not come for free. The Weighted curve fit is computationally complex and can take a very
long time for a large data set.
The only data restriction associated with this curve fit is that the independent (X) variable must be in ascending
order in the data window. There is no single expression that represents this curve; therefore, there are no
parameters to view or copy.
The only data restriction associated with this curve fit is that the independent (X) variable must be in ascending
order in the data window. There is no single expression that represents this curve; therefore, there are no
parameters to view or copy.
9.1.10 Interpolate
This function fits a curve that passes through the data points and matches the slopes at those points. The
advantage of this curve fit is that it does not produce wild results near an abrupt change of slope, as can happen
with the Cubic Spline curve fit.
The only data restriction associated with this curve fit is that the independent (X) variable must be in ascending
order in the data window. There is no single expression that represents this curve; therefore, there are no
parameters to view or copy.
The major weakness of the Least Squared method is its sensitivity to outliers in the data. If a data point is
widely different from the majority of the data, it can skew the results of the regression. For this reason, the
data should always be examined for reasonableness before fitting. The Data Selection tool provides a simple
method of removing outliers from a plot. The use of this tool is covered in Section 8.4.
The Curve Fit menu contains several curve fits that use the Least Squares method. These curve fits are:
Linear, Polynomial, Exponential, Logarithmic, and Power. For descriptions and any data restrictions
associated with these curve fits, see Sections 9.1.2–9.1.6.
The following steps explain how to apply a Least Squares fit, using the Polynomial curve fit as an example.
The procedure is basically the same for applying the other Least Square fits. Section 2.2.4 in the guided tour
includes an example of applying a Linear curve fit.
Sinc(5x)
1
0.8
0.6
Sinc(5x)
0.4
0.2
0
-0.2
-0.4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
-π/2 to π/2
Figure 9-1 Sample plot
2. Choose Curve Fit > Polynomial. A Curve Fit Selections dialog similar to Figure 9-2 appears. All
dependent variables are listed under Column Names.
Note: This extra dialog is only displayed when using the Polynomial fit.
The curve fit line is displayed on the plot. Once the curve fit is applied, you can display its equation
or extrapolate the fit to the axis limits. These are a few of the features covered in Sections 9.6–9.8.
Figure 9-5 shows the sample plot after applying a Polynomial curve fit and displaying the equation
Sinc(5x) 8 9
Y = M0 + M1*x + ... M8*x + M9*x
1
M0 0.74498
0.8
M1 -2.2335e-06
0.6
Sinc(5x)
M2 -1.5263
0.4 M3 5.3462e-06
0.2 M4 0.57926
0 M5 -2.3478e-06
-0.2 R 0.89451
-0.4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
-π/2 to π/2
Figure 9-5 Sample plot with Polynomial curve fit applied
The following steps explain how to apply a smoothing fit, using the Cubic Spline curve fit as an example. The
procedure is basically the same for applying the other smoothing fits.
example #1
7
6 Test #1
Test #2
5
Range
4
3
2
1
0
0 2 4 6 8 10 12 14
Time
Figure 9-6 Sample plot
2. Choose Curve Fit > Cubic Spline. A Curve Fit Selections dialog similar to Figure 9-7 appears. All
dependent variables are listed under Column Names.
Note: When applying a Weighted fit, a second dialog appears each time a variable is selected. Use
this dialog to specify the smoothing factor.
4. Click OK. The dialog in Figure 9-8 is displayed to inform you that the fit is being applied.
The curve fit line is displayed on the plot. Once the curve fit is applied, you can increase the number
of curve fit points or hide the original data to only display the curve fit. These are a few of the features
covered in Sections 9.6–9.8. Figure 9-9 shows the sample plot after applying a Cubic Spline curve
fit.
example #1
7
6 Test #1
Test #2
5
Range
4
3
2
1
0
0 2 4 6 8 10 12 14
Time
Figure 9-9 Sample plot with Cubic Spline curve fit applied
This section explains the structure of the curve fit equation, setting initial conditions for the parameters, the
Curve Fit Definition dialog, and the use of the commands in the General submenu.
The independent variable in an equation is represented by m0. The parameters being calculated by the fit are
represented by m1–m9. Parameters should be entered wherever you have an unknown quantity and you want
KaleidaGraph to calculate the best value.
Constants and other shorthand references can be defined in the library for use in a curve fit definition. Some
definitions in the default library are used to substitute x for m0, and a, b, c, and d for m1, m2, m3, and m4,
respectively. Section 9.5.6 provides an example of defining a curve fit equation in the library.
To include a column number as part of the curve fit definition, the table function must be used. Section 9.5.4
shows how to use the table function in a General curve fit definition. This method also enables you to fit
equations containing multiple independent variables.
The following table lists some equations and how they appear as curve fit definitions in KaleidaGraph.
a*x+b m1 * m0 + m2
a + b * x^c m1 + m2 * m0^m3
a + b * exp(–c * x) m1 + m2 * exp(–m3 * m0)
a * exp(–b * x) * cos(c * x + d) m1 * exp(–m2 * m0) * cos(m3 * m0 + m4)
Note: Since the fit starts with initial guesses and improves upon them with each iteration, the final values
may be different for a separate set of initial guesses.
Do not get carried away trying to find good guesses; the initial conditions are just that, guesses. If you are not
sure what the guesses should be, keep the initial conditions non-zero, and at the correct order of magnitude
that you might expect (be it 0.001, 1, or 1000).
The initial conditions are entered immediately following the curve fit definition. Place a semicolon at the end
of the definition and begin entering the initial guesses, separating each with a semicolon. The table below
shows the definitions from the previous section with some sample initial guesses.
m1 * m0 + m2; m1 = 0.5; m2 = 23
m1 + m2 * m0^m3; m1 = –2; m2 = 3; m3 = 2
m1 + m2 * exp(–m3 * m0); m1 = 5; m2 = 1; m3 = 0.5
m1 * exp(–m2 * m0) * cos(m3 * m0 + m4); m1 = 4; m2 = 0.7; m3 = 2.2; m4 = 15
The various features of the Curve Fit Definition dialog are discussed below.
2
5
3
6
7
Figure 9-10 Curve Fit Definition dialog
1. Text Field
Curve fit definitions and initial guesses are entered in this area of the dialog.
2. File...
Clicking this button displays a text editor that can be used to create, open, or save a curve fit definition.
The definition appears on the first line and any partial derivatives appear on the lines below it.
3. Help...
Click this button to display the Help dialog.
4. Degrees/Radians Buttons
These buttons determine whether the results of trigonometric functions are in degrees or radians.
5. Allowable Error:
The value entered in this field helps KaleidaGraph determine when to stop iterating. Iterations stop if
either of the following occurs:
• Chi Square does not change for a certain number of iterations.
• The percent change in the normalized Chi Square is less than the Allowable Error.
6. Weight Data
When selected, you can specify a data column that contains weights for the variable you are fitting. These
weights should represent the individual errors of the data values. Each weight is used internally as:
1/(weight^2). The smaller the error value, the larger the internal weight. If this check box is not selected,
a weight value of 1.0 is used for all data points.
7. Specify Partials
The algorithm that KaleidaGraph uses in calculating each iteration of the General curve fit requires
evaluating the partial derivative of the function with respect to each parameter. If Specify Partials is
not selected, KaleidaGraph numerically approximates the derivative. If this option is selected, the dialog
expands, as shown in Figure 9-11.
The nine buttons at the bottom of the dialog allow each partial derivative to be entered in the text field
above the buttons. The biggest advantage of specifying the partial derivatives is accuracy. The curve fit
algorithm uses these partial derivatives to direct itself where to move after each iteration to find the best
solution. In general, sharp deviations in the surface may not be accurately approximated, so the actual
partial derivatives are preferred.
You can choose to specify only some of the partial derivatives, but not all of them. It is better to let
KaleidaGraph approximate the partial instead of specifying the wrong derivative. If a partial derivative is
missing, KaleidaGraph numerically approximates that partial derivative.
Note: When rearranging curve fits, do not leave the Edit General dialog until you are completely finished.
As soon as you click OK or Cancel in this dialog, anything in the trash bin is deleted. The only
permanent trash bin item is New Fit.
To save any changes made to the Curve Fit menu, it is necessary to save the changes to the default Macros
file using one of the following methods:
• Choose File > Preferences and select Prompt from the Macros pop-up menu. When exiting
KaleidaGraph, a dialog asks whether or not to overwrite the Macros file that was opened at launch.
• Choose File > Preferences and select Always from the Macros pop-up menu. When exiting
KaleidaGraph, the Macros file that was opened at launch is automatically overwritten.
• Choose File > Export > Macros and overwrite the default Macros file.
Note: Only changes made to a new plot using the Edit General command are saved as part of the macros
file. Any changes made to a saved plot or by choosing a curve fit from the General submenu and
clicking Define apply solely to that particular plot.
Note: If you want this equation to be available for all future plots, you must be working with a new plot and
the equation must be defined using the Edit General command.
The following sections explain each of these methods. The equation for a Gaussian (bell-shaped) curve is used
as an example. This curve can be expressed by the formula:
a + be ( – ( x – c ) ⁄ d )
2 2
KaleidaGraph comes with a Curve Fits folder (in the Examples folder) which contains an assortment of
function definitions. The process of loading a curve fit definition from a text file is relatively easy. The
Gaussian formula from the Curve Fits folder will be used as an example.
Note: The process of saving a set of definitions is similar, except you choose Save As instead of Open in the
text editor.
The default library contains several curve fit definitions that can be used to apply a curve fit. One of these
definitions, gaussfit, represents a Gaussian equation. Figure 9-14 shows how this definition is used in the
Curve Fit Definition dialog. The four values in the expression represent the initial guesses for the parameters
Note: The library containing the gaussfit definition must be open for this function to work. If it is not open,
a syntax error occurs.
B Data 1
16
14
12
10
4
-80 -60 -40 -20 0 20 40 60 80
Note: For information on including this fit in your master curve fit list, refer to Section 9.4.4.
When the curve fitting process is complete, the curve is drawn on the plot. Once the curve fit is
applied, you can display its equation or extrapolate the fit to the axis limits. These are a few of the
features covered in Sections 9.6–9.8. Figure 9-19 shows the sample plot after applying a General
curve fit and displaying the equation.
B Data 1
y = m1 + m2*exp(-(m0-m3)*(m0...
16 Value Error
m1 5 2.5606e-08
14
m2 10 4.9058e-08
12 m3 3.3389e-11 7.1266e-08
m4 20 1.2765e-07
10 Chisq 4.2923e-12 NA
R 1 NA
8
4
-80 -60 -40 -20 0 20 40 60 80
Each weight is used internally as: 1/(weight^2). Specifying a weight less than 1.0 for a data point increases the
internal weight of that point and can make the total error much larger. Weight values larger than 1.0 reduce
the internal weights. When Weight Data is not selected, a weight value of 1.0 is used for all data points.
When the Weight Data option is selected and you choose a variable to fit, the dialog in Figure 9-20 appears.
Use this dialog to select the column containing the weights for your data.
Suppose that a General curve fit is being defined to fit a straight line to a set of data. The equation is of the
form: a+b*x. In this example, you want to limit the value of b so that it is not a negative number.
In the Curve Fit Definition dialog, enter either of the following definitions:
a + (b=(b<0) ? 0 : b) *x; a=1; b=1 or a + (b=limit(0, 1000, b))*x; a=1; b=1
In the first definition, a conditional test is performed to see if b is less than zero. If true, b is set to zero; if false,
b is set equal to itself.
In the second definition, the limit function is used. The limit function requires that a lower and upper boundary
be set for the parameter. In this case, zero and 1000 are used to bound the extremes of b.
Whenever a parameter is bound in a General curve fit definition, you must specify partial derivatives.
Otherwise, a Singular Coefficient Matrix error may occur if the parameter being limited gets pegged
at a bounding point for multiple iterations.
4. Once the definition is entered, choose File > Exit to leave the library. The definition is now available
for use in the Curve Fit Definition dialog.
Figure 9-21 shows how to call the library definition from within the Curve Fit Definition dialog. Because of
the two commands (a=a0 and b=b0) that follow the main definition in the library, initial guesses can be entered
directly into the curve fit definition.
f=m5;
g=m6;
h=m7;
i=m8;
j=m9;
2. Add the following commands to the existing Curve Fit Definitions.
form1() = a*exp(–(x–b)^2/(c*c));
;
form2() = d*exp(–(x–f)^2/(g*g));
;
form3() = h*exp(–(x–i)^2/(j*j));
;
sample2(a0, b0, c0, d0, f0, g0, h0, i0, j0) = form1() + form2() + form3()\;
a=a0\; b=b0\; c=c0\; d=d0\; f=f0\; g=g0\; h=h0\; i=i0\; j=j0;
Notice the original equation has been split into three smaller parts and all three parts are tied together into one
formula. This makes it possible to use curve fit definitions that are longer than the 256 character limit in the
Curve Fit Definition dialog.
Figure 9-22 shows how to call the library definition from within the Curve Fit Definition dialog. The name of
the definition is entered, followed by all of the initial guesses.
m0 R value
m1–m9 The values of the parameters.
m22 Chi Square value
m23 % error term
m24 Chi Square of the last iteration.
m25 Number of iterations completed.
m26 Number of parameters in the fit.
Note: Almost all memory registers, alpha registers, and program space are overwritten during the execution
of a General curve fit.
Depending on the type of curve fit, the equation is displayed in a table or as a text label. The General and
Polynomial curve fits display equations in a table because the equations for these fits can be much longer than
the others. The appearance of the equation can be edited by double-clicking it with the Selection Arrow.
The numeric format of the equation can be controlled using the Equation Label Format command (Format
menu). Some of the options available include number format, number of significant digits, and trailing zeros
Viewing Coefficients
The other method of displaying curve fit results is to view the curve fit’s coefficients in a dialog.
Correlation Coefficients
A correlation coefficient (R or R2) is displayed with the curve fit’s equation and coefficients. The correlation
coefficient indicates how well the calculated curve fits the original data.
This value ranges from zero to one. The closer to one, the better the fit. The equation used to calculate the
correlation coefficient is listed in Section D.5.
You can choose to display the Linear Correlation Coefficient (R) or the Coefficient of Determination (R2) as
part of the results. The Display R^2 instead of R check box in the Curve Fit Options dialog (Format menu)
controls which is displayed.
Parameter Errors
The General curve fit displays a column of errors to the right of the parameter values. The errors represent the
standard error values of the parameters. These values should be read as: parameter value ± error.
Note: If you paste the results into the plot window, the coefficients in the table do not change if the
curve fit is updated. For this reason, we recommend that you use the Display Equation
command instead.
3. To copy the coefficients to the Calculator, click one of the drop-down arrows and choose Copy
Parameters to Calculator from the pop-up menu that appears. This enables you to use the results
in a Formula Entry function.
4. Click OK to return to the plot window.
Note: It is also possible to copy the parameters by choosing View Results from the pop-up menu and clicking
the Clipboard or Calculator button.
KaleidaGraph will append the results after any existing data in your data window. The first column will be a
series of X values. The number of X values will be equal to the number of curve fit points specified in the
Curve Fit Options dialog (Format menu). The second column will contain the values from the curve fit at each
of these locations.
Note: If you want to use the original X values or supply your own X values, you need to use Formula Entry
to calculate the curve fit values. Section 5.6 provides instructions for using the curve fit functions in
Formula Entry to obtain values from the curve fit.
KaleidaGraph will append the residual values after any existing data in the data window. These values
represent the difference between the original Y values and the values calculated by the curve fit.
The line style, width, and color of the curve fit are controlled using the Plot Style command (Plot menu). The
method for changing these settings is described in Section 7.9.4.
Note: It is not possible to extrapolate the Smoothing fits (Smooth, Weighted, Cubic Spline, and Interpolate)
because they cannot be represented by a single equation.
28
24
20
16
Jan/1 Jan/5 Jan/10 Jan/15 Jan/19 Jan/24
828
Mean
824
820
816
A B C D E F G H I J
Figure 9-31 Plot with error bars from a data column
The direction of the labels is the same as the error type selected (horizontal for X Err or vertical for Y Err). If
the Center Text check box is selected, the labels are centered on the markers. Otherwise, they are justified
and placed on the side of the marker which has the error selected. The text labels can be moved individually
with the Text tool or as a group with the Selection Arrow.
Note: Text error bars use the same default attributes as value labels. These labels can also include subscripts
or superscripts. For more information on adding these features to text labels, see Section 8.7.3.
6. Choose None for one of the portions of the bar. For the other, choose Data Column and select the
text column containing the labels (in this case Errors).
7. To center the labels on the marker, select the Center Text check box. Otherwise, the labels are
justified.
Note: If the Link Error Bars check box is selected and the Center Text check box is cleared, text
labels are placed on both sides of the marker.
8. Click OK. Then, click Plot to add the labels to the plot. Figure 9-34 shows a sample plot with text
error bars added.
6.8
5.35 Test #1
5.25
6
6
4.5
5
Range
3.2
3.1
3.1
4
1.74
1.57
1.48
1.4
0.5
0
0 2 4 6 8 10 12 14
Time
Figure 9-34 Plot with text error bars added
A special case of these error bars results when the errors are taken from a data column. Here the direction of
the error bar is controlled by the sign of the data and whether positive or negative error types have been
selected. For positive data, bars are displayed in the same direction as the error type. For negative data, the
bars are displayed in the opposite direction.
0.8 Sinc(5x)
0.6
Sinc(5x)
0.4
0.2
-0.2
-0.4
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
-π/2 to π/2
Figure 9-35 Plot with single-sided error bars
All four quadrants of the ellipse can be controlled independently. The vertical distance is determined by the Y
Err and the horizontal distance is determined by the X Err. This gives you a number of possibilities for
displaying error arcs and ellipses.
8
7 Test #1
6
5
Range
4
3
2
1
0
0 2 4 6 Time 8 10 12 14
This option can help remove a number of unnecessary lines from the plot and make it easier to see the data.
This feature is useful when the Standard Deviation error type is selected. Because all of the error bars are
drawn from the mean, the lines connecting the point and the cap are not needed. By removing the lines and
adjusting the length of the caps, you can have a dashed or solid error line across the entire plot. See
Section 9.9.7 for controlling the cap length.
8
Test #1
6
Range
0
0 2 4 6 Time 8 10 12 14
2. Clear the check boxes of the error bars to be removed. Clicking Deselect clears all of the check boxes
at once.
3. Click Plot to return to the plot window. The plot is redrawn without any error bars.
When you import a graphic file, the picture is placed in the active plot or layout window. You cannot edit any
parts of the imported picture. However, you can move and resize the image, and modify its frame.
Note: A plot or layout window must be the frontmost window on the screen. Otherwise, the graphics options
are unavailable in the Import submenu.
Note: The options in the Print Setup, Page Setup, and Print dialogs vary depending on the printer and
operating system.
The advantage of saving the plot without the data is that it saves space on the hard disk, especially if you create
plots from large data sets. The drawback is that you cannot make any changes that require the plot to be rebuilt
from the original data. This includes resizing axes, scaling to a new set of limits, editing markers, and
modifying error bars or curve fits.
Note: If the data window used to create a plot is closed before saving the plot, it is saved without the data.
Note: If the Copy Selection command is displayed in the Edit menu, something is currently
selected in the plot window. Do not use this command because it causes the image to have
lower resolution.
Figure 10-1 Copy Graph dialog (Windows) Figure 10-2 Copy Graph dialog (Macintosh)
Note: In the Windows version, a normal Metafile and an enhanced Metafile are copied to the
Clipboard at the same time. You may be able to choose which one gets inserted into your
document using the Paste Special command.
Through the use of Object Linking and Embedding (OLE), it is possible to embed a KaleidaGraph plot into
another program. The embedded plot, called an object, becomes part of the source document. The object
maintains a link with KaleidaGraph, allowing you to double-click the object and make changes to the plot from
within KaleidaGraph. When you are finished modifying the object, the changes are reflected in the source
document.
2. Choose Edit > Copy Graph. The dialog in Figure 10-4 is displayed.
Note: If the Copy Selection command is displayed in the Edit menu, something is currently
selected in the plot window. This command cannot be used to embed an OLE object.
Note: To undo the changes that were made to the object, use the Undo or Undo Object command in the
destination program.
The published plot is surrounded by a dark border in the plot window. This border indicates that the plot is
published. To hide the border, choose Edit > Hide Borders.
To cancel a publisher:
1. Click any portion of the published edition.
2. Choose Edit > Publisher Options.
3. Click Cancel Publisher to stop updating the edition. A dialog verifies that you want to remove the
publisher.
4. Click OK to return to the plot window.
The subscribed edition appears as an object in the plot window. A dark border surrounds the picture, indicating
that it is a subscriber. To hide the border, choose Edit > Hide Borders. You cannot edit any parts of the
picture, however, you can move and resize it within the plot window.
To cancel a subscriber:
1. Click any portion of the subscriber.
2. Choose Edit > Subscriber Options.
3. Click Cancel Subscriber to stop receiving updates from the edition. A dialog verifies that you want
to remove the subscriber.
4. Click OK to return to the plot window.
The layout window can be used to place multiple plots on a single page. It can also be used to add text labels,
graphics, or tables to a single plot or to multiple plots on a page. The layout window replaces the Show Page
feature that was available in earlier versions of KaleidaGraph.
The New Layout command creates an empty layout window. If any changes were made to the current layout,
a dialog asks if you want to save the changes before displaying the new layout window.
When the layout window is active, a Layout menu is added to the menu bar. You can use the commands in
this menu to place plots in the layout, arrange the plots, and add a background or frame to the layout.
The name of the plot appears in the lower-left corner of the plot, as shown in Figure 11-2. This is for
identification purposes only; it is not included when you print or export the layout.
As plots are added to the layout window, KaleidaGraph maintains a link between the cell in the layout and the
position of the plot in the Select Plot submenu. If a particular cell contains the first plot in the list, opening or
creating another plot will cause the cell to display this new plot.
Any time you open, create, or close a plot, it is possible for the plots in the layout to change positions because
the location of the plots in the Select Plot submenu has changed. For this reason, it is best if you open or create
all of your plots before arranging them in the layout window.
It is also possible to use empty cells, shown in Figure 11-3, to organize the layout. These can be added to the
layout window by choosing Layout > New Position. The empty cells can be replaced at a later time by
clicking the cell and choosing a plot from the Select Plot submenu.
Note: If you open several plots in the Macintosh version but find that some of them are not listed in the Show
Layout submenu, you need to allocate more memory to the KaleidaGraph program.
When a plot is selected, object handles appear in one of two places. When Axis is selected in the Plot Size
dialog, object handles are displayed at the end of each axis. When Frame is selected, object handles are placed
at the corners of the plot frame. Figure 11-4 shows a plot with Axis selected; Figure 11-5 shows a plot with
Frame selected (in the Plot Size dialog).
Figure 11-4 Plot with Axis selected Figure 11-5 Plot with Frame selected
To manually resize the plot, drag one of the object handles. As you drag, a dialog appears in the upper-left
corner of the layout window. This dialog (shown below) contains the current plot dimensions and axis origin
(offset).
The aspect ratio of the plot is maintained as you resize the plot. By pressing Shift as you drag, it is possible to
resize the plot without maintaining the aspect ratio.
Note: This command can only be used to arrange plots in the layout window. It does not have any affect on
any other objects in the layout window.
Figure 11-8 shows a layout window containing five plots in a random pattern. Figure 11-9 shows the same
layout window after dividing the window into three rows and two columns using the Arrange Layout
command.
Pressure Radius
8 90 8 Pressure
8 cm 3
160 0
4 140 4 cm 3 4
120
100 0 cm 3
0
0 8 0
6 0
180
4 0
1966 (K) 1967 (K) 1968 (K)
-4
-4 270
0
o
5
o
10
o
15
o
20
o
25
o
0o 5o 1 0o 1 5o 2 0o 2 5o
3
140
2 Norm(p)
3 120
1
140 2 Norm(p) 100
0
120 80
1
100 -1 60
80 0
60
-2 40
40
-1
-3 20
99.9
.01
0
0
0
0
0
0
0
5
9
99.99
1
5
20
.1
-2 0
1
2
3
5
7
8
9
9
9
0 Percent Jan Feb March
Jan Feb March
-3
.01
.1
10
20
30
50
70
80
90
95
99
99.99
99.9
1
5
Percent
160
Radius
90 140
8 cm3
0 120
3
4 cm
100
0 cm3
80
180 60
40
270 1966 (K) 1967 (K) 1968 (K)
Figure 11-8 Before choosing Arrange Layout Figure 11-9 After choosing Arrange Layout
example #1
Test #1 Test #2
7
6
5
Range
4
3
2
1
0
0 2 4 6 8 10 12 14
Time
Figure 11-10 Sample plot Figure 11-11 Second plot with labels removed
example #1
Test #1 Test #2
7
6
5
Range
4
3
2
1
0
0 2 4 6 8 10 12 14
Time
Note: Text labels may or may not have the background displayed behind the text. The Erase Background
command (in the Format menu of the Edit String dialog) controls what happens. When this command
is turned on, the background is erased.
Test Results
Test #2
7
6
5
4
3
2
1
0
0 2 4 6 8 10 12 14
Time
Lot 1437-98
Test #3
8
4
3
2
0 2 4 6 8 10 12 14
Time
Lot 1437-99
The background is controlled by the Color icon and the Fill Pattern portion of the Pattern icon. If a background
color is specified in the original plot window, these settings do not have any affect on the appearance of the
plot. The border is controlled by the Style icon and the Pen Pattern portion of the Pattern icon.
Note: Any background applied to the layout is also applied to any plots which have None selected for the
Fill Pattern and do not have a background color selected in the original plot window.
Note: If the Copy Selection command is displayed in the Edit menu, something is currently
selected in the layout window. Do not use this command because it causes the image to have
lower resolution.
3. Make your selections in the dialog and click OK.
4. The entire layout is now on the Clipboard in a Metafile (Windows) or PICT (Macintosh) format and
can be inserted into another program using the Paste or Paste Special command.
Note: For information on saving the layout in an EPS format, refer to Section 10.7.
Note: The options in the Print Setup, Page Setup, and Print dialogs vary depending on the printer and
operating system.
The plots are not saved as part of the layout file; however, the cells are assigned position numbers based on
the order of the plots in the Select Plot submenu. For example, if a cell contains the second plot listed in the
Select Plot submenu, the next time you open this layout file, the second plot in the Select Plot submenu will
automatically be loaded into this cell.
Note: To see the position numbers for each of the cells, open the layout file before opening or creating any
plots. Any cells that show Position #0 are empty cells and will not automatically have plots loaded into
them.
Turning this command off allows you to make several changes in the layout window without having to wait
for the window to update after each change. This is particularly useful when arranging several plots on a page
or when working with large data sets.
Appendix A
This chapter provides an overview of the commands available in KaleidaGraph. For more detailed
information, including the options in the various dialogs, refer to the online help.
Open
This command opens any KaleidaGraph file that has been previously saved. You can also open text and
Microsoft Excel files. If a plot or layout window is active, this command can import a variety of graphics into
the window.
Merge
You can use this command to combine data from another file with the active data window. This command
opens the data file and places it at the current row and column position. Files may be either KaleidaGraph data
files, Microsoft Excel files, or text files.
Note: If you exceed the 1000 column limit while merging files, only the number of columns needed to reach
the limit is added.
Close
This command closes the active window. Clicking the close box performs the same function.
Note: If you want to close the window without saving any changes, press Shift while either clicking the close
box or choosing File > Close/NoSave.
This command is displayed when editing an embedded OLE object. Choosing this command updates the
embedded plot and returns to the source document. If KaleidaGraph was open prior to editing the OLE object
or if other files were opened before choosing this command, the source document is not automatically
displayed.
Save
This command saves the active data, plot, layout, or plot script window. Depending on which window is
active, a Save Data, Save Graph, Save Layout, or Save Script command is displayed.
• Save Data - This command saves the data as a KaleidaGraph data file. If text format is desired, use
the Export command.
• Save Graph - This command saves the plot with its data, provided the data window is still open. If
you want to save the plot using a different format, use the Export command.
• Save Layout - This command saves the cell positions and background, as well as any text or graphic
objects in the active layout window. This command does not save the plots as part of the layout file.
Only the positions of the cells are saved.
• Save Script - This command saves the active plot script. If a plot is used as the graphic template, it
is saved at the same time as the plot script file. In the Windows version, the plot has the same name
as the script, but with a .qpc file name extension. In the Macintosh version, the plot’s file name
contains the first 25 characters of the script’s file name, followed by .plot.
Update
Note: This command is only available in the Windows version of KaleidaGraph.
This command is displayed when editing an embedded OLE object. Choosing this command sends the updated
object to the source document.
Save As
This command saves a copy of the current data, plot, layout, or plot script window. Depending on which
window is active, a Save Data As, Save Graph As, Save Layout As, or Save Script As command is
displayed.
• Save Data As - This command saves a copy of the data as a KaleidaGraph data file. If text format
is desired, use the Export command.
• Save Graph As - This command saves a copy of the plot with its data, provided the data window is
still open. If you want to save the plot using a different format, use the Export command.
• Save Layout As - This command saves a copy of the cell positions and background, as well as any
text or graphic objects in the active layout window. This command does not save the plots as part of
the layout file. Only the positions of the cells are saved.
• Save Script As - This command saves a copy of the active plot script. If a plot is used as the graphic
template, it is saved at the same time as the plot script file. In the Windows version, the plot has the
same name as the script, but with a .qpc file name extension. In the Macintosh version, the plot’s file
name contains the first 25 characters of the script’s file name, followed by .plot.
Import
You can use this command to open a variety of files from within KaleidaGraph. Use the submenu to select the
type of document to be imported. The Open dialog is displayed, no matter which type of file you specify. Only
files that are the same type as what you choose from the submenu are displayed.
Export
You can use this command to save a variety of files from within KaleidaGraph. Use the submenu to select the
type of document to be saved. The Save dialog is displayed, no matter which type of file you specify.
Preferences
You can use this command to control how various files are handled when you quit the program. This command
also controls some other general settings for the program.
Note: The settings for this dialog are saved as part of the Style file. If you choose Never for the Style, you
must manually overwrite the default Style file by choosing File > Export > Style.
New Layout
You can use this command to create new layouts from scratch. Choosing this command displays an empty
layout window. For more information on using the layout window, see Chapter 11.
Print
This command prints the contents of the active data, plot, or layout window. If the Macro Calculator or
Formula Entry window is active, you can print the active macro in the Calculator. Depending on which
window is active, a Print Data, Print Graphics, Print Layout, or Print Program command is displayed.
• Print Data - This command prints the entire data set, if a selection does not exist. A maximum of
15 columns may be printed on a single page.
• Print Graphics - This command prints the contents of the active plot window.
• Print Layout - This command prints the contents of the active layout window.
• Print Bitmap - This command is only available in the Macintosh version of KaleidaGraph. This
command prints a bitmapped version of the graph. To print a bitmap, press Shift while choosing the
Print Bitmap command from the File menu.
• Print Program - This command prints the active program in the Macro Calculator.
Recent Files
This command displays a submenu that lists the last eight data or plot files that have been opened or saved in
KaleidaGraph. You can open a listed file by choosing its file name from the submenu.
Exit/Quit
This command closes the KaleidaGraph program and returns to the desktop. Under Windows, the Exit
command is displayed; on a Macintosh, the Quit command is displayed.
KaleidaGraph saves any changes to the default Style, Macros, Script, and Layout files, depending on what is
specified in the Preferences dialog. If Prompt is selected for any of the items in the Preferences dialog and
changes have occurred to those particular items, a dialog is displayed.
Cut
In the data window, the Cut command removes a data selection and places it on the Clipboard. In the plot and
layout windows, the Cut command removes objects, equations, and text labels that have been added to the
original plot. If you cut any part of the original plot, including the labels, titles, or legend, the entire plot is
placed on the Clipboard.
• Cut w/Titles - If Shift is pressed, Cut is replaced by Cut w/Titles. This command includes the
column titles when you cut a data selection.
Copy
If the data window is active, the Copy command places a copy of the data selection on the Clipboard. If a plot
or layout window is active, the Copy Graph, Copy Selection, or Copy Layout command is displayed.
• Copy w/Titles - If Shift is pressed, Copy is replaced by Copy w/Titles. This command includes the
column titles when copying a data selection.
• Copy Graph - This command is available when the plot window is active and nothing is selected.
This command copies the contents of the plot window to the Clipboard as a Metafile (Windows) or
PICT (Macintosh) image. You can then paste the plot into another program.
• Copy Selection - This command is displayed when any object is selected in the plot or layout
window. This command copies the selected object to the Clipboard. If you copy any part of the
original plot, including the labels, titles, or legend, a copy of the entire plot is placed on the
Clipboard.
• Copy Layout - This command is available when a layout window is active and nothing is selected.
This command copies the contents of the layout window to the Clipboard as a Metafile (Windows)
or PICT (Macintosh) image.
Paste
This command places the contents of the Clipboard into a data, plot, or layout window. When data is pasted
into a data window, the data in the first row determines the column’s format. When data is pasted into a plot
or layout window, the data is placed in a table.
• Paste w/Titles - If Shift is pressed, Paste is replaced by Paste w/Titles. This command includes the
column titles when you paste a selection from the Clipboard into a data window.
Note: There is no difference between the Paste and Paste w/ Titles commands when selections are cut or
copied from KaleidaGraph’s data windows (using the Cut, Copy, Cut w/Titles, or Copy w/ Titles
command). If the data on the Clipboard is not from a KaleidaGraph data window, Paste and Paste w/
Titles operate as described above.
Clear
In the data window, choose Clear to delete all selected data cells. The cells below the selection shift up to fill
the void.
• Clear w/Titles - If Shift is pressed, Clear is replaced by Clear w/Titles. This command deletes the
column titles along with the data.
In a plot or layout window, Clear removes the selected item from the window. This command does not affect
the contents of the Clipboard. You can also use the Backspace (Windows) or Delete key (Macintosh) to
perform the same function.
Binary Mode is much faster and allows you to quickly move large amounts of data between data windows.
Text Mode should be used if you need to copy more than 1000 cells and paste them into a plot window or
another program.
The active mode is listed in the Edit menu and has a check mark in front of it. To switch between modes,
choose the mode that is currently active.
Select All
This command selects all objects in the current window. If a data window is active, Select All makes a data
selection that includes all cells containing data. Any empty cells embedded in the data are also included.
Duplicate
This command makes a copy of selected text or objects in a plot or layout window. The copy is placed slightly
below and to the right of the original. If you duplicate any part of the original plot, including the labels, titles,
or legend, the entire plot is duplicated.
Clear Data
This command clears the contents of an entire data selection. Only the data is removed; the cells are not deleted
as they are with the Clear command. You can also use the Backspace (Windows) or Delete key (Macintosh)
to perform the same function.
Create Publisher
Note: This command is only available in the Macintosh version of KaleidaGraph.
This command makes part of the data window or the entire plot window available to other documents by
creating a publisher for the appropriate window. When you create a publisher, a copy of the information is
placed in a new file, called an edition. Editions are separate files that can be saved to disk. When changes are
made in the publisher, the changes are automatically reflected in the edition.
Subscribe To
Note: This command is only available in the Macintosh version of KaleidaGraph.
This command places a copy of an edition, called a subscriber, into your document. Once the subscriber is
inserted, any changes received by the edition are sent to the subscriber. The data and plot windows can both
subscribe to editions.
These commands determine how often changes are sent from a publisher to an edition and from the edition to
the subscriber. If a publisher is selected, the Publisher Options command is displayed. If a subscriber is
selected, Subscriber Options is displayed.
Paste Link
Note: This command is only available in the Windows version of KaleidaGraph.
This command pastes the contents of the Clipboard in the data window as a linked DDE object. The data
pasted into KaleidaGraph maintains a reference to the source document so that when the original file changes,
the changes are reflected in the KaleidaGraph data file.
Create Link
Note: This command is only available in the Windows version of KaleidaGraph.
This command creates a DDE link to data in a source document. The linked data maintains a reference to the
source document so that when the original file changes, the changes are reflected in the KaleidaGraph data file
Link Options
Note: This command is only available in the Windows version of KaleidaGraph.
This command controls whether the linked data is updated automatically or manually. By default, new links
are set to update automatically. This command can also be used to cancel a DDE link.
OLE Options
Note: This command is only available in the Windows version of KaleidaGraph.
This command is only displayed when editing an embedded OLE object. This command controls some of the
settings (size, scaling, and resolution) of the embedded object.
Edit Text
This command displays KaleidaGraph’s text editing facility. The text editor is useful for editing the contents
of the Clipboard and other small editing tasks.
Plot Style
This command controls the markers, fill patterns, line styles, and colors which are used in various plots to
represent the plotted variables.
Auto Link
When this command is turned on, the plot automatically updates whenever a value is changed in the data
window. After changing a data value, moving to another cell causes the update to occur. All curve fits and
error bars are automatically recalculated. When Auto Link is turned off, the plot is not updated.
Update Plot
This command forces an immediate regeneration of the plot from the original data set. Clicking the Update
Plot button ( ) in the data window performs the same function.
Auto Refresh
When this command is turned on, the plot or layout window is redrawn whenever a change is made. When
Auto Refresh is turned off, the plot or layout window is not redrawn until this command is turned on again.
Display Legend
When this command is turned on, the legend is displayed in the plot window. The legend can be removed by
turning off this command or using the Backspace (Windows) or Delete key (Macintosh) when the legend is
selected (which also turns off the Display Legend command). The Eraser tool removes the legend
permanently, without turning off this command.
Display Title
When this command is turned on, the plot title is displayed in the plot window. The plot title can be removed
by turning off this command or using the Backspace (Windows) or Delete key (Macintosh) when the title is
selected (which also turns off the Display Title command). The Eraser tool removes the plot title permanently,
without turning off this command.
Display Equation
When this command is turned on, the results from curve fits that have closed form solutions (equations) are
displayed in the plot window. This includes the General, Linear, Polynomial, Exponential, Logarithmic, and
Power curve fits. To change the precision of the results, use the Equation Label Format command (Format
menu).
Error Bars
You can use this command to add horizontal and vertical error bars to all of the Linear plots, as well as
Probability, X-Y Probability, Horizontal Bar, and Column plots. Error bars illustrate the amount of error for
the plotted data. They normally appear as lines extending from the data points, with caps on either end to
represent the upper and lower values of the spread.
Add Values
When this command is turned on, the numerical values of bars or columns, or the percentage value of pie slices
are automatically placed on the plot. This command affects Pie, Horizontal Bar, Stack Bar, Column, and Stack
Column plots. The values can be removed by turning off this command or using the Backspace (Windows)
or Delete key (Macintosh) when the labels are selected as a group. The Eraser tool can be used to remove
individual labels.
The values may be moved as a group with the Selection Arrow, or individually with the Text tool. To change
the format of the values displayed, choose Format > Value Label Format.
Extract Data
This command displays the data used to create a saved plot. The Find Data button ( ) in the plot window can
also be used to extract this data. The Extract Data command is unavailable if the data was not saved with the
plot or if it was already extracted.
Define Layout
This command is used to save the basic characteristics of the current plot as a mini-template. Any new plots
of that type have the same layout as the original. The layout saves the position of the legend, axes, and titles,
the default style for the legend, and the size of the axes, frame, and legend.
Each plot type has its own layout. All layouts are saved in the Style file.
Insert Mode
When this command is selected, clicking a cell does not automatically select the cell. Instead, a cursor is placed
in the cell to edit the current value. To select a cell in Insert Mode, you must double-click the active cell.
Append Columns
This command appends the specified number of columns to the data window. If the current cell is in the last
column of the data window, pressing Right Arrow automatically adds a new column.
Insert Column
This command inserts an empty column to the left of the column currently selected.
Delete Column
This command removes selected columns from the data window. You can remove a single column or a group
of columns using this command.
Insert Row
This command inserts an empty row above the row currently selected. A row can be inserted in a single
column or a range of columns.
Delete Row
This command removes selected rows from the data window. You can remove an entire row or a data selection
from the data window.
Add Rows
This command adds the specified number of rows to the data window. Rows are added in multiples of 100. If
the active cell is in the last row of the data window, pressing the Enter (Windows), Return (Macintosh), or
Down Arrow key adds 100 rows to the data window.
Compress Rows
This command compresses a data window to its minimum size by deleting all empty rows that follow the last
physical row of data. Rows are deleted in multiples of 100. A data window will never have less than 100 rows
Go To Cell
This command is used to view an exact cell location in the data window. Choosing Go To Cell displays a
dialog to enter the row and column numbers of the desired cell. The data window automatically scrolls to make
that cell position visible.
Column Format
This command is used to edit column titles and change the format of any column in the data window.
Posted Note
This command displays the Posted Note of the active data window. The same result can be obtained by
clicking the Posted Note button ( ) in the data window. The Posted Note can be used to store information
about the active data set.
Descending Sort
This command sorts numeric or text data in descending order (from high value to low value). You can sort a
column, a range of columns, or any data selection.
Create Series
This command fills a selection in a data window with an arithmetic, geometric, or time series of data. This
command does not generate a series in a Text column.
Transpose
This command converts columns to rows and rows to columns. For example, if a selection contains four
columns and 128 rows, it contains 128 columns and four rows after transposing the data.
Bin Data
This command provides a Histogram-like binning feature. The Bin Data dialog calculates the number of data
points within each bin, based on the number of bins and the specified data range. The results can be exported
in any one of three formats for plotting or for annotating a plot.
Statistics
This command displays the statistics for the frontmost data window. The Statistics dialog provides a split-
screen display so that any two columns within the same data window can be compared.
Student t
This command performs a t-test on selected data. KaleidaGraph provides four types of tests: the single sample
t-test, the paired t-test, the unpaired t-test with equal variance, and the unpaired t-test with unequal variance.
Mask
This command masks one or more selected cells. Masked data is not plotted or used in curve fits. In the data
window, masked data is shaded (with a stipple pattern) to make it stand out from unmasked data.
Unmask
This command unmasks any masked data in the selected region of the data window.
Show Macros
This command can be used to add new macros to the menu, remove macros already present, and rearrange the
macros. A maximum of 100 macros can be stored in this menu at once.
Note: The macros stored in the Macros menu are saved, by default, in a file called KGMacros (Windows)
or KG Macros (Macintosh). This file is loaded each time you start KaleidaGraph. To open a custom
file, use the Open or Import commands in the File menu.
Edit Macros
You can use this command to edit macros currently listed in the Macros menu.
Library
This command displays the contents of the current library. The library is a place where you can enter aliases
or shorthand references for functions, variables, and constants. For more information on using the library, refer
to Section 5.8.
Default Macros
This section describes the default macros that are supplied with KaleidaGraph. If these macros are not listed
in the Macros menu, see the troubleshooting section in the online help for instructions on adding them to the
menu.
• Filter - This macro eliminates outliers from a varying curve. It computes a moving-average curve
with a user-defined window size as the reference curve for comparison against the data.
• Smooth - This macro computes a moving average of a curve. The resulting column of data is the
average of the n-points surrounding the current data point. In this macro, n must be odd.
• Simplify - This macro masks any consecutive data points that do not differ from the last unmasked
value by a certain error. Notice that this is the opposite of what the Filter macro does.
• Invert Mask - This macro masks unmasked data and unmasks masked data.
• Integrate - Area - This macro finds the area under a curve, given a lower and upper limit and X-Y
data points describing the curve. The area is found by calculating the sum of the trapezoids formed
by the data points and, if necessary, interpolating the points forming the lower and upper limits.
• Integral - Curve - This macro finds the incremental area under a curve, given the X-Y data points
describing the curve. The macro then generates a new curve. The area is the sum of the trapezoids
formed by the data points and the reference value.
• Derivative - This macro finds the incremental slope of a curve, given the X-Y data points describing
the curve. The macro then generates a new curve. The slope is calculated using the two-point slope
formula.
• Series - This macro creates the series: xo, 2*xo, 3*xo, ... (by default, xo=1).
• Unit Series - This macro creates the series: xo, 1+xo, 2+xo, ... (by default, xo=1).
• π Series - This macro creates the series: –π/2, ..., –ε, +ε, ..., +π/2 (where ε=π/(# of selected rows)).
• Sinc (5x) - This macro creates a column containing sin(5x)/(5x).
• abs(x) - This macro takes the absolute value of the selected column and replaces the column in place
• Random# - This macro generates a series of random numbers between a lower and upper limit. The
resulting series of numbers is stored in column 0.
Other Macros
The following macros are not in the default Macros file, but are stored in the Macro Source folder as text files.
You may load these files into the Macro Calculator using either the File > Import > Program Text command
or the Open command in the program editor of the Macro Calculator.
• View General - This macro displays the results of the previous General curve fit.
• View Covariances - This macro displays the covariances of the previous General curve fit.
• Paste Covariances - This macro places the covariance/correlation matrix of the previous General
curve fit in the selected region of the data window. A group of cells must be selected before executing
this macro.
Plot Color
This command controls the frame, grid, interior, and background colors of the plot. If None is selected for the
interior or background color, that portion of the plot is transparent.
X Label Format
This command controls the format of the labels on the X axis.
Y Label Format
This command controls the format of the labels on the Y axis.
Y2 Label Format
This command controls the format of the labels on the Y2 axis.
X2 Label Format
This command controls the format of the labels on the X2 axis.
Text Options
This command controls several options associated with text labels, including the default attributes used for the
various labels in the plot window.
Polar Options
This command controls the grid type, data format, reference angle, and direction for Polar plots.
Probability Options
This command controls the type of distribution used in Probability plots. You can choose between a linear or
normal distribution.
Histogram Options
This command controls the bin size, reference value, and number of extra bins in a Histogram plot.
Step Options
This command controls the placement of the steps when using a Step plot.
Up
This command moves one or more selected objects forward one level in the object order of a plot or layout
window, changing the draw order of the objects.
Bring To Front
This command moves one or more selected objects in front of all other objects in a plot or layout window,
changing the draw order of the objects.
Down
This command moves one or more selected objects backward one level in the object order of a plot or layout
window, changing the draw order of the objects.
Send To Back
This command moves one or more selected objects behind all other objects in the plot or layout window,
changing the draw order of the objects.
Group
This command combines two or more objects into a single object.
UnGroup
This command separates a previously grouped object into its original components.
Edit Object
You can use this command to edit text, arrows, polygons, Bezier curves, tables, and plot axes. If a different
type of object is selected when you choose this command, a beep sounds to let you know that the selected item
cannot be edited.
Edit Colors
You can use this command to edit the colors on the palette, save a custom color file, load a saved color file,
or print the current palette. You can also reset the palette to its original defaults using this command.
Edit General
This command can be used to add new fits to the submenu, remove fits already present, and rearrange fits. A
maximum of 16 curve fits can be stored in this submenu.
Library
This command displays the contents of the current library. One of the main reasons for using the library is to
form aliases or shorthand references for functions, variables, and constants. This is particularly useful for
defining sections of a formula that exceed the 256 character limit in the Curve Fit Definition dialog for the
General curve fit. Section 9.5.6 provides some examples for defining curve fit equations in the library and
calling the definitions from the Curve Fit Definition dialog.
Note: Do not use the library to open text files containing saved curve fit definitions. These should be opened
from within the Curve Fit Definition dialog.
Select Plot
You can use this command to place plots into the layout window. If you want to replace a plot or empty cell
in the layout, click the item to be replaced and choose a plot from the Select Plot submenu.
Arrange Layout
You can use this command to arrange the plots in the layout window by specifying the number of rows and
columns you want to have. The layout window is divided into equal sections, with each plot occupying one of
the divisions. The plots are arranged in the order they were added to the layout window, starting at the top of
the page and working down from left to right.
Set Background
You can use this command to set a background and border for the layout window.
Show Data
This command can be used to bring any data window to the front.
Show Plot
This command can be used to bring any plot window to the front.
Show Layout
This command brings the selected layout window to the front. Each time you open or create a layout, it is
added to the Show Layout submenu.
If a default layout has been saved (in the KG Layout settings file), this submenu will always contain an item
called KG Layout. It is not possible to permanently add layouts to this submenu. They are only remembered
until you quit the program.
Clipboard
This command displays the Clipboard window, which contains the last item that was cut or copied. The
contents of the Clipboard remain intact until another selection is cut or copied. The contents also remain when
switching between programs. This allows you to easily transfer selections between programs.
Macro Calculator
This command displays the Macro Calculator. The calculator combines the RPN (Reverse Polish Notation)
programming language with support for 1000 program steps to give you a number of ways to manipulate and
transform data. Refer to the online help or the Macro Calculator online manual (on the CD-ROM) for more
information on the Macro Calculator.
Formula Entry
This command displays the Formula Entry window. See Chapter 5 for information on using the Formula Entry
window.
Plot Script
This command can be used to create a number of plots at once that all have the same characteristics. See
Section 6.4.3 for information on using the Plot Script command.
Menu Shortcuts
This command can be used to add or change keyboard shortcuts for commands in KaleidaGraph. These
shortcuts are saved as part of the Macros file.
Rename
This command can be used to edit the name of the data, plot, or layout window, without having to save it to
disk.
Appendix B
KaleidaGraph maintains four settings files to save the modifications made to the program. These files are
opened each time you start KaleidaGraph, provided they are in the correct location and have the correct file
name. If a settings file has a different name or is located in a different directory, the file is skipped.
A default Style file is automatically opened each time KaleidaGraph is started. This way you can save the
settings and have them opened the next time you use the program. The name and location of this file differs
between the Windows and Macintosh versions of KaleidaGraph.
• Windows: The default settings file is named KGStyle. This file must be in the same directory as
KaleidaGraph for it to be opened.
• Macintosh: The default settings file is named KG Style. This file must be in the Preferences folder
(System Folder) or in the same folder as KaleidaGraph for it to be opened.
Custom Style files can be created by choosing File > Export > Style. These files can be opened by choosing
Open or Import > Style from the File menu. All of the settings change to reflect the contents of the new
Style file.
A default Macros file is automatically opened each time KaleidaGraph is started. This way you can save the
settings and have them opened the next time you use the program. The name and location of this file differs
between the Windows and Macintosh versions of KaleidaGraph.
• Windows: The default settings file is named KGMacros. This file must be in the same directory as
KaleidaGraph for it to be opened.
• Macintosh: The default settings file is named KG Macros. This file must be in the Preferences
folder (System Folder) or in the same folder as KaleidaGraph for it to be opened.
Custom Macros files can be created by choosing File > Export > Macros. These files can be opened by
choosing Open, Import > New Macros, or Import > Append Macros from the File menu. All of the affected
menus and options change to reflect the contents of the new Macros file.
A default Layout file is automatically opened each time KaleidaGraph is started. This way you can save a
layout and have it opened the next time you use the program. You can access the default layout by choosing
Windows > Show Layout > KG Layout. The name and location of this file differs between the Windows and
Macintosh versions of KaleidaGraph.
• Windows: The default settings file is named KGLayout. This file must be in the same directory as
KaleidaGraph for it to be opened.
• Macintosh: The default settings file is named KG Layout. This file must be in the Preferences
folder (System Folder) or in the same folder as KaleidaGraph for it to be opened.
Custom Layout files can be created by choosing Save Layout or Export > Layout from the File menu when
a layout window is active. These files can be opened by choosing Open or Import > Layout from the File
menu. The layout opens into a new window, displaying any items that were saved as part of the layout.
If one has been created, a default Script file is automatically opened each time KaleidaGraph is started. This
way you can save the plot script and have it opened the next time you use the program. The name and location
of this file differs between the Windows and Macintosh versions of KaleidaGraph.
• Windows: The default settings file is named KGScript. This file must be in the same directory as
KaleidaGraph for it to be opened.
• Macintosh: The default settings file is named KG Script. This file must be in the Preferences folder
(System Folder) or in the same folder as KaleidaGraph for it to be opened.
Custom Script files can be created by choosing Save Script or Export > Script from the File menu when the
Plot Script window is active. These files can be opened by choosing Open or Import > Script from the File
menu. The Plot Script window changes to reflect the contents of the new Script file.
Appendix C
This chapter lists the shortcuts available for selecting plot tools and making changes to plot elements directly
from the toolbox. The online help contains information about the other kinds of shortcuts available in
KaleidaGraph.
To: Press:
3. Turn on Swap X & Y to exchange the X and Y axes or No Axis to remove the selected axis and its
tick marks.
3. Choose Log or Linear to change the axis scaling, turn on Reverse to reverse the axis, or turn on
AutoScale to return to the limits originally calculated by KaleidaGraph. The rest of the options are
discussed in Sections C.2.4–C.2.6.
3. Choose Major or Minor to display a submenu that contains the tick mark options. The submenus
for Major and Minor are identical.
4. Use the Inside and Outside commands to change how the ticks are displayed. Turn on Auto to have
KaleidaGraph calculate the number of tick marks displayed on the selected axis.
3. Choose Major or Minor to display a submenu that contains the grid line options. The submenus for
Major and Minor are identical.
4. Turn on Grid to display a gray (dotted) line or Solid to display a solid line. If both items are turned
off, grid lines are not displayed.
3. Choose # Format to display a submenu that contains the display options. The options in the submenu
depend on the format of the data plotted along the selected axis. The following three figures show
the submenus that appear for Numeric (Float, Double, or Integer), Date, and Time formats.
Using these options, you can change the format of the axis labels as well as display trailing zeros,
commas, a prefix, or a suffix. Changes are based on the current settings in the appropriate Label
Format dialog (Format menu).
4. Make the desired changes to the submenu.
3. Select a different marker type, size, or number from the pop-up menu.
3. Turn on either of the commands in this pop-up menu to make that portion of the plot transparent.
The first icon controls the frame and grid color. It consists of two sections: a frame
color icon (upper left) for setting the plot’s frame color, and a grid icon (lower right)
for setting the grid color.
2. Click one of the icons in the palette to display a color palette containing the color choices.
Any text objects that you create with the Text tool have these attributes. The attributes that you set are saved
as part of the Style file. You can also use the Text Options command (Format menu) to set the defaults for
standard text labels.
Appendix D
This chapter provides information on the methods and equations used in different areas of the program.
Note: Outliers are used in the calculations for the Box plot. Removing outliers changes the entire plot. You
do not have any control over the marker used to represent outliers.
Outlier
Figure D-1 Box plot terms
• Median - The data value located halfway between the smallest and largest values.
• Upper Quartile (UQ) - The data value located halfway between the median and the largest data
value.
• Lower Quartile (LQ) - The data value located halfway between the median and the smallest data
value.
• Interquartile Distance (IQD) - The distance between the Upper and Lower Quartiles (UQ - LQ).
• Outliers - Points whose value is either:
greater than UQ + 1.5 * IQD or less than LQ - 1.5 * IQD
Skewness Kurtosis
n n
1 1
--- ∑ ( x i – x ) 3 --- ∑ ( x i – x ) 4
n n
i=1 i=1
---------------------------------------------
- ----------------------------------------- –3
n n
1 3/2 1 2
--- ∑ ( x i – x ) --- ∑ ( x i – x )
2 2
n
i=1 n
i=1
x A – xB
t = -----------------
sD
x A – xB
t = -----------------
sD
∑i ∈(Axi – x A ) + ∑ ( xi – xB )
2 2
i∈B
- ------- + -------
1 1
sD = -------------------------------------------------------------------------
N A + NB – 2 N A N B
x A – xB
t = ------------------------------------------------------------------------
-
Var(x A) ⁄ N A + Var(x B) ⁄ N B
Correlation
∑ ( xi – x ) ( yi – y )
i
---------------------------------------------------------------
∑ ( xi – x ) 2 ∑ ( yi – y ) 2
i i
F value
Larger Variance
-----------------------------------------
Smaller Variance
∑ ( xi – x ) ( yi – y )
i
R = ---------------------------------------------------------------
∑ ( xi – x ) 2 ∑ ( yi – y ) 2
i i
χ2
R = 1 – ---------------------------------
∑ σi ( yi – y ) 2
i
Chi Square
yi – f ( xi )
∑ ----------------------
-
2
χ2 =
σi
i
Align tool: A tool used to align a group of selected objects in the plot or layout window.
anchor point: An endpoint on a segment of a Bezier curve. Anchor points contain direction points and tangent
lines. The position of the anchor points and their direction points determine the shape of the curve segment.
anchor tick: The anchor tick specifies the value from which all other major tick marks are calculated. When
placing major ticks at a specific interval, the interval is counted from the value of the anchor tick. This tick
does not have to be at the edge of the axis; it can be placed anywhere.
AppleScript: A system-level scripting language available on the Macintosh. It is used to automate processes
within programs that support AppleScript.
Apple Event: A system-level command sent between programs. The command tells the destination program
to perform a specific operation.
Arc tool: A tool used to draw arcs in the plot or layout window.
axis: One of the horizontal or vertical lines in a plot along which values or categories are plotted.
axis labels: Labels that display the values associated with the major tick marks on the plot.
axis titles: Titles that are used to identify which variable is plotted along an axis. The titles are taken from the
column names being plotted. If multiple variables are plotted on the same axis, the title comes from the first
column being plotted.
background color: The color KaleidaGraph uses to represent white pixels in fill and pen patterns.
Bezier curve: A curve made up of one or more segments. Each segment is defined by four points: two anchor
points, which determine the endpoints, and two direction points, which determine its shape.
Boolean: A value that results from evaluating an expression. The value can be either true (non-zero) or false
(zero).
Box tool: A tool used to draw squares and rectangles in the plot or layout window.
cell: The basic unit of a data window where values are entered and stored.
Chooser: This command is located in the Apple menu on Macintosh computers. It is used to select the active
output device.
Clipboard: A window that contains the last selection that was cut or copied. The contents remain until the
next time you cut or copy a selection.
289
KaleidaGraph
column: In the data window, a vertical line of cells. A maximum of 1000 columns are available. In a column
plot, columns are the vertical bars that represent the data values.
column numbers: The numbers located to the left of the column titles, used to identify each column. The
column numbers are used by Formula Entry and the Macro Calculator during calculations. These numbers
change when a selection is made in the data window.
Command key: This key ( ) enables you to use keyboard shortcuts to choose commands on a Macintosh
computer.
Ctrl key: This key enables you to use keyboard shortcuts to choose commands under Windows.
curve fitting: The process of applying one of 10 different types of fits to a variable in the plot window. The
fits can be used to find an equation for the data, to smooth the curve between the points, or to see how closely
the data compares to a specific equation.
Data Selection tool: A tool used to select a portion of the data on a plot for further plotting and analysis.
data window: A window containing a spreadsheet used to enter and store data for plotting and analysis.
default settings: Settings that KaleidaGraph uses unless you specify different settings. You can save the
current settings as default settings by choosing File > Export > Style.
delimiter: A character used to separate data within a text file; for example, tabs, spaces, or commas.
Dynamic Data Exchange (DDE): A feature that is used to create a link between data in a source document
and a KaleidaGraph for Windows data window. If the data in the source document changes, the data window
updates to reflect the changes.
edition: The edition is what is sent by the publisher or received by the subscriber whenever an update occurs
edition file: A file created to store a published portion of a document, known as an edition. These files are
linked to the file containing the publisher and to any files which subscribe to it.
Eraser tool: A tool used to delete text and other objects (such as lines, boxes, and pictures) from the plot or
layout window.
error bars: Vertical or horizontal lines on a plot that illustrate the statistical error of the data.
extract: To retrieve the original data from a plot which was saved with data. You can use either the Extract
Data command or the Find Data button ( ) to display the plot’s data.
fill pattern: A pattern chosen from the pattern palette to fill a selected object.
290
Glossary
Find Data button: This button ( ) is located in the upper-right corner of the plot window. Clicking this
button displays data windows referenced by the plot. If the data is archived in the plot, the data windows are
extracted and displayed.
foreground color: The color KaleidaGraph uses to represent black pixels in fill and pen patterns.
format: How the data in a column is displayed. Each column has its own format, which controls the way its
values are displayed and used in a plot.
formula: A sequence of values, column references, memory references, functions, or operators that generate
data from existing data.
Formula Entry: A window that is used to enter and execute algebraic formulas which operate on the active
data window.
formula script: A program written in the Posted Note of the Formula Entry window. Formula scripts can
automate the process of opening data, creating plots, and exporting plots to disk or to a printer.
frame: The line surrounding a bar, column, pie wedge, legend, or object in the plot or layout window.
grid lines: Horizontal or vertical lines that may be displayed at the major and minor tick marks.
group: To combine two or more objects so that they act as a single object.
handles: Points at the corners of an object’s boundary which can be used to modify the size and shape of the
object.
Home button: This button ( ) is located in the upper-left corner of the data window. Click this button to
return the data window to its origin (row 0, column 0).
insertion point: The blinking vertical line that appears whenever you click within a cell or a text dialog.
justification: The method used to align text and labels. You can left, center, or right justify text and labels.
layer: A separate part of the plot window used to organize objects. You can create plots with several layers,
with each layer containing different objects.
Layout window: A window used to place multiple plots on a single page. Text, tables, and other objects may
be placed anywhere in the layout window. The page may be copied to the Clipboard, saved in a variety of
formats, or printed.
legend: The portion of the plot that contains symbols and labels used to identify each variable in a plot.
library: Used to create and store shorthand references for functions, curve fits, constants, and variables.
291
KaleidaGraph
Line/Arrow tool: A tool used to add lines or arrows to the plot or layout window.
macro: An RPN program that performs a series of calculations on the active data window.
Macro Calculator: An RPN calculator which can be used to write and execute macros that operate on the
active data window.
major ticks: Marks that display the major divisions along an axis.
marker: A symbol which represents a single data point in the plot window.
Metafile: A Windows file format used by graphics programs to transfer documents to different programs.
minor ticks: Minor ticks display the divisions between the major tick marks.
object handles: Small squares that appear when an object is selected. The object can be resized by dragging
these handles.
Object Linking and Embedding (OLE): A feature that can be used to embed a KaleidaGraph for Windows
plot in another application. To edit an embedded plot, double-click the plot to start KaleidaGraph and make
changes.
Oval tool: A tool used to draw circles and ovals in the plot or layout window.
overlay: To place multiple plots on top of each other in the layout window to get the appearance of a single
plot.
PICT: A Macintosh file format used by graphics programs to transfer documents to different programs.
plot script: A series of data selections from any number of data windows that are used to create multiple plots
at once. A plot script is created in the Plot Script window.
plot title: The name of the graph. By default, its name is taken from the name of the data window.
plot window: Any window that contains a plot. Plots are created by choosing a plot type from the Gallery
menu. When the plot window is active, certain menus are displayed that only affect the plot window.
Polygon tool: A tool used to draw an object with any number of sides in the plot or layout window.
Posted Note: A text editor available in both the data and Formula Entry windows. In the data window, it is
used to enter information about the current data set. In Formula Entry, it can be used to write a multi-line
formula or a script to automate the plotting process.
residual: The difference between an actual data value and a mean or other estimated value.
Rounded Rectangle tool: A tool used to draw squares and rectangles which have rounded corners.
292
Glossary
row: A horizontal line of cells. A maximum of 1 million rows can be displayed in the data window.
row numbers: The column of numbers that appear on the left side of every data window.
Selection Arrow: A tool used to select, move, and resize objects. This tool is also used to select an object’s
properties from pop-up menus.
shift-click: To click the mouse button while pressing Shift. This technique is used to select multiple objects
or deselect individual objects.
sort key: A column that contains the values you want to sort by. You can specify three sort keys at a time for
each sort.
Table tool: A tool used to create tables of data within the plot or layout window.
template: Any plot that is used as a base for creating new plots. The new plot has the same characteristics as
the template.
Text tool: A tool used to create and edit labels in the plot or layout window.
tick marks: The lines which indicate the major or minor increments along an axis.
toolbox The floating window which displays the tools available to create and edit items in the plot or layout
window.
Update Plot button: This button ( ) is located in the upper-right corner of the data window. Click this
button to force an immediate update of the plot that is currently linked to it.
X axis: The horizontal axis in a plot, which usually represents the independent variable.
Y axis: The vertical axis in a plot, which usually represents the dependent variable.
Zoom Selection tool: A tool that can be used to quickly change the axis limits.
293
KaleidaGraph
294
Index
Symbols ^ 95
! 95 || 96
- 95 π Series macro 268
!= 96
#CLOSE command 102
Numerics
#CLOSE/ALL command 102 0o Rotation command 186
#CLOSE/OPT command 102 180o Rotation command 186
#COPY command 103 270o Rotation command 186
#DATA command 103 90o Rotation command 186
#DATA/NOTITLE command 103
#DATAFILE command 104
A
abs() function 96
#FORMULA command 104
abs(x) macro 268
#MERGEFILE command 105
active window, changing 41, 137
#METAFILE command 105
Add Rows command 44, 265
#METAFILE/OPT command 105
Add Values command 158, 163, 264
#OPEN command 106
Add Windows file extensions check box 17
#PAGE_PRINT command 106
adding
#PASTE command 106
background or border to a layout 252
#PICT command 106
comments to a formula script 102
#PICT/OPT command 107 comments to formulas 87
#PLOT_PRINT command 107 curve fits to Curve Fit menu 207
#SAVE command 107 curve fits to saved plots 208
#SCRIPT command 108 data to saved plot 156
#SELECTION command 109 empty cells to a layout 246
#SET_DIRECTORY command 110 error bars 223–233
lines to Bar/Column plots 159
% 95
plots to a layout 246
&& 96 rows and columns 44
( ) 95 subscripts and superscripts to text 185
* 95 value labels 158, 163
+ 95 Align command 180, 269
/ 95 Align tool
< 95 description 167
<= 95 using 180
= 96 aligning objects 180
== 96 All Windows check box 47
> 95 Allowable Error field 205
>= 95 Alt. Font command
? : 96 Edit Table dialog 172
[ ] 88, 96 alternate font 46
295
KaleidaGraph
296
Index
297
KaleidaGraph
298
Index
299
KaleidaGraph
300
Index
301
KaleidaGraph
302
Index
303
KaleidaGraph
using Formula Entry 35–36 Import command 16, 136, 235, 258
using the layout window 33 importing
data files 16
H graphic files 235–236
Help 18 layout files 255
Help files missing data 54
location 18 plot script files 136
plots 16
Hide All Plots command 137, 272
plots into layout window 246
Hide Borders command ??–76, 77–??, 242–243, 262 text files 53–60
Hide Window command 41, 137, 271 text files using Special format 56–60
hiding increasing number of curve fit points 222
axis 143, 276 independent t-test 71
data windows 41 index() function 97
equations 263
initial conditions 204
grids 138, 255
legend 263 inorm() function 97
plot title 263 Insert Column command 45, 265
plot windows 137 Insert Columns command 171
ruler 138, 255 Insert Mode command 43, 264
High/Low plot 117 Insert Row command 45, 265
Histogram Options command 119, 269 Insert Rows command 171
Histogram plot 119 inserting
Home button 12, 42 OLE objects 239
Horizontal Bar plot rows and columns 45
adding lines 159 installing KaleidaGraph 8
adding value labels 158 int() function 97
changing column offset 157 Integral - Curve macro 267
customizing 157–159 Integrate - Area macro 267
description 120
interior color, editing 152, 282
removing column frame 157
interp() function 99
I Interpolate curve fit
icons data restrictions 199
description 199
Color 139, 194, 252
reference 288
Pattern 139, 194, 252
Style 140, 195, 252 interpolating data 89
toolbox 167 interval 146
Axis Options 168 invcos() function 97
Color 167–168 Invert Mask macro 267
Fill Pattern 168 invsin() function 97
Marker 168 invtan() function 97
Pattern 167
Style 167
Variable Color 168
J
Identify tool JPEG files
description 167 exporting 238
using 173 importing 235
if-else function 96 justification
304
Index
305
KaleidaGraph
parameters 214 M
lin() function 99 Macro Calculator 216
Line plot 115 Macro Calculator command 272
line style macro files 208, 273
curve fit 151 macro() function 100
legend 140
macros
objects 195
variable 151, 281 using 72–74
Line tool Macros menu 267–268
description 166 magnification level 138, 255
using 188–189 major
line width grids 147
curve fit 151 tick marks
legend 140 changing display 145, 277
objects 195 changing intervals 146
variable 151, 281 description 15
number of 146
linear
making
interpolation 89, 98
scaling 143, 276 notes about the data 48
selections 43
Linear Correlation Coefficient 218
Marker Size field 151
Linear curve fit
markers
description 198
forcing through origin 222 number displayed 151, 280
function 198 opaque 151
reference 287 size 151, 280
transparent 151
lines
type 151, 280
adding to Bar/Column plots 159
Mask command 65, 266
creating 188
editing 189 mask() function 89, 100
Lines Skipped field 54 masking data 65, 89, 174
Link Error Bars check box 228 master curve fit list 207–208
Link Options command 76, 262 matrix operator 88, 96
Link Text To Variable Color check box 141, 151 Max field 142
Link To pop-up menu 144 mean difference 72
linking mean equation 286
axes 144, 277 mean() function 98
data 75 median() function 99
ln() function 97 memory registers 84, 216
log() function 97 Menu Shortcuts command 272
Logarithmic curve fit Merge command 257
data restrictions 198 Metafile images
description 198 exporting 238
function 198 importing 235
reference 287 Min field 142
logarithmic scaling 143, 276 Minimum Column Size field 172
logr() function 99 Minimum Row Size field 172
306
Index
307
KaleidaGraph
308
Index
309
KaleidaGraph
Q description 166
using 189
Quit command 22, 259
rounded rectangles
quitting KaleidaGraph 22
creating 189
editing 190
R
rounded squares
R 218
creating 189
R equation 288
editing 190
R2 218
row numbers 13
radial axis 160
rows
ran() function 98
adding 44
Random# macro 268 compressing 265
Read Titles check box 54 deleting 45
rearranging the master curve fit list 207 inserting 45
Recent Files command 16, 259 selecting 43
rectangles transposing data 64
creating 189 rsum() function 98
editing 190 ruler 138, 255
Redo command 260 Ruler & Grids command 138, 255, 264
refreshing the layout 256 running sum 98
removing
axis 143, 276 S
axis labels 149 Same as Plot Window setting 248
curve fit 220 Save As command 258
curve fit from master list 208 Save command 258
error bars 232 Save Data As command 74, 258
frame in Pie chart 162
Save Data command 74, 258
outliers 173
Save Graph As command 236, 258
Rename command 272
Save Graph command 236, 258
renaming
Save Layout As command 255, 258
data windows 272
layout window 272 Save Layout command 255, 258
plot windows 272 Save Script As command 258
residuals 220 Save Script command 136, 258
resizing saving
axis 153–154 changes to Curve Fit menu 208
legend 178 data 74
objects 178 formula scripts 101
plot 153–154 layout files 255
plot frame 153–154 multi-line formulas 87
Reverse check box 143 plot script files 136
plots
Right Justification command
with data 236
Edit String dialog 186 without data 236
Edit Table dialog 171 plots via a plot script 135
RMS equation 286 text files 74
rms() function 99 See also exporting
Rounded Rectangle tool scaling 143, 276
310
Index
311
KaleidaGraph
312
Index
313
KaleidaGraph
W
Weight Data check box 205, 213
Weighted curve fit
data restrictions 199
description 199
reference 287
weights 205
wgt() function 100
width 47
Windows BMP files
exporting 238
importing 235
Windows menu 271–272
windows, renaming 272
X
X Label Format command 149, 268
X2 Label Format command 149, 268
X-Y Probability plot 118
Y
Y Label Format command 149, 268
Y2 Label Format command 149, 268
Z
Zoom Selection tool
description 167
panning 176
using 175–176
zoom setting 14, 138, 255
314