WinGraph Help Contents

WinGraph Help

To learn how to use Help press F1

WinGraph Help

Introduction to WinGraph

Introduction

Overview

Graphs

Histograms

Getting Started

Reading Files

Editing Data

Plotting Data

Fitting Data

Printing

Saving Data and Plots

The WinGraph Windows

WinGraph Window

File Open Dialog

Graph Data Window

File Open Dialog

Save As Dialog

Select Data Dialog

Histogram Data Window

File Open Dialog

Save As Dialog

Select Data Dialog

Plot Window

Save As Dialog

Page Setup Dialog

Printer Setup Dialog

Options Dialog

General Options

Axis Options

Line Options

Fit Result Options

Text Options

Number Options

Fit Parameters Dialog

Print Preview Window

Page Setup Dialog

Printer Setup Dialog

How to do it

Importing Plots into Word

Exchanging data with Excel

Fixing Fit Parameters

Removing Points from Fits

Rebinning Histograms

Resizing the Plot

Creating Data Files in Fortran

WinGraph Reference

Statistical Information

File Formats

Bitmaps and Metafiles

Revision History

Installation


Plot Window: Options Menu

The Options Menu allows you to customise the way the plot looks.

General Options

Axis Options

Line and Fill Options

Fit Results Options

Text Options

Number Options


Text Options Dialog: Titles

Global Title

Type the text that you wish to appear above the plot as a global title in the box or click on the underlined down arrow to drop down a list of titles from the datasets you are plotting. The default is to take the title from the first dataset to be plotted.

X Axis Title

Type the text that you wish to appear under the plot as the X axis title in the box or click on the underlined down arrow to drop down a list of titles from the datasets you are plotting. The default is to take the title from the first dataset to be plotted.

Y Axis Title

Type the text that you wish to appear to the left of the plot as the Y axis title in the box or click on the underlined down arrow to drop down a list of titles from the datasets you are plotting. The default is to take the title from the first dataset to be plotted.


Revision History

Version 3.3

3.3d 07/01/97Fixed problem with clipping causing Metafiles not to print properly from Word.

Fixed crash when spline fitting after another type of fit.

Improved fit error handling.

Remove fit if data edited afterwards to prevent problems.

Fixed ordering of points for spline fit.

Fixed starting values for step function fit.

3.3c 28/10/96Automatically open file if given as command line argument.

Fixed background colours in Options Dialogs.

Fixed problems with titles not being updating after editing.

3.3b 29/09/96Fixed problems with fit results remaining after switching to log scale.

3.3a 22/09/96New features:

Allow fit parameters to be fixed

Added Gaussian, Sine and Step Function fits.

Added Printer Setup Dialog

Bugs fixed:

Fixed problem of options being reset after print preview or resizing.

Fixed printing code which didn’t work with some printers.

Version 3.2

3.2f 01/02/96Fixed paste to Write and Notepad applications.

3.2e 31/01/96Increased default column widths.

Increased size of cursor position panel.

Fixed bug causing overflow with large numbers in graph data grid.

3.2d 28/01/96Proper Help file released.

Change cursor to hourglass while opening, rebinning and fitting.

Sorted out various cut and paste problems especially to and from Excel.

Include (N-1) factor in Standard Deviation

Fixed tab inside Histogram editing grid.

Fixed problem with toolbar when read error message box activated.

3.2c 04/12/95Released updated version.

Fixed problem with vertical size during direct printing from Plot Window.

Added secondary labels options to Axis Options to solve problem of no axis

labels when less than 1 decade on a log scale.

3.2b 03/12/95Further updated version - not yet generally released

New features:

3D and 2D Histogram styles available for graphs as well as

histograms.

Added General Options to customize general layout.

Added Text Options to change fonts, titles, text colours etc.

Plot Titles can be independent of what is on each dataset.

Added Number Options to change number of significant figures etc.

Moved some of Fit Result Options into Text and Number Options.

Extended Axis option to change tick mark lengths.

Bugs fixed:

Metafiles not created properly.

3.2a 30/10/95Interim updated version- not yet generally released.

New features:

Added dot symbol style.

Changed crosses and plus signs to thin crossed lines.

Added proper Page Setup Dialog.

Printing in Landscape mode now supported.

Changed Save and Save As in Plot Menu to Save Plot etc.

Increased maximum allowed points to 1999.

Added symbol customization to Plot Window toolbar.

Improved error handling while reading files.

Bugs fixed:

Wrong toolbar displayed after closing all datasets.

Crashed when closing several datasets.

Incorrect scaling of plot to full page.

Incorrect default .wmf extension when saving plots.

Crashed with log scales when all values zero.

Version 3.1

3.1g 9/10/95Fixed bug in previous spline fit reordering.

Fixed potential problem of spline fitting data with more than one point at

the same x.

Fixed problem that modified flag was set after reading data read from a file

so prompting save at end even if no mods made.

Suppressed chisq and NDOF for data without errors.

Fixed problem with significant figures for numbers close to zero.

3.1f 5/10/95Fixed problem that save did not use WinGraph format even

if previous Save As did.

Fixed problems with row numbers when changing the number of

histogram data columns.

3.1e 3/10/95Ordered data before spline fitting to avoid problems if

data is unordered.

3.1d 30/9/95Added Help Buttons to Open and Save As Dialogs.

Added default filenames to Save As Dialog

3.1c 26/9/95Fixed problems with histogram binning.

Limited number of tick marks on histograms.

Removed a debug message.

3.1b 25/9/95Fixed problems saving histograms.

3.1a 24/9/95Completely new version released. Main new features:

Completely new Histogram part.

Histograms and Graphs better integrated.

Polynomial and Spline fits added

Toolbar and Tooltips added

More customisation allowed

Special WinGraph file format introduced

Version 2.0

2.0f 28/2/95Fixed problems with -ve x values.

2.0e 30/1/95Fixed error when reading files with x errors.

2.0d 29/1/95Fixed problem plotting multiple graphs with different numbers of points.

2.0c 21/11/94Fixed errors on intercept and gradient if no y errors.

2.0b 14/11/94Fixed problems with axis labels.

2.0a 17/10/94Fixed problems with opening files.

Fixed problems with logs of -ve numbers.

2.0 8/11/94First released version

Version 1.0

1.0 5/3/94 First trial version.


.topic 10000
This is the first popup test

.topic 10001
This is the second popup test with
two lines.


about.htm

 This is help for About PhysPlot This is the first popup
This is the another


Fitting

Fitting Data

You can perform a number of simple fits to any Graph Data displayed in the Plot Window You choose the relevant option from the Fit Menu. The fit will be applied to all datasets currently displayed. If you want different fits to each dataset you have to plot and fit them one at time and plot them together again afterwards. You can delete a fit by choosing Delete Fit from the Fit Menu.

Straight Line Fit

The data are fit using the expression:

y = mx + c where m is the gradient and c is the intercept on the y axis.

If you want to fit an exponential curve, choose Log Y from the Display Menu first and then fit a straight line. The intercept given will be the Log to the base 10 of the intercept.

Polynomial Fit

The data are fit using the expressions:

y = a0 + a1 x + a2 x^2(Quadratic)

y = a0 + a1 x + a2 x^2 + a3 x^3(Cubic)

y = a0 + a1 x + a2 x^2 + a3 x^3 + a4x^4(4th Order)

y = a0 + a1 x + a2 x^2 + a3 x^3 + a4 x^4 + a5 x^5(5th Order)

with coefficients a0, a1, a2, etc.

Gaussian Fit

The data are fit using the expression:

y = a + b exp(-0.5((x-μ)/σ)²)

where a is the baseline, b is the height, μ is the mean and σ is the half width.

Sine Wave Fit

The data are fit using the expression:

y = a + b sin(2π/λ + φ)

where a is the baseline, b is the amplitude, λ is the wavelength and φ is the phase in radians. The same fit can be used to fit a with a cosine instead of a sin if the phase difference of π/2 is taken into account.

Step Function Fit

The data are fit using the expression:

y = a + 0.5*(b - a) (1 + tanh(σ(x -μ)))

where a is baseline to the left of the step, b is baseline to the right of the step, μ is the centre of the step and σ controls the width of the step region.

Chi Squared and Degrees of Freedom

The Chi Squared per Degree of Freedom tells you how well the expression you have used, fits your data. The chi squared (γ²) is the sum of the squares of the differences between the y value of the data at each x value and the y value calculated from the fit function at that x value, divided by the square of the y error at that x value.

i.e.

γ² = Σ (yi - f(xi)) / dyi)²

where the sum runs over each data point (xi, yi), dyi being the y error at that point. f(x) is the fit function as described above. If your data do not have y errors then each data point is assigned the same error so that the Chi Squared per Degree of Freedom (see below) is one.

The Number of Degrees of Freedom is the number of data points minus the number of fit parameters. i.e. a straight line fit through 4 points would have 4 - 2 = 2 degrees of freedom.

For a good fit the γ² divided by the number of degrees of freedom (Chi Squared per Degree of Freedom) should be about one.

Cubic Spline Fit

A cubic spline fit produces a curve which goes smoothly through all your data points. In fact it is a series of cubic polynomials joined together by equating derivatives. A so called natural cubic spline is used which has zero second derivative at its ends.

Extrapolation and Interpolation

For linear and polynomial fits you can use the coefficients determined by the fit to interpolate between data points or to extrapolate beyond the first or last data point. In general polynomial fits are only an approximation to the data and so using them for interpolation or extrapolation is somewhat dubious.

A cubic spline can be used for interpolation but diverges rapidly outside the range of the data as is useless for extrapolation.

You can determine the approximate value of your function at any value by moving the cursor over the plot in the Plot Window (the cursor changes to a cross) to the required point and reading off the x and y values in the small Position Panel at the bottom right of the window on the Information Panel. The x and y values are expressed in terms of the units of your data.

Note

If you fit your data and then change either the X or Y axes from linear to log or vica versa, the fit results will be unavailable and not drawn on the plot. If you change back without performing a new fit the results will be available again and redrawn. If you perform a new fit with the new axis settings then the previous fit results will be lost.

Previous: Plotting Data

Next: Printing


Resize Button

Resizes the current WinGraph Window. If the window is smaller than full size it returns it to full size otherwise it reduces it.


Bins

Provides information about the current binning. The values can be fixed by clicking in the boxes or changed by typing new numbers in the boxes. See Rebinning Histograms for more details.


Graph Data Window: Toolbar Buttons

Allows shortcuts to the most common commands.

New Graph Data

New Histogram Data

Open

Save

Cut

Copy

Paste

Plot This

Plot All

Help


Log X

Plots the data using a logarithmic X axis. Previous fit results will be hidden.


Log Y

Plots the data using a logarithmic Y axis. Previous fit results will be hidden.


Rebinning Histograms

While you enter Histogram data, WinGraph will attempt to adjust the binning automatically. Normally the number of bins is kept constant and the lower limit and upper limit adjusted so that all the data is contained between them. The bin width is then obtained by dividing the difference between the lower and upper limits by the number of bins. Since this does not in general give nice values for the bin widths some adjustments are made to some or all of these parameters.

Sometimes this algorithm does not work very well or you might not like what it has done. In this case you can intervene manually.

Clicking in one of the boxes that display the bin parameters will fix that parameter at its current value. The automatic algorithm will then continue to operate but that parameter will not be change. Similarly if you type a number in one of the boxes the parameter will be held at that value. Clearly all four parameters are not independent and only three are enough to fix everything e.g. fixing the lower limit, number of bins and bin width fixes the upper limit. Therefore once you specify 3 values the 4th will be calculated. Which is the 4th is decided by which you fixed or clicked on longest ago. e.g. if you fix lower then upper then number of bins then width the lower limit will be calculated from the other 3 regardless of what you fixed it at. In some cases adjustments may still have to be made automatically because if you fix the lower and upper limits and the bin width you might not end up with an integer number of bins. Normally the numbers are blue but any that you have fixed or changed will be red

Once you have fixed some of the parameters you can see the effect by clicking on the Rebin Button and seeing what happens in the small preview window. You can return to automatic binning at any time by clicking in the Automatic Binning box.

If the lower limit is l the upper limit is u the bin width is w and the number of bins is l then:

Bin 1 contains the number of data points with values greater or equal to l and less than l+w

Bin 2 contains the number of data points with values greater or equal to l+w and less than l+2w

Bin i contains the number of data points with values greater or equal to l+(i-1)w and less than l+iw

Bin n contains the number of data points with values greater or equal to l+(n-1)w and less than l+nw (=u)


Creating Data Files in Fortran

You can create WinGraph data files from Fortran (or any other programming language) as long as you output in the correct File Format . The following program creates a data file written in GRAPH format (the simplest).

*
*--   Example Fortran program writing a WinGraph data file.
*--   The data file is in 'GRAPH' format not native WinGraph.
*
      implicit none
      integer ndat
      parameter (ndat=10)
      real x(ndat), y(ndat), dy(ndat)
      integer n, icont
*
      data x/10.0,20.0,30.0,40.0,50.0,60.0,70.0,80.0,90.0,100.0/
      data y/ 1.0, 3.0, 5.0, 7.0, 8.0, 8.0, 7.0, 5.0, 3.0, 1.0/
      data dy/0.1, 0.1, 0.2, 0.2, 0.3, 0.3, 0.2, 0.2, 0.1, 0.1/
*
*--   Open the data file.
*
      open (2, file='wingraph.dat', status='unknown')
*
*--   Write the header information.
*--   Global, X and Y axis titles.
*
      write (2,*) 'Graph Title'
      write (2,*) 'X Axis'
      write (2,*) 'Y Axis'
*
*--   Control word and Number of data points.
*--   Control word is 1 if X errors, 2 if Y errors, 3 if both.
*
      icont = 2
      write (2,*) icont, ndat
*
*--   Now write out the data.
*
      do 10 n=1,ndat
     write (2,1000) x(n), y(n), dy(n)
 1000    format (1x, 3f8.2)
   10 continue
*
*--   Close the data file.
*
      close (2)
*
      end

The output file looks like this:

Graph Title
 X Axis
 Y Axis
            2          10
    10.00    1.00    0.10
    20.00    3.00    0.10
    30.00    5.00    0.20
    40.00    7.00    0.20
    50.00    8.00    0.30
    60.00    8.00    0.30
    70.00    7.00    0.20
    80.00    5.00    0.20
    90.00    3.00    0.10
   100.00    1.00    0.10


Graph Data Window

From the Graph Data Window you can create or edit Graph data. Click on the picture to obtain further information:

Toolbar Buttons

File Menu

Edit Menu

Plot Menu

Columns Menu

Windows Menu

Help Menu


Fit Result Options

Pops up the Fit Results Options Dialog to enable you to set some options for the way fit results are displayed on he plot.


Ten Columns

Arranges Histogram data into ten columns.


Two Columns

Arranges Histogram data into two grid columns.


Histogram Data Window: Edit Menu

The Edit Menu allows you to delete, move or copy sections of data to other parts of the editing grid or to other data windows.

Cut

Copy

Paste

Delete


HISTO

HISTO is a simple DOS based program which allows one to enter a set of data and display it as a histogram and perform statistical analysis on the data.


Row Numbers

The numbers of the rows. The order of the data is not normally important.


Save As

Pops up the File Save Dialog to prompt you for the name of a file to save the data to.


Points Style

Displays the data on the plot as points (with error bars if appropriate).


Data Grid

The area where you enter the data for your plots. Type the values into the cells and move from cell to cell using the arrow keys.


Fit Results Options Dialog: Order

Click in one of the circles to determine whether the vertical order that multiple fit results are shown is in the order of the Y values of the fitted function

At the Left of the plot.

At the Centre of the plot (default)

At the Right of the plot.


Print

Prints the current contents of the Plot Window on the default printer. To see how the plot will appear on the paper use Print Preview .


Number Options Dialog: Format

Click on the drop down list to select the type of number you wish to change the format of from

X Axis values

Y Axis values

Fit Result values

Click on one of the buttons

Significant Figures (Default)

Decimal Place

Exponential Format

to control the format of the numbers. Click on the up and down arrows of the spin box to increase or decrease the number of significant figures, decimal places etc. that are displayed. For fit results, the number of significant figures refers to the result itself, its error will be displayed with the same number of decimal places as the result.


Axis Options Dialog

Allows you to customise the axes of the plot.

X Axis

Y Axis

Command Buttons


Window System Menu

Drops down the system menu which allows you to move, resize or close the current WinGraph window or switch to other WinGraph windows.


Automatic Binning

If the box is filled then automatic binning is in operation. Click in the box if you have fixed or changed any of the bin values and wish to revert to automatic binning.


Full Page

Resizes the plot so it takes up the full width and height of the page.


Display Y Errors

Displays Y errors (if present) on the plot.


Histogram Data Window: Toolbar Buttons

Allows shortcuts to the most common commands.

New Graph Data

New Histogram Data

Open

Save

Cut

Copy

Paste

Plot This

Plot All

Help


Page Setup Dialog: Orientation

Portrait

Selects Portrait mode on the printer i.e. the paper will be larger in the vertical direction than in the horizontal.

Landscape

Selects Landscape mode on the printer i.e. the paper will be larger in the horizontal direction than in the vertical.


Menu Bar

The menu bar holds all the main menus. Click on a name to drop down the menu.


Exit

Exits WinGraph and closes down all WinGraph windows. You will be given the opportunity to save any datasets that you have not already saved.


WinGraph Area

Provides a container for the other WinGraph windows.


Help Search

Displays a dialog through which you can search the WinGraph Help file via keywords.


Page Setup Dialog: Command Buttons

Allows you to close the dialog with or without updating the values.

OK Command

Closes the dialog and updates the plot according to the values you have selected.

Cancel Command

Closes the dialog but does not update the plot.

Default Command

Sets the values to their defaults (the values they had when you started WinGraph). You must choose OK to update the plot accordingly.

Help Command

Displays the Help page for this dialog.


Cubic Fit

Fits a cubic polynomial through the data points.


Line Options Dialog

Allows you to customize the appearance of lines and fill areas on the plot.

Lines

Hatching

Shadow

Command Buttons


Symbols List

Provides a list of plotting symbols. Click on the down arrow to drop down the list and select a symbol type by clicking on it. The points in the currently selected dataset will then be plotted using this symbol.


Exchaning Data with Excel

Exchanging Data with Excel

You can exchange data with spreadsheets such as Excel.

To copy your data to Excel, select the data you wish to copy (see Editing Data for more details) then choose Copy from the Edit Menu or click on the Copy button on the toolbar. Go to your Excel worksheet and then choose Paste from the Edit Menu. The upper left cell of the selected data will appear in the current Excel cell with the others relative to it.

To copy data from Excel, in the Excel workbook select the data you wish to copy then choose Copy from the Edit Menu. Go to your WinGraph Graph or Histogram Data Window and then choose Paste from the Edit Menu or click on the Paste button on the toolbar. The upper left cell of the selected Excel data will appear in the current cell with the others relative to it.


Print Preview Window: File Menu

The File Menu allows you to print the plot or set up the printer.

Print

Page Setup

Printer Setup

Close


Display Grid

Draws a grid on the plot.


Histogram Data Window

From the Histogram Data Window you can create or edit Histogram data. Click on the picture to obtain further information:

Toolbar Buttons

File Menu

Edit Menu

Plot Menu

Columns Menu

Windows Menu

Help Menu


Text Options

Pops up the Text Options Dialog to enable you to set some options for the text that is displayed on he plot.


Landscape

Selects Landscape mode on the printer i.e. the paper will be larger in the horizontal direction than in the vertical.


Save Plot As

Pops up the File Save Dialog to prompt you for the name of a file to save the picture to.


Delete

Deletes the data in the currently selected cells.


Delete Fit

Deletes the current fit through the data.


Resizing the Plot

Before printing the plot you can resize it to any desired size. First go to the Print Preview Window and choose Size from the File menu.

You can change the orientation of the paper by choosing either Portrait (long side vertical) or Landscape (long side horizontal).

You can make the plot fill the whole page by choosing Full Page. You can make the plot fill the whole width but keep the normal aspect ratio (width is 1.5 times the height) by choosing Full Width . (Full Width has the same effect as Full Page in Landscape mode). Normal returns the plot to the default size which is approximately 15cm wide by 10cm high.

Choosing Manual pops up the Page Setup Dialog which allows you to resize the plot to any exact size you specify.

Choosing Resize superimposes four blue gridlines on the preview of the page. If you place the cursor on one of these lines and hold the mouse button down you can drag the line up and down or left and right and the plot will dynamically resize.


Close Window

Closes the current window. The window can be reopened at any time with the same data.


Normal Size

Resizes the plot on the page to its normal size. This has the same aspect ratio as plot appears in the Plot Window and takes up nearly the full with of the page.


Size List

Provides a list of symbol sizes. Click on the down arrow to drop down the list and select a size by clicking on it. The points in the currently selected dataset will then be plotted at this size. The size refers to the half side or radius of the symbol with the width of the whole plot corresponding to 100 units.


Print Preview Window: Help Menu

The Help Menu allows you to access WinGraph’s online help system.

Contents

Search

How to use Help

About WinGraph


Maximize Button

Maximizes WinGraph to full screen if you have previously resized it.


Minimize Button

Minimizes (iconizes) WinGraph. This is useful if you want to use some other application but still preserve the current situation inside WinGraph.


File Open Dialog

Allows you to select the name of the file you wish to Open

File Name

Type the name of the file you wish to Open or click on the name of a file in the list to select it. Double clicking on a name in the list will select that file and close the dialog.

List File of Type

This allows you to select which type of files are displayed in the File List.

WinGraph Files (*.wgr)- Files written in WinGraph format (the default).

GRAPH Files(*.dat)- Files written in GRAPH format.

HISTO Files (*.his)- Files written in HISTO format.

All Files (*.*) - All files.

For a detailed description of these formats refer to File Formats.

Directories

Allows you to move between sub-directories. Click on the name of a directory to display its contents in the file list.

Drives

Allows you move between different disk drives. Click on the name of a drive to display its directories in the directory list.

OK Command

Opens the file that is currently selected in the File Name Box and closes the dialog.

Cancel Command

Closes the dialog without opening any file.

Help Command

Displays this Help Page.

Read only box

This option is not used by WinGraph.


New Histogram Data

Creates a new Histogram Data Window to allow you to enter a set of numbers to be displayed as a histogram.


Plot Window: File Menu

The File Menu allows you to save preview or print the plot.

Save Plot

Save Plot As

Page Setup

Printer Setup

Print Preview

Print

Close


Not Available

This feature is not used or not available in this window.


Axis Options Dialog: X Axis

Allows you to customize the X axis of the plot.

Minimum Value

Change the value in the box to the value you want the X axis to start at.

Maximum Value

Change the value in the box to the value you want the X axis to end at.

Number of Primary Divisions

Change the value in the box to the number of Primary Divisions you want. Clicking on the up or down arrows of the spin box will increase or decrease the number by one.

Number of Secondary Divisions

Change the value in the box to the number of Secondary Divisions you want. Clicking on the up or down arrows of the spin box will increase or decrease the number by one.

Tick Size

Change the value in the boxes to change the size of the tick marks at the primary or secondary division boundaries. Clicking on the up or down arrows of the spin box will increase or decrease the number by one.

Secondary Labels

Click in the box to force axis labels to be printed at secondary as well as primary division boundaries. This is normally not desirable but can be useful if for instance a logarithmic scale is used that does not encompass a whole decade e.g. from 20 to 80. In which case no primary divisions are visible and there would be no labels if the secondary ones were not printed.


Graph Data Window: Plot Menu

The Plot Menu allows you select which datasets you want to plot.

Plot This Data

Plot Selected Data

Plot All Data

Select Data to Plot


GRAPH

GRAPH is a simple DOS based program which allows one to display various sets of data in graphical form and perform various fits to the data.


General Options Dialog: Margins

Allows you to customize the size of the area around the plot where the titles and axis labels are printed.

Top Margin

Change the value in the box to the size of the margin you want above the plot. Clicking on the up or down arrows of the spin box will increase or decrease the number by 0.1.

Bottom Margin

Change the value in the box to the size of the margin you want below the plot. Clicking on the up or down arrows of the spin box will increase or decrease the number by 0.1.

Left Margin

Change the value in the box to the size of the margin you want to the left of the plot. Clicking on the up or down arrows of the spin box will increase or decrease the number by 0.1.

Right Margin

Change the value in the box to the size of the margin you want to the right of the plot. Clicking on the up or down arrows of the spin box will increase or decrease the number by 0.1.


Position Panel

Gives the current position of the cursor in the window in the user’s coordinates system.


Confirm Button

Confirms the edits that have been made in the editing field.


Fit Flags Column

Creates or removes the editing grip column for the Fit Flags.


Rebin

Click the button to rebin if you have fixed or changed any of the bin values or reverted to automatic binning.


Display Fitted Curve

Displays the fitted curves on the plot.


Raw Data

Provides information about the current number of points and the minimum and maximum values.


Installation

Installing WinGraph

WinGraph can be freely copied by staff and students of Queen Mary and Westfield College for their own personal or educational use only. Other users should contact the author first to negotiate a licence fee.

In order to run WinGraph you need to copy the following files:

wingraph.exe

wingraph.hlp

In addition the following files need to be installed in your windows system directory:

vbrun300.dll

apiguide.dll

commdlg.dll

cbk.vbx

cmdialog.vbx

grid.vbx

msoutlin.vbx

msgblast.vbx

spin.vbx

threed.vbx

An Installation kit can be obtained from the Author if you supply a blank formatted 1.44Mb floppy disk.

WinGraph runs under Windows 3.1 or Windows 95.

The program is provided on an as is basis and the author cannot be held liable for any damage or loss of data arising from its use.

Steve Lloyd

Physics Department

Queen Mary and Westfield College

Mile End Road

London E1 4NS


Plot Window: Help Menu

The Help Menu allows you to access WinGraph’s online help system.

Contents

Search

How to use Help

About WinGraph


General Options Dialog: Positioning

Allows you to customize the positioning of the axis labels and titles with respect to the plot area.

X Axis title from X axis

Change the value in the box to determine how far from the X axis the X axis title is drawn. Clicking on the up or down arrows of the spin box will increase or decrease the number by 0.1.

X Axis labels from X axis

Change the value in the box to determine how far from the X axis the X axis labels are drawn. Clicking on the up or down arrows of the spin box will increase or decrease the number by 0.1.

Y Axis title from Y axis

Change the value in the box to determine how far from the Y axis the Y axis title is drawn. Clicking on the up or down arrows of the spin box will increase or decrease the number by 0.1.

Y Axis labels from Y axis

Change the value in the box to determine how far from the Y axis the Y axis labels are drawn. Clicking on the up or down arrows of the spin box will increase or decrease the number by 0.1.


Plot Window: Display Menu

The Display Menu allows you to control what is displayed on the plot and how.

Display Points

Display X Errors

Display Y Errors

Display Fit Result

Display Fitted Curve

Display Log X

Display Log Y

Join Points

Display Grid


Line Options Dialog: Hatching

Allows you to customize the appearance of the hatching of histograms.

Style

Select the style of hatching you prefer for filling in histograms from:

Horizontal lines

Vertical lines

Forward diagonal lines (the default)

Backward diagonal lines

Crossed horizontal and vertical lines

Crossed forward and backward diagonal lines.

Solidly filled with the chosen colour.

Colour

Select the colour you wish the hatching or solid histogram to be out of:

Black (the default)

Red

Blue

Green

Yellow

Magenta

Cyan

White (will be invisible)


Cascade Windows

Organises multiple data windows so they are stacked one behind the other on the screen.


File Save Dialog

Allows you to select the name of the file you wish to save the data to.

File Name

Type the name of the file you wish to save the data in or click on the name of a file in the list to select it. Double clicking on a name in the list will select that file and close the dialog. If you do not give a file extension then .wgr will be added and the data will be saved in WinGraph format.

List File of Type

This allows you to select which type of files are displayed in the File List.

WinGraph Files (*.wgr)- Data will be written in WinGraph format (the default).

GRAPH Files(*.dat)- Data will be written in GRAPH format.

(Graph data only)

HISTO Files (*.his)- Data will written in HISTO format.

(Histogram data only)

For a detailed description of these formats refer to File Formats.

Directories

Allows you to move between sub-directories. Click on the name of a directory to display its contents in the file list.

Drives

Allows you move between different disk drives. Click on the name of a drive to display its directories in the directory list.

OK Command

Saves the dataset in the file that is currently selected in the File Name Box and closes the dialog.

Cancel Command

Closes the dialog without saving the data to a file.

Help Command

Displays this Help Page.

Read only box

This option is not used by WinGraph.


Information Panel

Provides information or instructions about the current window.


Introduction

Introduction to WinGraph

WinGraph is a simple Graph and Histogram plotting program running under Windows. It has been developed for the first year laboratory course of the Physics Department of Queen Mary and Westfield College, University of London. The main functionality of WinGraph is based on two earlier DOS programs GRAPH and HISTO developed previously by Dick Brown.

Data is entered into a spreadsheet type editing window as either Graph or Histogram data. Any number of separate Graph Data Windows or Histogram Data Windows can be used at one time. After entering the data, selected datasets can be plotted and the results shown in the Plot Window. The appearance of the plot can be customized using the Options Dialog and the data can be fitted using simple functions such as straight lines and polynomials. The plot can either be printed directly of or displayed in the Print Preview Window which allows you to change the size and orientation before printing.

The Graph and Histogram data can be saved to files which can be read in to the program again later. WinGraph can also read data saved from GRAPH and HISTO or written from a separate program as long as it is in one of the supported file formats. Data can also be transferred from other spreadsheets such as Excel.

The plot itself can be saved in Bitmap or Windows Metafile format for later use or can be pasted directly into a word processor such as Word by copying it to the clipboard first.

Previous: Contents

Next: Overview


Page Setup Dialog: Paper Size

Allows you to specify the size of the paper in the printer. At present only A4 is supported.


Tile Windows

Organises multiple data windows so they are arrange one above another on the screen.


General Options Dialog

Allows you to customize the general layout..

Margins

Positioning

Command Buttons


4th Order Polynomial Fit

Fits a 4th order polynomial through the data points.


Plot All Data

Plots the data from all Graph or Histogram Data windows that exist, regardless as to whether they are the current window or not. This command is useful if you have several sets of data and want to plot them all at the same time.


Print Preview

Allows you to see how the contents of the Plot Window will appear on the page by opening the Print Preview Window . You can then adjust the size and position of the plot if you want to before printing it.


X Errors Column

Creates or removes the editing grid column for X Errors.


Copy to Clipboard

Copies the currently displayed plot to the clipboard. From the clipboard it can be pasted directly into another Application such as Word for Windows.


Print Preview Window: Size Menu

The Size Menu allows you to control the size and placement of the plot on the page.

Resize

Manual Resize

Normal Size

Full Width

Full Page

Portrait

Landscape


Current Cell

Displays the coordinates of the current cell being edited.


Print Preview Window

From the Print Preview Window you see how the plot will appear on the page and change its size and position if required. Click on the picture to obtain further information:

Toolbar Buttons

File Menu

Size Menu

Help Menu


Step Function Fit

Fits a step function through the data points.


Display Points

Displays the data points on the plot.


Paste

Inserts the current contents of the clipboard into the same pattern of cells starting with the currently selected cell.


Colours List

Provides a list of symbol colours. Click on the down arrow to drop down the list and select a colour by clicking on it. The object selected from the objects list in the currently selected dataset will then be drawn in this colour.


Graphs

A Graph is a plot of one quantity (Y) against another (X). Either or both of these quantities can have an error associated with it. A symbol is plotted at each value of (X,Y) and a horizontal (vertical) line indicates the extent of plus and minus the X (Y) errors if present.

For example the temperature as a function of time might be:

Time (X) : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 Hours

Temp (Y):15, 16, 17, 18, 18, 19, 19, 20, 20, 20 Degrees

Error in Temp 1, 1, 1, 1, 1, 1, 1, 2, 2, 2 Degrees

A plot of this would look something like:

Previous: Overview

Next: Histograms


Plotting Data

Once you have entered data in a Graph or Histogram Data Window (either by typing it in or opening a file) you can plot it. You plot the data either by choosing an option from the Plot Menu or clicking on one of the plot buttons on the toolbar.

If you have only one Data Window open then you can only choose to Plot This Data and that data will be displayed in the Plot Window .

If you have more than one data window there are three options:

Plot This Data

The data in the current data window will be plotted.

Plot All Data

The data from all the datasets will be plotted together. Points from different datasets will be distinguished by different symbols and colours.

Plot Selected Data

The data from selected datasets will be plotted together. You first have to select the datasets by choosing Select Data to Plot which pops up the Plot Selection Dialog .

Previous: Editing Data

Next: Fitting Data


Fit Results Options Dialog: Content

Allows you to control what is displayed in the fit results box.

Click on each box to toggle on or off the display of (a cross means on)

A0 (for polynomials), Intercept (for straight lines), Mean (for Histograms)

A1 (for polynomials), Gradient (for straight lines), Standard Deviation (for Histograms)

A2 (for polynomials), Median (for Histograms)

A3 (for polynomials), Mode (for Histograms)

A4 (for polynomials)

A5 (for polynomials)

Chi Squared per degree of freedom (graphs only)

A box around the results


Columns

The columns denote whether the values below are X values, Y values etc.


Help Contents

Displays the Contents page of the WinGraph Help file.


Text Options Dialog

Allows you to change and customize the text on the plot.

Titles

Fonts

Command Buttons


Four Columns

Arranges Histogram data into four grid columns.


Histogram Data Window: File Menu

The File Menu allows you to create new Graph or Histogram datasets, to open existing datasets, save data. close the window or to exit WinGraph.

New Graph Data

New Histogram Data

Open

Close

Save

Save As

Exit


Editing Field

The value of the current cell is displayed and can be edited by clicking in the box inserting or overwriting the values.


Page Setup Dialog: Plot Position

Width

Specifies the width of the plot in cm.

Height

Specifies the height of the plot in cm.

Left

Specifies the position of the left edge of the plot relative to the left hand edge of the page in cm.

Top

Specifies the position of the top edge of the plot relative to the top edge of the page in cm.

Normal Size

Resizes the plot on the page to its normal size. This has the same aspect ratio as plot appears in the Plot Window and takes up nearly the full with of the page.

Full Width

Resizes the plot on the page so that it takes up the full width of the page. The aspect ratio remains the same as the plot appears in the Plot Window.

Full Page

Resizes the plot so it takes up the full width and height of the page.


Plot Selection Dialog

Allows you to select which datasets to plot if you have more than one dataset.

Dataset List

Click in the little box to the left of the dataset name to select or deselect that dataset.

Select All

Selects all datasets in the dataset name list.

Select None

Clears all of the datasets in the dataset list

OK Command

Closes the dialog. The datasets you have selected will be plotted when you use the

Plot Selected Data menu command.

Cancel Command

Closes the dialog without changing the dataset selection.


WinGraph Overview

Click on any part of the diagram below for further information:

Previous: Introduction

Next: Graphs


Portrait

Selects Portrait mode on the printer i.e. the paper will be larger in the vertical direction than in the horizontal.


Removing Points from Fits

There are two ways to remove points from the fit .

  1. Whilst in the Plot Window you can click on the point you wish to remove using the left hand mouse button. If the point was previously filled with a solid colour, the colour will be removed and the point will appear as an outline only. If you then fit the data the point(s) you have clicked on will not be included in the fit. Clicking on the same point again will reinstate it. The information about removed points will be lost as soon as you close the plot window.
  2. Whilst in the Graph Data Window, select Fit Flags from the Columns menu. Put a zero in that column for every point that you wish to exclude from the fit. These points will not be included in subsequent fits to the data unless you remove the zero or set it to one.


Histograms

A Histogram is a plot which shows the frequency with which certain values of your data occur. The value of the data is usually plotted on the horizontal (X) axis and the number of times that value occurs is plotted on the vertical (Y) axis. The data is usually binned so that all values falling within certain intervals (called the bin width) are counted together.

For example, consider a class of 20 students whose ages are:

17, 18, 18, 19, 19, 19, 19, 20, 20, 20, 20, 20, 21, 21, 21, 22, 22, 23, 23, 24.

The frequency with which the different ages occur is:

17 :1, 18:2, 19:4, 20:5, 21:3, 22:2, 23:2, 24:1

Plotted with a bin with of one this would look something like:

However with a bin with of two the frequency is:

16-17:1, 18-19:6, 20-21:8, 22-23:4, 24-25:1

and the plot would look something like:

Previous: Graphs

Next: Contents


Line Options Dialog: Shadow

Allows you to customize the appearance of shadow in 3 dimensional histograms.

Style

Select the style of hatching you prefer for the shadow of 3 dimensional histograms from:

Horizontal lines

Vertical lines

Forward diagonal lines

Backward diagonal lines (the default)

Crossed horizontal and vertical lines

Crossed forward and backward diagonal lines.

Solidly filled with the chosen colour.

Colour

Select the colour you wish the shadow hatching to be out of:

Black (the default)

Red

Blue

Green

Yellow

Magenta

Cyan

White (will be invisible)

Depth

Type a value for the depth of the shadow of 3 dimensional histograms (default 2). Clicking on the up or down arrows of the spin box will increase or decrease the number by one.


Open File

Pops up the File Open Dialog which allows you to select the file you wish to open. The data from this file will then be entered into a new Graph or Histogram Data Window. You can then edit or plot the data.


Plot Window: Edit Menu

The Edit Menu allows you to copy the plot to the clipboard.

Copy to Clipboard


Statistics

Provides statistical information about your data. See Statistical Information for more details.


Histogram Data Window: Help Menu

The Help Menu allows you to access WinGraph’s online help system.

Contents

Search

How to use Help

About WinGraph


General Options

Pops up the General Options Dialog to enable you to set some general options for the plot.


About WinGraph

Pops up a small window containing information about WinGraph including the version number and how to contact the author.


Axis Options

Pops up the Axis Options Dialog to enable you to set some axis options for the plot.


Gaussian Fit

Fits a Gaussian through the data points.


Columns

The numbers of the columns. The order of the dat a is not normally important.


File Formats

WinGraph is able to save data or read data written in several formats. In all cases the data are written in free format ascii so that they can be created or edited by a text editor. The default is WinGraph format but other formats are provided for compatibility with the GRAPH and HISTO DOS programs.

WinGraph Format

File extension: .wgr

Line 1WinGraphVersion NumberType (1 = Graph, 2 = Histogram)

Line 2Data set title

Line 3x-axis label

Line 4y-axis label

Line 5Control Word Number of data points

For Graphs:

Line 6x-value 1 y-value 1 (x-error 1) (y-error 1)

Line 7 x-value 2 etc.

For Histograms:

Line 61st value2nd value etc.

Line 7 etc.

For Graphs:

The Control Word is zero + 1 if the points have x-errors and +2 if the points have y-errors

For Histograms:

The Control Word is the number of data points per line.

GRAPH Format

File extension: .dat

Line 1Data set title

Line 2x-axis label

Line 3y-axis label

Line 4Control Word,Number of data points

Line 5x-value 1 y-value 1 (x-error 1)(y-error 1)

Line 6 x-value 2 etc.

The Control Word is zero + 1 if the points have x-errors and +2 if the points have y-errors

HISTO Format

File extension: .his

Line 1Number of datasets ( = 1)

Line 2Data set title

Line 3x-axis label

Line 4y-axis label

Line 5Number of data pointsStarting bin edgeBin width

Line 61st value

Line 72nd value etc.

Note: The program HISTO can store read or write multiple datasets to a single file but WinGraph only allows a single dataset per file.

If you associate (using File Manager or Explorer) a file extension such as .wgr with WinGraph you can automatically open a dataset inside WinGraph by double clicking on the file name.


Editing Data

To plot your data you have to enter it into either a Graph or Histogram Data Window. The values are entered in the appropriate columns of the editing grid which in the lower left of the window. For Histograms it does not matter which columns are used. You enter data by clicking with the mouse in one of the cells of the grid and typing in the value you want. You can move from cell to cell using the keyboard arrow buttons. Pressing enter moves down one cell. Pressing tab moves right one cell until you reach the last column when it moves down one row and back to the first column. If you get to the last row, WinGraph automatically inserts more rows. You can adjust the number and type of columns using the columns menu.

You can replace a value completely by clicking on the cell and typing the new value. You can change the value by clicking on the cell then clicking the mouse in the small editing box above, which always contains the value of the current cell, and deleting or inserting characters as required. Clicking on the red cross will cancel the change and restore the original value. Clicking on the green tick will confirm the change as will moving to a new cell in the grid.

You can copy or remove cells by selecting one or more cells and choosing copy or cut from the toolbar or edit menu. This will copy the selected cells to the clipboard and by clicking elsewhere and choosing paste from the edit menu or toolbar you can copy them elsewhere on the grid. The upper left hand cell of the selection will be copied to the current cell with the others relative to it.

To select cells click on a cell and drag with the mouse to highlight all the cells you wish to select. You can select a whole column by clicking above it where the column number or name is. You can select a whole row by clicking to the left where the row number is. You can select the whole grid by clicking in the upper left cell above the row numbers. You can resize the cells by clicking in the top row or left hand column on the column/row boundaries and dragging the column/row.

If you are typing in a large amount of data it is advisable to save the data now and then by selecting save from the toolbar or file menu.

Previous: Reading Files

Next: Plotting Data


Outline Histogram

Displays the data on the plot as an outline histogram.


Fit Result Options Dialog

Allows you to customise the appearance of the results of a fit to the data.

Alignment

Content

Order

Command Buttons


Graph Data Window: Windows Menu

The Windows Menu allows you to select how multiple windows are arrange on the screen.

Cascade

Tile

Arrange Icons


Save

Saves the data in the current window to a file. If the data or plot has not been previously saved you will be prompted for a file name via the File Save Dialog .


Fixing Fit Parameters

You may want to fix some of the parameters of a fit, for instance you may want to force a straight line fit to go through the origin by setting the intercept to zero. You may also wish to fix all the parameters to see what the γ² is compared to a free fit. To inspect or fix the parameters, whilst in the Plot Window select Parameters... from the Fit menu. This will pop up the Parameters Dialog. To fix a parameter click the Fixed option along side the required parameter. You can change the value that the parameter is fixed to by typing a new value in the value box. The parameter can be freed again by clearing the Fixed option. It is a good idea to perform a free fit (with no parameters fixed) first to get an idea of the likely value of the parameters. After fixing parameters you have to re-do the fit for them to take effect.


How to Use Help

Provides an introduction to the Windows Help system and how to use it.


Histogram Data Window: Windows Menu

The Windows Menu allows you to select how multiple windows are arrange on the screen.

Cascade

Tile

Arrange Icons


Resize

Displays four gridlines on the preview of the plot. By moving the gridlines with the mouse you can resize the plot to any desired size.


Preview

Provides a `thumbnail’ preview of what the plot will look like with the current binning.


Plot Window: Fit Menu

The Fit Menu allows you to perform fits to the plotted data.

Straight Line

Polynomial

Quadratic Fit

Cubic Fit

4th Order Polynomial Fit

5th Order Polynomial Fit

Other Fits

Gaussian

Sine Wave

Step Function

Cubic Spline

Parameters

Delete Fit


Options Dialog: Command Buttons

Allows you to close the dialog with or without updating the values.

OK Command

Closes the dialog and updates the plot according to the values you have selected.

Apply Command

Changes the values according to what you have chosen but does not close the dialog. This allows you to select a different tab option and change something else. The plot will be updated next time you chose OK or Cancel.

Cancel Command

Closes the dialog but does not update the plot (unless you have previously chosen Apply).

Default Command

Sets the values to their defaults (the values they had when you started WinGraph). You must choose OK or Apply to update the plot accordingly.

Help Command

Displays the Help page for this dialog.


Global Title

Type a global title here which will appear at the top of the plot.


Cubic Spline Fit

Fits the data with a cubic spline.


Arrange Icons

Arranges the icons of iconised data windows so they are uniformly space in the WinGraph window.


Page Setup

Pops up the Page Setup Dialog which allows you to type in the exact size and position required for the plot on the page.


X Values Column

Creates or removes the editing grid column for X Values. Since a Graph has to have X values this command is disabled.


Bitmaps and Metafiles

WinGraph can save the actual plot as either a bitmap file or metafile. This file can then be printed separately latter or imported into another package such as a word processor. The file cannot be read back into WinGraph.

Bitmap Files

A bitmap is a rectangular pattern of dots (pixels) which maps out the complete picture. Bitmap files are accepted by a wide variety of applications but cannot be easily resized. If they are magnified then the pixel structure soon be comes apparent as the dots become bigger and bigger squares. Bitmaps can be edited with programs such as Paint but it is rather tedious as everything in the original picture has been reduced to coloured dots. Bitmap files usually have .bmp file extension.

Metafiles

A metafile stores an image in terms of graphics objects (lines, circles, polygons, text and so on) rather than pixels. Although less applications can deal with metafiles they can be much easier to resize and edit as the original graphics objects can still be accessed. Metafiles are usually much smaller than bitmap files. For instance a single read circle on a white background would be stored in a metafile as a single ‘draw a red circle’ instruction whereas a bitmap file would contain a pixel map of the whole page with mostly white and only a few red pixels where the circle was.

Metafiles usually have a .wmf file extension.


Straight Line Fit

Fits a straight line through the data points.


Number Options Dialog

Allows you to change the formatting of numbers printed on the plot.

Formats

Command Buttons


Objects List

Provides a list of objects to which the colour selected from the colours list will apply.


WinGraph Window

The WinGraph Window acts as a container for all other windows. It is the window that is presented when you first start WinGraph. From the WinGraph Window you can create new Graph data , new Histogram data or open a file containing previously saved data. Click on the picture to obtain further information:

Toolbar Buttons

File Menu

Help Menu


Printer Setup

Allows you to change the default printer and the attributes of the printer


Display Fit Result

Display the result of any fit on the plot.


Copy

Copies the data from the currently selected (highlighted) cells and places them on the clipboard. From the clipboard they can be pasted back to a different location or to another application.


Page Setup Dialog

Allows you to specify the size and position of the plot on the page.

PlotPosition

Page Margins

Paper Size

Orientation

Command Buttons


Graph Data Window: Columns Menu

The Columns Menu allows you to select which columns are present in the editing grid.

X Values

X Errors

Y Values

Y Errors

Fit Flags


Graph Data Window: Edit Menu

The Edit Menu allows you to delete, move or copy sections of data to other parts of the editing grid or to other data windows.

Cut

Copy

Paste

Delete


Number in Plot

Provides information about how many of the values will fall inside and outside the plot with the current binning. Underflows have values less then the bin minimum and overflow more that the bin maximum.


Printer Setup Dialog

Allows you to select a different printer or change the printer characteristics.

The actual format of this dialog may depend on your printer.

Printer List

Allows you to select between different printers that may be installed on your system.

Orientation

Allows you to select between Portrait and Landscape orientation.

Paper

Allows you to select different paper sizes.

OK Command

Closes the dialog and updates the printer according to the values you have selected.

Cancel Command

Closes the dialog but does not update the printer.

Options Command

Pops up a further dialog to allow you to further customise your printer by changing the resolution etc. This dialog is completely printer specific.

Help Command

Displays the Help page for this dialog.


Saving

Saving Data and Plots

Saving the Raw Data

Once you have entered your data into a Graph or Histogram Data Window you should save it so that you can use it again if necessary. To do this you should choose Save from the File Menu or click on the Save toolbar button . The first time you do this you will be presented with the File Save Dialog which will allow you to choose a name for the file, change drives and directories and select the File Format . Unless you have special reasons you should accept the default WinGraph (.wgr) file format. If you save the same data again the File Save Dialog will not reappear. If you later want to save to a different file you should choose Save As instead of Save. Saved data can always be read back into WinGraph by choosing Open from the File Menu.

Saving Plots

Once you have plotted your data and are happy with the appearance, you can save the plot to a file. To do this you should choose Save Plot from the File Menu. The first time you do this you will be presented with the File Save Dialog which will allow you to choose a name for the file, change drives and directories and select the file format either Bitmap or Metafile . If you save the same plot again the File Save Dialog will not reappear. If you later want to save to a different file you should choose Save Plot As instead of Save Plot. Saved plots cannot be read back into WinGraph

Automatic Saving

Whenever you plot data or do some other operations, all the data will be automatically saved to a temporary file. These temporary files are normally deleted when WinGraph ends so they should not be relied upon for permanent storage of your data. However if WinGraph does not end normally for some reason the temporary file will be kept. If this happens you will be informed next time you use WinGraph that a temporary file exists and you will be given the option to recover it i.e. read the data back into WinGraph. In either case the temporary file will be deleted so if you want the data you should confirm you want to recover and then save it properly once inside WinGraph. If you do not recover it at that point it will be lost.

Previous: Printing

Next: Contents


Options Dialog

Allows you to change various optional values in different categories.

To change to another set of options you can click on the tab at the top.

General Options

Axis Options

Line Options

Fit Result Options

Text Options

Number Options

Command Buttons


Histogram Data Window: Columns Menu

The Columns Menu allows you to select which columns are present in the editing grid.

One

Two

Four

Five

Ten


Parameters Dialog

Allows you to inspect the fit parameters and fix their values if required.

Dataset List

Allows you to select which dataset you wish to fix the parameters for.

Fit Type for Parameter Names

Allows you to select which names are given to the parameters in the list of parameters below. Selecting a fit only changes the names below and has no influence on what fit is actually performed.

Parameter Values

Displays for each parameter, its current value for the given dataset along with its error. To fix a parameter at the value given, click in the Fixed box so that a cross is displayed. To free the parameter click in the Fixed box again so that the cross goes away. You can fix a parameter at a different value by typing the new value in the Value box. Typing a value in the Error box has no effect on anything.


Toolbar

The toolbar holds a number of buttons that provide shortcuts to menu commands. Click on the button to activate it.


Line Options Dialog: Lines

Allows you to customize the appearance of lines on the plot.

Apply to List

Select which type of line you wish to customize out of:

All lines (the default)

The outer box round the plot

The tick marks on the axes.

The box around the fit results.

The grid (if one is drawn).

The histogram outline (for histograms only).

Colour

Select the colour you wish the lines to be out of:

Black (the default)

Red

Blue

Green

Yellow

Magenta

Cyan

White (will be invisible)

Width on Screen

Type a number in the box to select the thickness of lines on the screen (default 1). Clicking on the up or down arrows of the spin box will increase or decrease the number by one.

Width on Printer

Type a number in the box to select the thickness of lines on the printer (default 2). Clicking on the up or down arrows of the spin box will increase or decrease the number by one.


Display X Errors

Displays X errors (if present) on the plot.


Plot Window: Windows Menu

The Windows Menu allows you to select how multiple windows are arrange on the screen.

Cascade

Tile

Arrange Icons


Plot Window: Style Menu

The Style Menu allows you to control the style of plotting.

Points

2D Bar Graph

3D Bar Graph

Outline Histogram


Number Options

Pops up the Number Options Dialog to enable you to set some options for the numbers that are displayed on he plot.


Select Data to Plot

Pops up the Plot Selection Dialog to enable you to select which datasets to plot with the Plot Selected Data command.


Save Plot

Saves the picture in the plot window. It does not save the raw data (i.e. the numbers). To save these you must save from the relevant data window(s). If the plot has not been previously saved you will be prompted for a file name via the File Save Dialog .


Text Options Dialog: Fonts

Text for

Click on the underlined down arrow to drop down a list of which type of text you wish to change the font of from:

Global Title text

X Axis Title text

Y Axis Title text

Fit Results Text

Font

Click on the underlined down arrow to drop down a list of text fonts. Click on one of these to change to that font. Note that ± is not correctly displayed in all fonts and that only TrueType fonts will scale correctly between the screen, print preview and printer.

Size

Click on the up and down arrows of the spin box to increase or decrease the size of the text. The scale is such that the width of the whole plot corresponds to 100 units.

Italic

Click in the box to toggle between Italic and normal text

Bold

Click in the box to toggle between Bold and normal text.

Colour

Select the colour you wish the text to be out of:

Black (the default)

Red

Blue

Green

Yellow

Magenta

Cyan

White (will be invisible)


Cancel Button

Cancels any edits that may have been made in the editing field and restores the value that was there originally.


New Graph Data

Creates a new Graph Data Window to allow you to enter new x and y values (with errors if required) to be displayed as a graph.


Axis Options Dialog: Y Axis

Allows you to customize the Y axis of the plot.

Minimum Value

Change the value in the box to the value you want the Y axis to start at.

Maximum Value

Change the value in the box to the value you want the Y axis to end at.

Number of Primary Divisions

Change the value in the box to the number of Primary Divisions you want. Clicking on the up or down arrows of the spin box will increase or decrease the number by one.

Number of Secondary Divisions

Change the value in the box to the number of Secondary Divisions you want. Clicking on the up or down arrows of the spin box will increase or decrease the number by one.

Tick Size

Change the value in the boxes to change the size of the tick marks at the primary or secondary division boundaries. Clicking on the up or down arrows of the spin box will increase or decrease the number by one.

Secondary Labels

Click in the box to force axis labels to be printed at secondary as well as primary division boundaries. This is normally not desirable but can be useful if for instance a logarithmic scale is used that does not encompass a whole decade e.g. from 20 to 80. In which case no primary divisions are visible and there would be no labels if the secondary ones were not printed.


Histogram Data Window: Plot Menu

The Plot Menu allows you select which datasets you want to plot.

Plot This Data

Plot Selected Data

Plot All Data

Select Data to Plot


Reading Files

You can either enter data directly into a Graph or Histogram Data Window (see Editing ) or you can open an existing file. To do this you should choose Open from the File Menu or click on the Open toolbar button . The first time you do this you will be presented with the File Open Dialog which will allow you to choose which file to open. If necessary you can change drives and directories. If you associate (using File Manager or Explorer) a file extension such as .wgr with WinGraph you can automatically open a dataset inside WinGraph by double clicking on the file name.

The files themselves can be created in a number of ways as long as they conform to one of WinGraph’s recognised File Formats :

  • Files created by WinGraph itself previously (see Saving Data ).
  • Files created by the DOS programs GRAPH or HISTO.
  • Files created inside another program such as a Fortran Program .
  • Files created directly with a text editor.

Previous: Contents

Next: Editing Data


WinGraph Window: Toolbar Buttons

Allows shortcuts to the most common commands.

New Graph Data

New Histogram Data

Open

Help


Print Preview Window: Toolbar Buttons

Allows shortcuts to the most common commands.

Print

Close

Help


2D Bar Graph

Displays the data on the plot as a 2 dimensional bar graph.


3D Bar Graph

Displays the data on the plot as a 3 dimensional bar graph.


Page Setup Dialog: Page Margins

Allows you to specify the margins around the page. The Full Width and Full Page commands will only use the area within the margins. Top, Bottom, Left and Right refer to the paper when looked at in Portrait mode. When in Landscape mode top is to the left, right is at the top etc.

Top

Specifies the margin at the Top of the page.

Bottom

Specifies the margin at the Bottom of the page.

Left

Specifies the margin at the Left of the page.

Right

Specifies the margin at the Right of the page.


Information Bar

The information bar at the bottom of the window contains various panels which display information.


Datasets List

Provides a list of all datasets that are currently being plotted. Click on the down arrow to drop down the list and select a dataset by clicking on it.


Printing

When you are happy with your plot you can print it.

You can print it directly by choosing Print from the File Menu or clicking on the Print toolbar button. The default is to print the plot in Portrait mode (long side of the paper vertical). The plot itself will fill about 1/3 of the page - 15cm wide by 10cm high.

You can change the size, position or orientation of the plot on the paper by choosing Page Setup from the File Menu. This will pop up the Page Setup Dialog .

If you want to see how the plot will appear on the paper before printing you should choose Print Preview from the File Menu or click on the Print Preview toolbar button. This will present you with the Print Preview Window . From here you can control the size, positioning and orientation in several ways and see the results on the screen before you print. See Resizing the Plot for more details.

The plot will print to the current default printer. To change the default printer choose Printer Setup from the File Menu. This will present you with the Printer Setup Dialog .

Previous: Fitting Files

Next: Saving Data and Plots


Secondary Divisions

The primary divisions are divided into secondary divisions by the shorter tick marks.


Plot This Data

Plots the data that is in the current Graph Data or Histogram Data Window. Only this data will be displayed even if there are other data windows.


Five Columns

Arranges Histogram data into five columns.


Primary Divisions

The axis is divided into a number of primary divisions by the longer tick marks.


Context Sensitive Help

Provides Help on the current Window from the WinHelp Help File. Pressing F1 will also provide Help on the current Window.


Full Width

Resizes the plot on the page so that it takes up the full width of the page. The aspect ratio remains the same as the plot appears in the Plot Window.


Dataset Name

Shows the name of the current Graph or Histogram dataset. If the data are saved it gives the filename.


Y Axis Title

Type a Y axis title here which will appear on the Y axis of the plot (vertically).


Graph Data Window: File Menu

The File Menu allows you to create new Graph or Histogram datasets, to open existing datasets, save data. close the window or to exit WinGraph.

New Graph Data

New Histogram Data

Open

Close

Save

Save As

Exit


System Menu

Drops down the system menu which allows you to move, resize or close WinGraph or switch to other running applications.


Clipboard

The clipboard is a temporary storage area common to all Windows applications where you can store data, graphics etc. Cut or Copy places an object from the current application on the clipboard while Paste puts the content of the clipboard into the current application. This provides a convenient means of transferring data between applications.


Graph Data Window: Help Menu

The Help Menu allows you to access WinGraph’s online help system.

Contents

Search

How to use Help

About WinGraph


Status Panel

Provides information about the current status of the data i.e. Saved, Modified etc.


Line and Fill Options

Pops up the Line Options Dialog to enable you to set some line and fill options for the plot.


Quadratic Fit

Fits a quadratic polynomial through the data points.


Plot Area

The area where the plot is drawn along with axes, labels, titles etc.


Y Values Column

Creates or removes the editing grid column for Y Values. Since a Graph has to have Y values this command is disabled.


Cut

Cuts (removes the data from) the currently selected (highlighted) cells and places them on the clipboard. From the clipboard they can be pasted back to a different location or to another application.


Join Points

Joins the data points with a series of line segments.


Fit Results Options Dialog: Alignment

Allows you to control where on the plot the fit results are positioned.

X

Click on one of the circles to position the fit results box in X either

At the Left of the plot

In the Centre of the plot (Default)

At the Right of the plot.

Y

Click on one of the circles to position the fit results box in X either

At the Top of the plot (Default)

In the Middle of the plot.

At the Bottom of the plot.


Sine Wave Fit

Fits a Sine wave through the data points


Close

Closes the current window. You will be prompted to save the data if it has not been saved already. Once a data window has been closed, the data in it is no longer available for plotting.


X Axis Title

Type an X axis title here which will appear on the X axis of the plot.


Manual Resize

Pops up the Page Setup Dialog which allows you to type in the exact size and position required for the plot on the page.


One Column

Arranges Histogram data into a single grid column.


Plot Window

The Plot Window allows you to customise the appearance of your plot and to perform fits to the data. Click on the picture to obtain further information:

Toolbar Buttons

File Menu

Edit Menu

Style Menu

Display Menu

Fit Menu

Options Menu

Help Menu


5th Order Polynomial Fit

Fits a 5th order polynomial through the data points.


Y Errors Column

Creates or removes the editing grid column for Y Errors.


WinGraph Window: File Menu

The File Menu allows you to create new Graph or Histogram datasets, to open existing datasets or to exit WinGraph.

New Graph Data

New Histogram Data

Open

Exit


Parameters

Pops up the Parameters Dialog to enable you to inspect or fix fit parameters.


Importing Plots into Word

You can import your plot directly into a Windows Word Processor such as Word by choosing Copy to Clipboard from the Edit Menu of the Plot Window. You can then go to Word (you can minimize WinGraph while you do this) and once the cursor is at the place where you want the plot you should choose Paste from the Edit Menu of Word.

Alternatively you can save the plot as a Bitmap or Metafile (see Saving Data and Plots and then import it into Word as a Graphic by choosing Picture from the Include Menu of Word. This is useful if you want to use the same plot several times.

You can import the raw data into Word in a similar way. In the Graph or Histogram Data Window select the data you wish to copy (see Editing Data for more details) then choose Copy from the Edit Menu or click on the Copy button on the toolbar. Go to your Word document and then choose Paste from the Edit Menu of Word.


WinGraph Window: Help Menu

The Help Menu allows you to access WinGraph’s online help system.

Contents

Search

How to use Help

About WinGraph


Plot Window: Toolbar Buttons

Allows shortcuts to the most common commands.

Print

Print Preview

Datasets

Symbols

Size

Colours

Objects

Close

Help


Plot Selected Data

Plots selected Graph or Histogram data. The datasets to plot must first have been selected using the Select Data to Plot command. This command is useful if you have several data windows but only want to plot the data from some of them.


Statistical Information

Various statistical information is available for Histogram data. This information is displayed in the Histogram Data Window and updated as you enter more data. The final values can be superimposed on the plot if required. The Mean, Standard Deviation and Median depend only on the data entered and do not depend on the binning. The Mode does depend on the binning.

Mean

The Mean is the average of the values:

m = Σ x / N

where x is the value of each of N data points.

Error on the Mean

The Error on the Mean or Standard Error is the Standard Deviation (see below) dived by the square root of the number of data points.

Δm = σ / Ö N

For data values 1, 2, 3, 3, 4, 5, 6, 7, 8, 8 the Mean is 4.70 ± 0.79

Standard Deviation

The Standard Deviation is square root of the Variance.

s = Ö (Σ(x-m)² / N)

sometimes known as the Root-Mean-Square or RMS, where x is the value of each of N data points and m is their mean. This is the standard deviation from the measured mean which is not necessarily the true mean. A better, slightly bigger estimate, which is what WinGraph calculates, is

σ = Ö (Σ(x-m)² / (N-1))

The factor of (N-1) is known as Bessel’s correction. To remove the factor of N-1 multiply σ by Ö( N / (N-1)).

Error on the Standard Deviation

The Error on the Standard Deviation is the Standard Deviation dived by twice the square root of the number of data points.

Δσ = σ / Ö 2N

For data values 1, 2, 3, 3, 4, 5, 6, 7, 8, 8 the Standard Deviation is 2.50 ± 0.56

Median

The Median is defined such that if the data values are ordered in ascending order then half of them are less than the median and half are greater. Usually if there are an odd number of (ordered) data values then the median is the middle one. If there are an even number then the median is the average of the two middle ones.

For data values 1, 2, 3, 3, 4, 5, 6, 7, 8, 8 the Median is 4.5

For data values 1, 2, 3, 3, 4, 5, 6, 7, 8 the Median is 4

Mode

Once the data have been binned the Mode is defined as the centre of the bin containing the most entries. If no one bin has the most entries the mode is not well defined.