Table of Contents
"Mugl" files are the way that you specify to multigraph what data should be
plotted, how it should be plotted, and any other settings that determine the way
the graph looks. Mugl (pronounced "muggle") is short for "Multigraph XML", and
is a type of XML file. Each mugl file should
begin with the standard <?xml version="1.0"?>
declaration, followed by the <mugl>
tag.
The general structure of a mugl file is shown in Example 4.1, “General Structure of a Mugl File”.
Example 4.1. General Structure of a Mugl File
<?xml version="1.0"?> <mugl> <window .../> <plotarea .../> <horizontalaxis .../> <verticalaxis .../> <plot ...> ... </plot> <data ...> ... </data> </mugl>
The window
element gives the size of the graph, the size of the border
to be drawn around it, and the margin amounts inside the border. There can be at most
one window
element; if it is omitted, multigraph chooses default values
for the border and margins, and relies on the window size given in the Multigraph.Graph
constructor.
The plotarea
element indicates the region inside
the graph window where the data will be plotted. There can be at most
one plotarea
element; if it is omitted, multigraph
chooses a reasonable default.
The horizontalaxis
and
verticalaxis
elements give properties related to
the display and function of the graph's axes. There can be at most
one horizontalaxis
element, but any number of
verticalaxis
elements are allowed.
The plot
element indicates properties of the data plot
itself, such as style, color, which data variables to plot, and which
axes to plot them against. There can be any number of plot
elements.
The data
element gives the data to be plotted, either
by providing the data in a data
subelement, or by giving
the location of a file or web service from which the data can be read.
The following sections describe these elements in more detail.