MultiPlot
=========
RISC OS software by Chris Johnson
---------------------------------
Version 3
~~~~~~~~~

Introduction
============
What does MultiPlot do?
-----------------------
MultiPlot allows the plotting of a number of graphs on the same set of
axes. Suitable data files may be produced using e.g. !GraphDraw,
!FnPlotter, or many of Chris Johnson's chemistry related applications.
!MultiPlot does not allow the direct entry of data, and does no data
processing. It simply combines several graphs onto the same set of
scaled axes.

Options for obtaining hard copy exist (saving as a !Draw file, or
printing via any standard RISCOS printer driver), and the drawfiles
can be exported into any other application that is able to load such
files.

MultiPlot provides interactive help in conjunction with !Help or
alternatives.

MultiPlot is freely available, and is undergoing continual
development. The latest version can be obtained from the author's web
site, at http://www.chris-johnson.org.uk/software/. The author is
always ready to listen to bug reports, comments and suggestions and
will try to implement such suggestions where feasable.

Installation
------------
For a new installation, simply drag and drop the MultiPlot application
into the directory of your choice.

If you have a previous copy of MultiPlot, then move the old version of
MultiPlot somewhere safe and replace it with the new version. Once you
are sure the new version is working without problems, the old version
may be deleted.

Using MultiPlot
---------------
MultiPlot can be run from the desktop in all the standard ways. Double
clicking on the !MultiPlot icon in a directory viewer will install its
icon on the icon bar.

The application may also be started by double clicking on any
!MultiPlot data file in a directory viewer. This will only work if the
!MultiPlot application has been 'seen' by the filer, so that the filer
knows to run !MultiPlot before loading the file. If the application is
started in this way, besides the icon appearing on the icon bar, a
graph window will be opened with the contents of the data file
displayed.

Loading data
------------
Double clicking a previously saved MultiPlot file will load it and
open a graph window showing the plotted data (assuming the limit of
open windows has not been reached). A previously saved data file may
also be dragged to the iconbar icon, whereupon the data will be loaded
and displayed as above.

Dragging a MultiPlot datafile into an already open graph window will
add the data to that which is already present, and the graph will be
replotted to show the full data. This allows you to combine two or
more sets of data into one graph. The addition of data will only occur
if the total number of graph objects does not exceed the limit (32
sets of lines/points).

The iconbar menu
================
The iconbar icon menu offers the following options.

Infothis leads to the standard information window, which also
contains a web button, allowing a quick way of accessing the download
site.

Help...will launch the documentation (this file) in the default
browser.

Choices...will open the application choices dialogue, A full
description of the features available is given in the Choices page.

Run FnPlotterwill launch the application FnPlotter if not already
running, A full description of the features available in FnPlotter is
given in that application, accessed from the iconbar menu of that
application. FnPlotter is a simple application that allows entry of up
to four expressions in valid Basic format. These expressions can be
evaluated in a form suitable for plotting in !MultiPlot.

Quitwill remove MultiPlot from the iconbar and terminate the
program. If there is any unsaved data then a warning will be issued,
and the data can be saved or discarded as appropriate. If FnPlotter is
running, and the option has been set in Choices, then FnPlotter will
be quit at the same time.


Choices
=======


The choices dialogue has a number of sections, accessed via the Tabs
at the top of the window. Note that there may be a left or right arrow
at the end of the tabs, which allows you to bring more options in to
view.

At the bottom of the window there is a set of action buttons.

The actions available are:

Set
~~~
This will store the new settings, which will be used for all future
operations. Note that graphs already displayed necessarily may not be
changed, since the local settings for each graph display will override
the choices settings.

Save
~~~~
This will store the new settings, as in Set above, and will also save
the settings to disc, so they will be used when MultiPlot is run in
the future.

Cancel
~~~~~~
Close the dialogue and ignore any changes made since it was opened.

Reload
~~~~~~
Restore the settings to those pertaining when they were last saved.

Fonts tab
+++++++++
This tab allows a number of font details to be set.

You can choose which font MultiPlot will use for each of it's styles
when labelling and annotating the graph. To change the font face,
click on the menu button to the right of the font name. A standard
font menu will result, from which the new font is chosen. The text
size (in pt) can be adjusted using the bump icons to the right of the
displayed size.

Graph tab
+++++++++
This section contains general settings for the graph display.

Default size
~~~~~~~~~~~~
This determines the size of the window used to display a graph.
Current sizes available are

A4 landscape
A4 portrait
A4 square
640  480
800  600
1024  768
1280  1024
Custom

If the option Custom is selected, then the x and y extents can be
entered in the writable boxes Custom width and Custom height.

Background colour
~~~~~~~~~~~~~~~~~
If this is selected, then it is possible to set a background colour
for the body of the graph using the menu button to the right of the
patch showing the colour used for the graph background. This will
result in a standard colour picker dialogue being shown. A new colour
can be chosen. If this option is unselected, then the colour patch and
menu button will be greyed out, and no background colour will be used.

Full box outline
~~~~~~~~~~~~~~~~
When ticked, a box is drawn around the graph. If a box is chosen, then
the other options become available.

With axis pips
~~~~~~~~~~~~~~
When ticked, pips will be drawn on the box outline as well as on the
axes.

X axis grid
~~~~~~~~~~~
When ticked, the x axis pips will be extended across the graph
(vertically) between top and bottom of the box.

Y axis grid
~~~~~~~~~~~
When ticked, the y axis pips will be extended across the graph
(horizontally) between the left and right of the box.

Dashed grid
~~~~~~~~~~~
When ticked, the grid lines (if present) will be drawn dotted. If
unticked, a solid line will be drawn.

Axes linewidth/Grid linewidth
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is possible to set the line widths used when plotting the graph.
The widths for the graph axes and the grid lines, can be set
independently, using the appropriate bump icons to the right of the
width values.

Axis pip type
~~~~~~~~~~~~~
You can set the pips to be inside, outside or straddle the axes. Make
your selection from the popup menu button to the right of the display
field.

Axis pip size
~~~~~~~~~~~~~
The length of the axis pips can be set in os units by means of the
up/down bump arrows.

Use thin lines on vdu
~~~~~~~~~~~~~~~~~~~~~
Thin lines, as understood by the draw module are not supported
directly, since the use of such lines can cause problems with e.g.
high resolution printers, when the 1 pixel wide line effectively
becomes invisible.

When using line widths of a fraction of a pt, the VDU display can
sometimes look a little uneven, particularly with lines at an angle to
the horizontal/vertical. In some cases, lines can completely
disappear. This is where the option 'Use thin lines on vdu' comes in.
If this is selected, then the screen display will use 1 pixel wide
lines for all the lines on the graph, but when saving draw files and
printing will revert to the actual line widths as set in this
dialogue. If this is not set, then MultiPlot will make the assumption
that lines of less than about 0.80 pt should be displayed on screen as
'thin' lines, and thicker lines will be displayed at their configured
thickness. (Why 0.8 pt? There are 72 pt to the inch, and the vdu
display is nominally 90 pixels to the inch. Thus 1 px is about 0.8
pt).

See the graph layout options section for a fuller description and
example images showing these settings.

Symbols tab
+++++++++++

This tab allows the type of symbols used on the graph to be defined.
The type of symbol (e.g. square, circle) is chosen from the popup
menu. The size (specified in OS units) can be set using the bump
icons. If Use colour for symbols is selected, then the range of
colours as chosen in the Colours tab will be used. When loading a data
file, the shapes and colours used for each data set will cycle through
the configured values and then wrap around. Since the number of
colours and symbol styles differ, it is unlikely that different data
sets would end up with identical symbols.

The line width applies to symbols that are not filled shapes, but are
drawn as lines, e.g. a cross or plus symbol. In this case the line
width in pts used to draw the symbol can be set using the bump icons.

Lines tab
+++++++++

The settings in this tab apply to the data lines on the graph.

Default linewidth
~~~~~~~~~~~~~~~~~
The bump arrows can be used to set the width of the data lines on the
graph (in pts).

Use dash patterns for lines
~~~~~~~~~~~~~~~~~~~~~~~~~~~
The data lines by default will be drawn as solid lines. If this option
is ticked, then the data lines will be drawn as dashed lines, the
actual dash patterns cycling through a range of different combinations
of dots and dashes.

Use colour for lines
~~~~~~~~~~~~~~~~~~~~
When selected, the range of colours as chosen in the Colours tab will
be used, cycling through the range. If unticked, then all data lines
will be black.

Colours tab
+++++++++++

This tab allows the colours used when the graph is drawn to be set.
Colour is only used if the option 'Use colour for ...' is set in the
Symbols or Lines tab, otherwise lines or symbols will be drawn in
black.

There are eight colours used for drawing the symbols or lines, and
these can be set in the upper part of the tab. Clicking on the Menu
button to the right of the colour patch will raise a standard colour
picker dialogue to set the colour. When drawing a graph with more than
one set of data points or lines the colours will cycle through the
range.

It is also possible to set a colour for the graph axes, the axis label
text, and the graph annotation. By default, these colours are set to
black.

Load/Save tab
+++++++++++++

Revert to default settings on version 2 load
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When a MultiPlot data set is saved in version 2 file format, all the
graph layout settings may be saved with the data. This would allow the
graph to be recreated in the same form as it was when saved, e.g.
colours used, symbol styles used. If this option is ticked, then all
this additional information is ignored when the file is reloaded, and
the graph will take on all the default settings.

Save in version 2 file format
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
When this is ticked, then saving as a MultiPlot file will use the
newer version 2 format file, which can save all the graph layout
details as well as the graph data.

It is possible to fine tune the layout details that are saved with the
data. This is set by ticking the appropriate options. These correspond
to some extent to the various tabs described above and are

Font details
Graph layout data
Colours
Symbol and line styles
Axis scaling

The exact format of the format 2 file has changed a little between
MultiPlot version 2.24, and MultiPlot version 3.00 and later. There is
also an option, in case it is ever needed, to save the data in the
older file version 2.00 format. MultiPlot version 3 can load both
versions of file, but MultiPlot version 2.24 may not be able to load
fully the latest version of file.

Printing tab
++++++++++++

Print format
~~~~~~~~~~~~
MultiPlot assumes that the printer uses A4 paper. Print format
controls how MultiPlot arranges the print out. You are offered three
options, accessed via the popup menu button.

A4 landscape
~~~~~~~~~~~~
The printed graph will be formatted always to A4 landscape, whatever
the format of the screen display.

A4 portrait
~~~~~~~~~~~
The printed graph will be formatted always to A4 portrait, whatever
the format of the screen display.

Auto
~~~~
With this setting, MultiPlot will attempt to print the graph in the
format of the actual screen display, printing the graph in landscape
or portrait mode as appropriate, and scaling down to fit the A4 size
if necessary. Smaller sizes (e.g. 640  480) will be printed at a size
determined by the setting Scale up small size graphs (see below).

Show printer margins on graph display
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Most printers are not able to print to the edge of the paper. When the
screen display is set to A4 portrait or landscape, MultiPlot will
attempt to take account of the printer margins, and will not use the
whole of the A4 sized display. If a printer driver is active,
MultiPlot will read the configured printer margins from the printer
driver. If there is no driver active, default values will be used
until !Printers is loaded.

This option, when selected, will show the printer margins on the
display in a mid grey colour.

Note that the printer margins are reread whenever the active printer
is changed, so the graph margins will immediately reflect these
changes.

Scale up small size graphs
~~~~~~~~~~~~~~~~~~~~~~~~~~
If this option is unticked, any graph which is smaller than an A4 page
will be printed without any scaling when the print format is set to
Auto. If ticked, then small graphs (e.g. 640  480) will be scaled up
to fit the A4 page when printed.

Miscellaneous tab
+++++++++++++++++

This has two options.

Auto launch FnPlotter
~~~~~~~~~~~~~~~~~~~~~
If this option is ticked, then FnPlotter will be launched when
MultiPlot is started. If not ticked, then FnPlotter can always be
started using the iconbar menu.

Quit FnPlotter when MultiPlot is quit
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If this option is ticked, then FnPlotter (if running) will be quit
when MultiPlot is quit. FnPlotter can be quit at any time using its
own Quit option from its iconbar menu.

Additional note
---------------
Note that most of the above settings can be changed for individual
graphs once they are being displayed (see the graph display options
section for a fuller description and example images). Changes made in
the Choices dialogue while one or more graph windows are already
showing will not affect those windows. The graph options are inherited
by a data set when that data set is first loaded, thus these changes
will only affect new data sets.



The Graph window
================

The data can be plotted in several different formats.

The format of the Graph can be changed at any time, and the layout
fine tuned, using the Graph window menu.

The Graph window menu
+++++++++++++++++++++

Annotate...
~~~~~~~~~~~
This opens a dialogue that allows the graph annotation to be added and
edited. The window is shown below.

An overall graph title, and titles for the x and y axis can be added.
The six text effect buttons facilitate the inclusion of effects, such
as italic or bold, and greek or symbol characters. These effect styles
are set up in the choices font section. Text can also be moved up and
down to create superscript and subscript text.

The axis text is normally placed centrally on the appropriate axis.
The option Right justify legends will place the text at the right or
top of the axis.

The option Y axis title text horizontal will place the text at the top
of the graph, drawn horizontally.

The four buttons at the foot of the window control the display action.
Display is used to show the text on the graph. Delete will clear the
writable fields and remove the text from the graph. Hide will
temporarily remove the text but not delete it. Hidden text can be
recovered using the Display button. Cancel will simply close the
window without making any change.

Once text has been added for graph annotation, it will be saved with
the data, and will be reloaded when the data is reloaded into
MultiPlot.

Layout...
~~~~~~~~~
This opens a dialogue that allows a range of layout options to be
changed. Any changes will apply only to that specific graph, any other
graphs displaying will be unchanged. The range of options available is
described below.

Axis type
~~~~~~~~~
This leads to a submenu (shown right) which allows the type of axis
used to plot the graph to be changed. By default, graphs will be
plotted using linear axes. However, there may be occasions when the
data is better displayed using logarithmic axes. The submenu allows
either the X or the Y, or both X and Y to be changed to logarithmic.
MultiPlot will refuse to set a logarithmic axis if the corresponding
data includes zero or negative values.

Axis range...
~~~~~~~~~~~~~
When MultiPlot draws a graph it normally automatically calculates a
suitable axis range to use.

There may be the very occasional situation where manual adjustment is
required. This is possible, but should be used with care.

Selecting this option will open a dialogue.

By default the options Automatic Xaxis range and Automatic Yaxis range
will be selected and the writable icons shaded. If either of these
options is unticked, then the corresponding writable icons will become
active, and alternative minimum and maximum values for the axis values
can be entered. It is also necessary to enter the number of intervals
to be used on the axis to cover the range.

Remember - the values you enter will completely override the auto
settings, no further processing of them will be done by the program.
Therefore take care in choosing the values. There is some 'sanity
checking', e.g. the max and min values must be different, and the min
value must be less than the max value, but apart from that the program
will use the entered values when plotting the graph.

Selecting Set range will result in the graph being replotted with the
axis range being based on the new values.

To return to automatic axis range selection, simply open the dialogue
and tick one or both of the automatic axis range buttons as required.
Selecting Set range will then result in the graph being replotted
using automatic axis range(s).

Save as
~~~~~~~
This leads to a small submenu offering the options to save as a draw
file or as a multiplot file. The graph can be saved as a drawfile to
disc or directly to another suitable application. Alternatively, the
data for the points and lines can be saved in MultiPlot format. The
setting in the Choices-Load/Save tab will determine whether the
MultiPlot file is saved in version 1 or version 2 format.

Print...
~~~~~~~~
This leads to a small dialogue.

This will show the currently active printer in the window title, and
allows the number of copies to be selected. Clicking Print will print
the Graph, using the print format setting in the print tab of choices.
If there is not an active printer, the Print button will be shaded,
and the window title will include 'no printer'.




The graph window layout options
===============================

When a new data set is loaded, it will initially inherit settings for
the graph attached to it from the global choices settings. If the file
being loaded is a version 2 file, then any layout details included
within it will override the corresponding default settings. Once the
graph is being displayed, the graph display options window allows
these settings to be changed for an individual graph.

At the bottom of the graph options window are two buttons.

Apply
~~~~~
This will store and use the new settings only for the graph from which
the menu was opened. It will not change any other graph that is
already showing, or any new graph. If the changes are to also affect
all subsequently plotted graphs, then use the application wide Choices
dialogue.

Cancel
~~~~~~
Close the dialogue and ignore any changes made since it was opened.

The options that can be changed are grouped under tabs in the window,
and these tabs and their contents are similar to many of the options
in the global Choices dialogue.

The groups of settings are as follows.

Fonts
Graph
Axes
Symbols
Lines
Colours

Where there are differences between the layout tab and the
corresponding Choices tab, these are described below. Some additional
information may also be given below. When the tab contents are the
same as the corresponding tab in the Choices dialogue, then rather
than repeating the description, a link is given back to the Choices
dialogue.

Fonts tab
+++++++++
This tab allows the same settings as the corresponding Fonts tab in
the Choices dialogue, although any changes made will affect only the
one graph.

Graph tab
+++++++++
This section contains settings for the graph display, in general.

Default graph size
~~~~~~~~~~~~~~~~~~
This determines the size of the window used to display a graph.
Current sizes available are

A4 landscape
A4 portrait
A4 square
640  480
800  600
1024  768
1280  1024
Custom

If the option Custom is selected, then the x and y extents can be
entered in the writable boxes Custom width and Custom height.

Background colour
~~~~~~~~~~~~~~~~~
If this is selected, then it is possible to set a background colour
for the body of the graph using the menu button to the right of the
patch showing the colour used for the graph background. This will
result in a standard colour picker dialogue being shown. A new colour
can be chosen. If this option is unselected, then the colour patch and
menu button will be greyed out, and no background colour will be used.

Use thin lines on vdu
~~~~~~~~~~~~~~~~~~~~~
Thin lines, as understood by the draw module are not supported
directly, since the use of such lines can cause problems with e.g.
high resolution printers, when the 1 pixel wide line effectively
becomes invisible.

When using line widths of a fraction of a pt, the VDU display can
sometimes look a little uneven, particularly with lines at an angle to
the horizontal/vertical. In some cases, lines can completely
disappear. This is where the option Use thin lines on vdu comes in. If
this is selected, then the screen display will use 1 pixel wide lines
for all the lines on the graph, but when saving draw files and
printing will revert to the actual line widths as set in this
dialogue. If this is not set, then MultiPlot will make the assumption
that lines of less than about 0.80 pt should be displayed on screen as
'thin' lines, and thicker lines will be displayed at their configured
thickness. (Why 0.8 pt? There are 72 pt to the inch, and the vdu
display is nominally 90 pixels to the inch. Thus 1 px is about 0.8
pt).

Axes tab
++++++++

Full box outline
~~~~~~~~~~~~~~~~
When ticked, a box is drawn around the graph. If a box is chosen, then
the other options become available.

With axis pips
~~~~~~~~~~~~~~
Pips are always drawn on the axes themselves. When ticked, pips will
be drawn on the box outline as well as on the axes.

X axis grid
~~~~~~~~~~~
When ticked, the x axis pips will be extended across the graph
(vertically) between top and bottom of the box.

Y axis grid
~~~~~~~~~~~
When ticked, the y axis pips will be extended across the graph
(horizontally) between the left and right of the box.

Dashed grid
~~~~~~~~~~~
When ticked, the grid lines (if present) will be drawn dotted. If
unticked, a solid line will be drawn.

Axes linewidth/Grid linewidth
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is possible to set the line widths used when plotting the graph.
The widths for the graph axes and the grid lines, can be set
independently, using the appropriate bump icons to the right of the
width values.

Axis pip type
~~~~~~~~~~~~~
You can set the pips to be inside, outside or straddle the axes. Make
your selection from the popup menu button to the right of the display
field. The images below show these three options.

Axis pip size
~~~~~~~~~~~~~
The length of the axis pips can be set in os units by means of the
up/down bump arrows. The range allowed is 10 - 40 os units. The images
below show the two extremes of size.

Axes through origin
~~~~~~~~~~~~~~~~~~~
The graph axes are normally drawn at the left and bottom of the graph.
If either the x or y data (or both) has both positive and negative
values, then if this is ticked, the graph axis will be drawn through
the zero point. If unticked then the axes will always be put at
left/bottom even if there are positive and negative values.


Offset x-axis from origin, Offset y-axis from origin
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This allows the position of the axis to be offset from its default
position. It can only be used when the bottom left of the graph is the
point (0,0). The images below show this option off and on.

Offset x-axis labels, Offset y-axis labels
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is sometimes the case that, when full boxed axes is set, and the
data spans zero, the box or axes pass through the axis text, giving an
untidy look. This option moves the axis text to the side of the
box/axis and can improve matters. The images below show the option off
and on.


Symbols tab
+++++++++++
This tab allows the same settings as the corresponding Symbols tab in
the Choices dialogue, although any changes made will affect only the
one graph.

Lines tab
+++++++++
This tab allows the same settings as the corresponding Lines tab in
the Choices dialogue, although any changes made will affect only the
one graph.

Colours tab
+++++++++++
This tab allows the same settings as the corresponding Colours tab in
the Choices dialogue, although any changes made will affect only the
one graph.



Contact
=======
All communication about MultiPlot should be directed to Chris Johnson
(Email:chris@chris-johnson.org.uk). Suggestions for new features are
always welcome.

Web sites
=========
Chris Johnson's web site is at
http://www.chris-johnson.org.uk/index.html, with his RISC OS software
at http://www.chris-johnson.org.uk/software/index.html.




Licence
=======

!MultiPlot
Copyright (c) 2014, Chris Johnson
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are
met:

Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.

Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.

Neither the name of the copyright holder nor the names of their
contributors may be used to endorse or promote products derived from
this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.




File format
===========

Version 1 file format
+++++++++++++++++++++
Multiplot may be found to be useful for displaying graphical data
produced by any suitable application. The x,y coordinate data need
only be supplied in suitable CSV file format. In this case the graph
will be drawn using the default choices settings.

File format
-----------
The data file should have the filetype aa0 (in hex) which has the
filetype name 'MultiPlt'.

The first line of the data file must be simply PLOTDATA. This is then
followed by the point and line data for each object in seqence in CSV
format. It is not necessary for an object to have both point and line
data. Finally the graph title and x and y axis titles complete the
file. Thus a simple data file might look like the following.

PLOTDATA
1,1
2,2
3,3
4,4
5,5
END OF POINTS
END OF LINE
END OF PLOTDATA

This will produce a graph with just five points, but without a line.
Note the first line PLOTDATA. This is essential, since MultiPlot uses
this to confirm that the file is a MultiPlot file. This is then
followed by the five data points, the x and y value separated by a
comma, and each point on a new line. There then comes the token END OF
POINTS. This signifies the end of the point data. There would now
follow the data for the line associated with this set of points. As
there is no line, the token END OF LINE follows immediately. There
would now follow the next set of point and line data. However, there
is no more, so the token END OF PLOTDATA immediately follows.

The following two examples show a file with one set of points and
line, and a file with three sets of points, but no lines. The data
sets have been edited to reduce the size.

First file
----------
PLOTDATA
1,0.71
1.5,1.8
2,3.5
2.5,5.8
3,8.895
4,17
5,29
6,44
7,62.5
8,84
9,111
10,142
END OF POINTS
1,0.708
1.045,0.7841
1.09,0.864
1.135,0.9482
1.18,1.037
1.225,1.130
1.27,1.228
1.315,1.3305

(lots more data for the line)

9.595,128.74
9.64,130.14
9.685,131.54
9.73,132.95
9.775,134.37
9.82,135.800
9.865,137.236
9.91,138.681
9.955,140.134
10,141.596
END OF LINE
END OF PLOTDATA

Second file
-----------
PLOTDATA
1,2.20
2,2.40
3,2.59
4,2.79
5,3
6,3.20
7,3.40
8,3.59
9,3.79
10,4
END OF POINTS
END OF LINE
1,4.30
2,4.59
3,4.90
4,5.19
5,5.5
6,5.80
7,6.09
8,6.40
9,6.69
10,7
END OF POINTS
END OF LINE
1,6.40
2,6.80
3,7.19
4,7.59
5,8
6,8.39
7,8.80
8,9.19
9,9.60
10,10
END OF POINTS
END OF LINE
END OF PLOTDATA

The final data that can be included in a version 1 file are the
details for the graph title and axis titles. This data is optional,
but if present would take the following form. The data immediately
follows the END OF PLOTDATA token. The data is in ASCII text format.
The graph title consists of the token T: followed by the text. The x
and y axis titles begin with the tokens X: and Y: respectively. For
example, the end of the file might look like the following.

END OF LINE
END OF PLOTDATA
T:Breakdown curves for Thiophene, (C|D4|UH|D4|US)
X:energy/eV
Y:intensity/%

This data would result in the captions shown in the example below.

Note that the graph title includes subscripts, and the vertical text
movements are implemented by the tokens |D and |U. The tokens
implemented are as follows.

|U	Moves the following text up by half a line height
|D	Moves the following text down by half a line height
|N	Displays following text in plain text style
|B	Displays following text in bold text style
|I	Displays following text in italic text style
|S	Displays following text in symbol (greek) text style
||	Used on the rare occasion when the pipe character (|) is
        required in the text


MultiPlot is  Chris Johnson, 2014
Email:chris@chris-johnson.org.uk






