Sophie

Sophie

distrib > Fedora > 15 > i386 > by-pkgid > 2f67f9c7d34a113061b128c67572102c > files > 13

mathgl-doc-1.11.0.1-4.fc15.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html401/loose.dtd">
<html>
<!-- This manual is for MathGL (version 1.11), a collection of classes and routines for scientific plotting. Please report any errors in this manual to mathgl.abalakin@gmail.org.

Copyright C 2008 Alexey Balakin.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.2 or
any later version published by the Free Software Foundation; with no
Invariant Sections, with the Front-Cover Texts being "A GNU Manual,"
and with the Back-Cover Texts as in (a) below.  A copy of the
license is included in the section entitled "GNU Free Documentation
License."

(a) The FSF's Back-Cover Text is: "You have the freedom to
copy and modify this GNU manual.  Buying copies from the FSF
supports it in developing GNU and promoting software freedom."

 -->
<!-- Created on February 27, 2011 by texi2html 1.82
texi2html was written by: 
            Lionel Cons <Lionel.Cons@cern.ch> (original author)
            Karl Berry  <karl@freefriends.org>
            Olaf Bachmann <obachman@mathematik.uni-kl.de>
            and many others.
Maintained by: Many creative people.
Send bugs and suggestions to <texi2html-bug@nongnu.org>
-->
<head>
<title>MathGL 1.11: 3. MathGL core</title>

<meta name="description" content="MathGL 1.11: 3. MathGL core">
<meta name="keywords" content="MathGL 1.11: 3. MathGL core">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="texi2html 1.82">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.roman {font-family:serif; font-weight:normal;}
span.sansserif {font-family:sans-serif; font-weight:normal;}
ul.toc {list-style: none}
-->
</style>


</head>

<body lang="en" bgcolor="#FFFFFF" text="#000000" link="#0000FF" vlink="#800080" alink="#FF0000">

<a name="MathGL-core"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="mathgl_en_2.html#Stereo-image" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en_2.html#Examples" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="MathGL-core-1"></a>
<h1 class="chapter">3. MathGL core</h1>
<a name="index-mglGraph"></a>

<p>The core of MathGL is <strong>mglGraph</strong> class defined in <code>#include &lt;mgl/mgl.h&gt;</code>. It contains a lot of plotting functions for 1D, 2D and 3D plots. It also encapsulates parameters for axes drawing. Moreover an arbitrary coordinate transformation may be used for each axis. All plotting functions use data encapsulated in mglData class (see section <a href="mathgl_en_6.html#mglData-class">mglData class</a>) that allows to check sizes of used arrays easily. Also it have many functions for data handling: modify it by formulas, find momentums and distribution (histogram), apply operator (differentiate, integrate, transpose, Fourier and so on), change data sizes (interpolate, squeeze, crop and so on). Additional information about colors, fonts, formula parsing can be found in <a href="mathgl_en_7.html#Other-classes">Other classes</a>.
</p>
<p>Note that class mglGraph is abstract and contains only interface functions for plotting but does not make plot by itself. For plotting in specific device (screen, memory or file) one should use derived classes: mglGraphZB &ndash; for bitmap picture in file or in memory; mglGraphPS &ndash; for vector PostScript picture; mglGraphGL &ndash; for drawing using OpenGL, or for GLUT windows interface; and so on, see section <a href="mathgl_en_4.html#Plotter-classes">Plotter classes</a>. If you want not only to create a picture but to view it in a window/widget or to run animation and so on then look at <a href="mathgl_en_5.html#Widget-classes">Widget classes</a>.
</p>
<p>There is a C++ wrapper class which have the same name <code>mglGraph</code> and defined in <code>mgl/mgl_graph.h</code>. You can use this class even with non-GNU compilers (i.e. in Borland or Microsoft one), but you <strong>should not include</strong> any <code>mgl/mgl.h</code> or <code>mgl/mgl_parse.h</code> headers in this case! This wrapper class also used as base for all SWIG-based interfaces (Python, Octave and so on). So, later it is refered as &lsquo;<samp>Python</samp>&rsquo; class for distinguish from original &lsquo;<samp>C++</samp>&rsquo; class defined in <code>mgl/mgl.h</code> .
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Graphics-setup">3.1 Graphics setup</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Axis-settings">3.2 Axis settings</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Transformation-matrix">3.3 Transformation matrix</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Export-to-file">3.4 Export to file</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Primitives-drawing">3.5 Primitives drawing</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Text-printing">3.6 Text printing</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Axis-and-Colorbar">3.7 Axis and Colorbar</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Legend">3.8 Legend</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#g_t1D-plotting">3.9 1D plotting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#g_t2D-plotting">3.10 2D plotting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#g_t3D-plotting">3.11 3D plotting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Dual-plotting">3.12 Dual plotting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Vector-fields">3.13 Vector fields</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Other-plotting">3.14 Other plotting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Nonlinear-fitting">3.15 Nonlinear fitting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Data-distributions">3.16 Data distributions</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Frames_002fAnimation">3.17 Frames/Animation</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#IDTF-functions">3.18 IDTF functions</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
</table>

<hr size="6">
<a name="Graphics-setup"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#MathGL-core" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Transparency" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Graphics-setup-1"></a>
<h2 class="section">3.1 Graphics setup</h2>
<a name="index-MathGL-setup"></a>

<p>Functions and variables in this group influences on overall graphics appearance. So all of them should be placed <em>before</em> any actual plotting function calls.
</p>
<dl>
<dt><a name="index-DefaultPlotParam"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>DefaultPlotParam</b><i> ()</i></dt>
<dt><a name="index-mgl_005fset_005fdef_005fparam"></a><u>C function:</u> <code>void</code> <b>mgl_set_def_param</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Restore initial values for all of parameters except described in <a href="#Zooming">Zooming</a>.
</p></dd></dl>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Transparency">3.1.1 Transparency</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Lighting">3.1.2 Lighting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Fog">3.1.3 Fog</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Default-sizes">3.1.4 Default sizes</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Zooming">3.1.5 Zooming</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Cutting">3.1.6 Cutting</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Font-settings">3.1.7 Font settings</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Palette-and-colors">3.1.8 Pallete and colors</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Error-handling">3.1.9 Error handling</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Other-settings">3.1.10 Other settings</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
</table>

<hr size="6">
<a name="Transparency"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Graphics-setup" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Lighting" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Transparency-1"></a>
<h3 class="subsection">3.1.1 Transparency</h3>
<a name="index-Alpha"></a>
<a name="index-SetAlphaDef"></a>
<a name="index-SetTransparent"></a>
<a name="index-SetTranspType"></a>

<p>There are several functions and variables for setup transparency. The general function is <code>Alpha()</code> which switch on/off the transparency for overall plot. It influence only for graphics which created after <code>Alpha()</code> call (with one exception, mglGraphGL). Function <code>SetAlphaDef</code> specify the default value of alpha-channel. You may switch off transparency of selected plot by function <code>SetTransparent</code>. Finally, function <code>SetTranspType</code> set the kind of transparency. See section <a href="mathgl_en_9.html#Transparent-surface-sample">Transparent surface sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Alpha-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>bool</code> <b>Alpha</b><i> (<code>bool</code> enable)</i></dt>
<dt><a name="index-mgl_005fset_005falpha"></a><u>C function:</u> <code>void</code> <b>mgl_set_alpha</b><i> (<code>HMGL</code> gr, <code>int</code> enable)</i></dt>
<dd><p>Sets the transparency on/off and returns previous value of transparency. It is recommended to call this function before any plotting command. In any case it must be called before <code>Finish()</code> function if the last is used. Default value is transparency off. Unfortunately it switches the transparency on/off for all subplots. Use <code>SetTransparent(false)</code> in particular plot to disable its transparency.
</p></dd></dl>

<dl>
<dt><a name="index-SetAlphaDef-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetAlphaDef</b><i> (<code>float</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005falpha_005fdefault"></a><u>C function:</u> <code>void</code> <b>mgl_set_alpha_default</b><i> (<code>HMGL</code> gr, <code>float</code> alpha)</i></dt>
<dd><p>Sets default value of alpha channel (transparency) for all plotting functions. Note, that OpenGL (mglGraphGL) has incorrect drawing for large values of alpha in case of several overlapping surfaces.
</p></dd></dl>

<dl>
<dt><a name="index-SetTransparent-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetTransparent</b><i> (<code>bool</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005ftransp"></a><u>C function:</u> <code>void</code> <b>mgl_set_transp</b><i> (<code>HMGL</code> gr, <code>int</code> enable)</i></dt>
<dd><p>Flag which temporary switches transparency on/off for the plot. This is the same as <code>Alpha(val)</code> but more correctly work in mglGraphGL class.
</p></dd></dl>

<dl>
<dt><a name="index-SetTranspType-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetTranspType</b><i> (<code>int</code> type)</i></dt>
<dt><a name="index-mgl_005fset_005ftransp_005ftype"></a><u>C function:</u> <code>void</code> <b>mgl_set_transp_type</b><i> (<code>HMGL</code> gr, <code>int</code> enable)</i></dt>
<dd><p>Set the transparency type. Normal transparency (&lsquo;<samp>0</samp>&rsquo;) &ndash; below things is less visible than upper ones. It does not look well in OpenGL mode (mglGraphGL) for several surfaces. Glass-like transparency (&lsquo;<samp>1</samp>&rsquo;) &ndash; below and upper things are commutable and just decrease intensity of light by RGB channel. Lamp-like transparency (&lsquo;<samp>2</samp>&rsquo;) &ndash; below and upper things are commutable and are the source of some additional light. I recommend to set <code>SetAlphaDef(0.3)</code> or less for lamp-like transparency. See section <a href="mathgl_en_9.html#Normal-transparency">Normal transparency</a>, <a href="mathgl_en_9.html#Glass_002dlike-transparency">Glass-like transparency</a>, <a href="mathgl_en_9.html#Lamp_002dlike-transparency">Lamp-like transparency</a>.
</p></dd></dl>

<dl>
<dt><a name="index-AlphaDef-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>float</code> <b>AlphaDef</b></dt>
<dd><p>Default value of alpha channel. See <code>SetAlphaDef()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-Transparent-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>bool</code> <b>Transparent</b></dt>
<dd><p>Flag which temporary switches transparency on/off for the plot. See <code>SetTransparent()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-TranspType-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>int</code> <b>TranspType</b></dt>
<dd><p>This variable set the transparency type. See <code>SetTranspType()</code>.
</p></dd></dl>

<hr size="6">
<a name="Lighting"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Transparency" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Fog" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Lighting-1"></a>
<h3 class="subsection">3.1.2 Lighting</h3>
<a name="index-Light"></a>
<a name="index-Ambient"></a>
<a name="index-AddLight"></a>

<p>There are several functions for setup lighting. The general function is <code>Light(bool)</code> which switch on/off the lighting for overall plot. It influence only for graphics which created after <code>Light()</code> call (with one exception, mglGraphGL). Generally MathGL support up to 10 independent light sources. But in OpenGL mode only 8 of light sources is used due to OpenGL limitations. The position, color, brightness of each light source can be set separately. By default only one light source is active. It is source number <code>0</code> with white color, located at top of the plot.
</p>
<dl>
<dt><a name="index-Light-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>bool</code> <b>Light</b><i> (<code>bool</code> enable)</i></dt>
<dt><a name="index-mgl_005fset_005flight"></a><u>C function:</u> <code>void</code> <b>mgl_set_light</b><i> (<code>HMGL</code> gr, <code>int</code> enable)</i></dt>
<dd><p>Sets the using of light on/off for overall plot. Function returns previous value of lighting. Default value is lightning off.
</p></dd></dl>

<dl>
<dt><a name="index-Light-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Light</b><i> (<code>int</code> n, <code>bool</code> enable)</i></dt>
<dt><a name="index-mgl_005fset_005flight_005fn"></a><u>C function:</u> <code>void</code> <b>mgl_set_light_n</b><i> (<code>HMGL</code> gr, <code>int</code> n, <code>int</code> enable)</i></dt>
<dd><p>Switch on/off <var>n</var>-th light source separately.
</p></dd></dl>

<dl>
<dt><a name="index-AddLight-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>AddLight</b><i> (<code>int</code> n, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>char</code> c=<code>'w'</code>)</i></dt>
<dt><a name="index-Light-3"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Light</b><i> (<code>int</code> n, <code>mglPoint</code> p, <code>char</code> c=<code>'w'</code>, <code>float</code> bright=<code>0.5</code>, <code>bool</code> infty=<code>true</code>)</i></dt>
<dt><a name="index-Light-4"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Light</b><i> (<code>int</code> n, <code>mglPoint</code> p, <code>mglColor</code> c, <code>float</code> bright=<code>0.5</code>, <code>bool</code> infty=<code>true</code>)</i></dt>
<dt><a name="index-mgl_005fadd_005flight"></a><u>C function:</u> <code>void</code> <b>mgl_add_light</b><i> (<code>HMGL</code> gr, <code>int</code> n, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>char</code> c)</i></dt>
<dd><p>The function adds a light source with identification <var>n</var> at position <var>p</var> with color <var>c</var> and with brightness <var>bright</var> (which must be in range [0,1]). Flag <var>infty</var>=<code>true</code> puts the source to infinite distance (for the faster drawing).
</p></dd></dl>

<dl>
<dt><a name="index-Ambient-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Ambient</b><i> (<code>float</code> bright=<code>0.5</code>)</i></dt>
<dt><a name="index-mgl_005fset_005fambbr"></a><u>C function:</u> <code>void</code> <b>mgl_set_ambbr</b><i> (<code>HMGL</code> gr, <code>float</code> bright)</i></dt>
<dd><p>Sets the brightness of ambient light. The value should be in range [0,1].
</p></dd></dl>

<hr size="6">
<a name="Fog"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Lighting" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Default-sizes" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Fog-1"></a>
<h3 class="subsection">3.1.3 Fog</h3>
<a name="index-Fog"></a>

<dl>
<dt><a name="index-Fog-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Fog</b><i> (<code>float</code> d, <code>float</code> dz=<code>0.25</code>)</i></dt>
<dt><a name="index-mgl_005fset_005ffog"></a><u>C function:</u> <code>void</code> <b>mgl_set_fog</b><i> (<code>HMGL</code> gr, <code>float</code> d, <code>float</code> dz)</i></dt>
<dd><p>Function imitate a fog in the plot. Fog start from relative distance <var>dz</var> from view point and its density growths exponentially in depth. So that the fog influence is determined by law ~ 1-exp(-<em>d*z</em>). Here <em>z</em> is normalized to 1 depth of the plot. If value <var>d</var>=<code>0</code> then the fog is absent. See section <a href="mathgl_en_9.html#Surface-in-fog-sample">Surface in fog sample</a>, for sample code and picture.
</p></dd></dl>

<hr size="6">
<a name="Default-sizes"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Fog" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Zooming" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Default-sizes-1"></a>
<h3 class="subsection">3.1.4 Default sizes</h3>
<a name="index-SetTickLen"></a>
<a name="index-SetTickStl"></a>
<a name="index-SetBarWidth"></a>
<a name="index-SetMarkSize"></a>
<a name="index-SetArrowSize"></a>
<a name="index-SetBaseLineWidth"></a>

<p>These variables control the default (initial) values for most graphics parameters including sizes of markers, arrows, linewidth and so on. As any other settings these ones will influence only on plots created after the settings change.
</p>
<dl>
<dt><a name="index-SetBarWidth-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetBarWidth</b><i> ( <code>float</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005fbar_005fwidth"></a><u>C function:</u> <code>void</code> <b>mgl_set_bar_width</b><i> (<code>HMGL</code> gr, <code>float</code> val)</i></dt>
<dd><p>Sets relative width of rectangles in Bars, Barh, BoxPlot (see section <a href="#Bars">Bars</a>). Default value is <code>0.7</code>.
</p></dd></dl>

<dl>
<dt><a name="index-SetMarkSize-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetMarkSize</b><i> (<code>float</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005fmark_005fsize"></a><u>C function:</u> <code>void</code> <b>mgl_set_mark_size</b><i> (<code>HMGL</code> gr, <code>float</code> val)</i></dt>
<dd><p>Sets size of marks for <a href="#g_t1D-plotting">1D plotting</a>. Default value is <code>0.02</code>.
</p></dd></dl>

<dl>
<dt><a name="index-SetArrowSize-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetArrowSize</b><i> (<code>float</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005farrow_005fsize"></a><u>C function:</u> <code>void</code> <b>mgl_set_arrow_size</b><i> (<code>HMGL</code> gr, <code>float</code> val)</i></dt>
<dd><p>Sets size of arrows for <a href="#g_t1D-plotting">1D plotting</a>, lines and curves (see section <a href="#Primitives-drawing">Primitives drawing</a>). Default value is <code>0.03</code>.
</p></dd></dl>

<dl>
<dt><a name="index-SetBaseLineWidth-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetBaseLineWidth</b><i> (<code>float</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005fbase_005fline_005fwidth"></a><u>C function:</u> <code>void</code> <b>mgl_set_base_line_width</b><i> (<code>HMGL</code> gr, <code>float</code> val)</i></dt>
<dd><p>Defines the base width for all lines. The value &lt;1 is ignored. For values &gt; 1 the real line width is result of multiplication of specified line width and the value of <var>BaseLineWidth</var>. Increase of this variables is actual for large bitmap pictures. Default value is <code>1</code>.
</p></dd></dl>

<dl>
<dt><a name="index-SetTickLen-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetTickLen</b><i> (<code>float</code> val, <code>float</code> stt=<code>1</code>)</i></dt>
<dt><a name="index-mgl_005fset_005ftick_005flen"></a><u>C function:</u> <code>void</code> <b>mgl_set_tick_len</b><i> (<code>HMGL</code> gr, <code>float</code> val, <code>float</code> stt)</i></dt>
<dd><p>The relative length of axis ticks. Default value is <code>0.1</code>. Parameter <var>stt</var>&gt;0 set relative length of subticks which is in <code>sqrt(1+stt)</code> times smaller.
</p></dd></dl>

<dl>
<dt><a name="index-SetTickStl-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetTickStl</b><i> (<code>const char *</code>stl, <code>const char *</code>sub=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fset_005ftick_005fstl"></a><u>C function:</u> <code>void</code> <b>mgl_set_tick_stl</b><i> (<code>HMGL</code> gr, <code>const char *</code>stl, <code>const char *</code>sub)</i></dt>
<dd><p>The line style of axis ticks (<var>stl</var>) and subticks (<var>sub</var>). If <var>stl</var> is empty then default style is used (&lsquo;<samp>k</samp>&rsquo; or &lsquo;<samp>w</samp>&rsquo; depending on transparency type). If <var>sub</var> is empty then ticks style is used (i.e. <var>stl</var>).
</p></dd></dl>

<dl>
<dt><a name="index-BarWidth-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>float</code> <b>BarWidth</b></dt>
<dd><p>Relative width of rectangles. See <code>SetBarWidth()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-MarkSize-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>float</code> <b>MarkSize</b></dt>
<dd><p>The size of marks. See <code>SetMarkSize()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-ArrowSize-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>float</code> <b>ArrowSize</b></dt>
<dd><p>The size of arrows. See <code>SetArrowSize()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-BaseLineWidth-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>float</code> <b>BaseLineWidth</b></dt>
<dd><p>The variable define the base width for all lines. See <code>SetBaseLineWidth()</code>.
</p></dd></dl>

<hr size="6">
<a name="Zooming"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Default-sizes" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Cutting" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Zooming-1"></a>
<h3 class="subsection">3.1.5 Zooming</h3>
<a name="index-SetPlotFactor"></a>
<a name="index-Zoom"></a>

<p>These variables and functions control the overall zooming of the picture (see Zoom()) or the sub-picture (see PlotFactor). Normally you can use these variables and functions for removing &ldquo;white&rdquo; spaces around a plot.
</p>
<dl>
<dt><a name="index-SetPlotFactor-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetPlotFactor</b><i> (<code>float</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005fplotfactor"></a><u>C function:</u> <code>void</code> <b>mgl_set_plotfactor</b><i> (<code>HMGL</code> gr, <code>float</code> val)</i></dt>
<dd><p>Sets the factor of plot size. It is not recommended to set it lower then 1.5. This is some analogue of function Zoom() but applied not to overall image but for each InPlot. Use negative value or zero to enable automatic <code>PlotFactor</code> selection.
</p></dd></dl>

<dl>
<dt><a name="index-Zoom-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Zoom</b><i> (<code>float</code> x1, <code>float</code> y1, <code>float</code> x2, <code>float</code> y2)</i></dt>
<dt><a name="index-mgl_005fset_005fzoom"></a><u>C function:</u> <code>void</code> <b>mgl_set_zoom</b><i> (<code>HMGL</code> gr, <code>float</code> x1, <code>float</code> y1, <code>float</code> x2, <code>float</code> y2)</i></dt>
<dd><p>The function changes the scale of graphics that correspond to zoom in/out of the picture. After function call the current plot will be cleared and further the picture will contain plotting from its part [x1,x2]*[y1,y2]. Here picture coordinates <var>x1</var>, <var>x2</var>, <var>y1</var>, <var>y2</var> changes from 0 to 1. Attention! this settings can not be overwritten by any other functions. Use <code>Zoom(0,0,1,1)</code> to return default view.
</p></dd></dl>

<dl>
<dt><a name="index-PlotFactor-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>float</code> <b>PlotFactor</b></dt>
<dd><p>The factor of plot size. See <code>SetPlotFactor()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-AutoPlotFactor-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>bool</code> <b>AutoPlotFactor</b></dt>
<dd><p>Switch on/off automatic change of PlotFactor variable during plot rotation. See <code>SetPlotFactor()</code>.
</p></dd></dl>

<hr size="6">
<a name="Cutting"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Zooming" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Font-settings" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Cutting-1"></a>
<h3 class="subsection">3.1.6 Cutting</h3>
<a name="index-SetCut"></a>
<a name="index-SetCutBox"></a>
<a name="index-CutOff"></a>

<p>These variables and functions set the condition when the points are excluded (cutted) from the drawing. Note, that a point with NAN value(s) of coordinate or amplitude will be automatically excluded from the drawing.
</p>
<dl>
<dt><a name="index-SetCut-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetCut</b><i> (<code>bool</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005fcut"></a><u>C function:</u> <code>void</code> <b>mgl_set_cut</b><i> (<code>HMGL</code> gr, <code>int</code> val)</i></dt>
<dd><p>Flag which determines how points outside bounding box are drawn. If it is <code>true</code> then points are excluded from plot (it is default) otherwise the points are projected to edges of bounding box.
</p></dd></dl>

<div class="float">
<img src="cut.png" alt="cut">

</div><p><strong>Left figure is drawn with parameter <code>Cut=false</code>. Right one is drawn with parameter <code>Cut=true</code>.
</strong>
</p>
<dl>
<dt><a name="index-SetCutBox-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetCutBox</b><i> (<code>float</code> x1, <code>float</code> y1, <code>float</code> z1, <code>float</code> x2, <code>float</code> y2, <code>float</code> z2)</i></dt>
<dt><a name="index-mgl_005fset_005fcut_005fbox"></a><u>C function:</u> <code>void</code> <b>mgl_set_cut_box</b><i> (<code>HMGL</code> gr, <code>float</code> x1, <code>float</code> y1, <code>float</code> z1, <code>float</code> x2, <code>float</code> y2, <code>float</code> z2)</i></dt>
<dd><p>Lower and upper edge of the box in which never points are drawn. If both edges are the same (the variables are equal) then the cutting box is empty. See section <a href="mathgl_en_9.html#CutMinMax-sample">CutMinMax sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-CutOff-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>CutOff</b><i> (<code>const char *</code>EqC)</i></dt>
<dt><a name="index-mgl_005fset_005fcutoff"></a><u>C function:</u> <code>void</code> <b>mgl_set_cutoff</b><i> (<code>HMGL</code> gr, <code>const char *</code>EqC)</i></dt>
<dd><p>Sets the cutting off condition by formula <var>EqC</var>. This condition determine will point be plotted or not. If value of formula is nonzero then point is omitted, otherwise it plotted. Set argument as <code>&quot;&quot;</code> to disable cutting off condition. See section <a href="mathgl_en_9.html#CutOff-sample">CutOff sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Cut-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>bool</code> <b>Cut</b></dt>
<dd><p>Flag which determines how points outside bounding box are drawn. See <code>SetCut()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-CutMin_002c-CutMax-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>mglPoint</code> <b>CutMin, CutMax</b></dt>
<dd><p>Lower and upper edge of the box in which never points are drawn. See <code>SetCutBox()</code>.
</p></dd></dl>

<hr size="6">
<a name="Font-settings"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Cutting" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Palette-and-colors" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Font-settings-1"></a>
<h3 class="subsection">3.1.7 Font settings</h3>
<a name="index-SetFontSize"></a>
<a name="index-SetFontDef"></a>
<a name="index-SetRotatedText"></a>
<a name="index-SetFontSizePT"></a>
<a name="index-SetFontSizeCM"></a>
<a name="index-SetFontSizeIN"></a>
<a name="index-SetFont"></a>
<a name="index-GetFont"></a>
<a name="index-LoadFont"></a>
<a name="index-CopyFont"></a>
<a name="index-RestoreFont"></a>

<dl>
<dt><a name="index-SetFontSize-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetFontSize</b><i> (<code>float</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005ffont_005fsize"></a><u>C function:</u> <code>void</code> <b>mgl_set_font_size</b><i> (<code>HMGL</code> gr, <code>float</code> val)</i></dt>
<dd><p>Sets the size of font for tick and axis labels. Default font size of axis labels is 1.4 times large than for tick labels.
</p></dd></dl>

<dl>
<dt><a name="index-SetFontDef-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetFontDef</b><i> (<code>const char *</code>fnt)</i></dt>
<dt><a name="index-mgl_005fset_005ffont_005fdef"></a><u>C function:</u> <code>void</code> <b>mgl_set_font_def</b><i> (<code>HMGL</code> gr, <code>const char *</code> val)</i></dt>
<dd><p>Sets the font specification (see section <a href="#Text-printing">Text printing</a>). Default is &lsquo;<samp>rC</samp>&rsquo; &ndash; Roman font centering.
</p></dd></dl>

<dl>
<dt><a name="index-SetRotatedText-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetRotatedText</b><i> (<code>bool</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005frotated_005ftext"></a><u>C function:</u> <code>void</code> <b>mgl_set_rotated_text</b><i> (<code>HMGL</code> gr, <code>int</code> val)</i></dt>
<dd><p>Sets to use or not text rotation along axis.
</p></dd></dl>

<dl>
<dt><a name="index-LoadFont-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>LoadFont</b><i> (<code>const char *</code>name, <code>const char *</code>path=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fload_005ffont"></a><u>C function:</u> <code>void</code> <b>mgl_load_font</b><i> (<code>HMGL</code> gr, <code>const char *</code>name, <code>const char *</code>path)</i></dt>
<dd><p>Load font typeface from <var>path</var>/<var>name</var>.
</p></dd></dl>

<dl>
<dt><a name="index-CopyFont-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>CopyFont</b><i> (<code>mglGraph *</code> from)</i></dt>
<dt><a name="index-mgl_005fcopy_005ffont"></a><u>C function:</u> <code>void</code> <b>mgl_copy_font</b><i> (<code>HMGL</code> gr, <code>HMGL</code> gr_from)</i></dt>
<dd><p>Copy font data from another <code>mglGraph</code> object.
</p></dd></dl>

<dl>
<dt><a name="index-RestoreFont-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>RestoreFont</b><i> ()</i></dt>
<dt><a name="index-mgl_005frestore_005ffont"></a><u>C function:</u> <code>void</code> <b>mgl_restore_font</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Restore font data to default typeface.
</p></dd></dl>

<dl>
<dt><a name="index-SetFontSizePT-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>SetFontSizePT</b><i> (<code>float</code> cm, <code>int</code> dpi=<code>72</code>)</i></dt>
<dd><p>Set FontSize by size in pt and picture DPI (default is 16 pt for dpi=72).
</p></dd></dl>
<dl>
<dt><a name="index-SetFontSizeCM-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>inline void</code> <b>SetFontSizeCM</b><i> (<code>float</code> cm, <code>int</code> dpi=<code>72</code>)</i></dt>
<dd><p>Set FontSize by size in centimeters and picture DPI (default is 0.56 cm = 16 pt).
</p></dd></dl>
<dl>
<dt><a name="index-SetFontSizeIN-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>inline void</code> <b>SetFontSizeIN</b><i> (<code>float</code> cm, <code>int</code> dpi=<code>72</code>)</i></dt>
<dd><p>Set FontSize by size in inch and picture DPI (default is 0.22 in = 16 pt).
</p></dd></dl>
<dl>
<dt><a name="index-SetFont-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>SetFont</b><i> (<code>mglFont *</code>f)</i></dt>
<dd><p>Sets font typeface. Note that each mglFont instance can be used with <em>ONLY ONE</em> mglGraph instance at a moment of time! If <code>f==&quot;&quot;</code> then default font is used.
</p></dd></dl>
<dl>
<dt><a name="index-GetFont-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>inline mglFont *</code> <b>GetFont</b><i> ()</i></dt>
<dd><p>Gets current typeface. Note that this variable can be deleted at next SetFont() call!
</p></dd></dl>

<dl>
<dt><a name="index-FontSize-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>float</code> <b>FontSize</b></dt>
<dd><p>The font size. See <code>SetFontSize()</code>.
</p></dd></dl>
<dl>
<dt><a name="index-FontDef-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>char</code> <b>FontDef</b><i><code>[32]</code></i></dt>
<dd><p>Font style. See <code>SetFontDef()</code>.
</p></dd></dl>
<dl>
<dt><a name="index-RotatedText-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>bool</code> <b>RotatedText</b></dt>
<dd><p>Set to use or not text rotation along axis.
</p></dd></dl>

<hr size="6">
<a name="Palette-and-colors"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Font-settings" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Error-handling" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Pallete-and-colors"></a>
<h3 class="subsection">3.1.8 Pallete and colors</h3>
<a name="index-SetPalColor"></a>
<a name="index-SetPalNum"></a>
<a name="index-SetPalette"></a>
<a name="index-SetScheme"></a>
<a name="index-SelectPen"></a>

<dl>
<dt><a name="index-SetPalette-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetPalette</b><i> (<code>const char *</code><var>colors</var>)</i></dt>
<dt><a name="index-mgl_005fset_005fpalette"></a><u>C function:</u> <code>void</code> <b>mgl_set_palette</b><i> (<code>HMGL</code> gr, <code>const char *</code><var>colors</var>)</i></dt>
<dd><p>Sets the palette as selected colors. Default value is <code>&quot;Hbgrcmyhlnqeup&quot;</code> that corresponds to colors: dark gray &lsquo;<samp>H</samp>&rsquo;, blue &lsquo;<samp>b</samp>&rsquo;, green &lsquo;<samp>g</samp>&rsquo;, red &lsquo;<samp>r</samp>&rsquo;, cyan &lsquo;<samp>c</samp>&rsquo;, magenta &lsquo;<samp>m</samp>&rsquo;, yellow &lsquo;<samp>y</samp>&rsquo;, gray &lsquo;<samp>h</samp>&rsquo;, blue-green &lsquo;<samp>l</samp>&rsquo;, sky-blue &lsquo;<samp>n</samp>&rsquo;, orange &lsquo;<samp>q</samp>&rsquo;, yellow-green &lsquo;<samp>e</samp>&rsquo;, blue-violet &lsquo;<samp>u</samp>&rsquo;, purple &lsquo;<samp>p</samp>&rsquo;. The palette is used mostly in 1D plots (see section <a href="#g_t1D-plotting">1D plotting</a>) for curves which styles are not specified.
</p></dd></dl>

<dl>
<dt><a name="index-SetPalColor-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetPalColor</b><i> (<code>int</code> n, <code>float</code> r, <code>float</code> g, <code>float</code> b)</i></dt>
<dt><a name="index-mgl_005fset_005fpal_005fcolor"></a><u>C function:</u> <code>void</code> <b>mgl_set_pal_color</b><i> (<code>HMGL</code> gr, <code>int</code> n, <code>float</code> r, <code>float</code> g, <code>float</code> b)</i></dt>
<dd><p>Sets color for individual palette entry. Look at <code>SetPalette()</code> function for simplified palette setting.
</p></dd></dl>

<dl>
<dt><a name="index-SetPalNum-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetPalNum</b><i> (<code>int</code> num)</i></dt>
<dt><a name="index-mgl_005fset_005fpal_005fnum"></a><u>C function:</u> <code>void</code> <b>mgl_set_pal_num</b><i> (<code>HMGL</code> gr, <code>int</code> num)</i></dt>
<dd><p>Sets the number of actual colors in palette. The value must be less then 100. 
</p></dd></dl>

<dl>
<dt><a name="index-SetScheme-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetScheme</b><i> (<code>const char *</code>sch)</i></dt>
<dt><a name="index-mgl_005fset_005fscheme"></a><u>C function:</u> <code>void</code> <b>mgl_set_scheme</b><i> (<code>HMGL</code> gr, <code>const char *</code>sch)</i></dt>
<dd><p>Set the color scheme for following plots. Usually this function is used internally. See section <a href="mathgl_en_1.html#Color-scheme">Color scheme</a>.
</p></dd></dl>

<dl>
<dt><a name="index-SelectPen-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>SelectPen</b><i> (<code>const char *</code>sch)</i></dt>
<dd><p>Set the line and mark styles for following plots. Usually this function is used internally. See section <a href="mathgl_en_1.html#Line-styles">Line styles</a>.
</p></dd></dl>


<dl>
<dt><a name="index-Pal-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>mglColor</code> <b>Pal</b><i><code>[101]</code></i></dt>
<dd><p>Color palette for <a href="#g_t1D-plotting">1D plotting</a>. See <code>SetPalette()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-NumPal-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>int</code> <b>NumPal</b></dt>
<dd><p>Number of actual colors in palette. See <code>SetPalette()</code>.
</p></dd></dl>

<hr size="6">
<a name="Error-handling"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Palette-and-colors" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-settings" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Error-handling-1"></a>
<h3 class="subsection">3.1.9 Error handling</h3>

<a name="index-Message"></a>
<a name="index-SetWarn"></a>
<a name="index-GetWarnCode"></a>

<p>There are 2 variables which indicate the warnings/errors presence during plot creation. Normally user should set it to zero by <code>SetWarn(0);</code> before plotting and check if <var>WarnCode</var> is not zero after plotting. Only last warning will be saved. All warnings/errors produced by MathGL is not critical &ndash; the plot just will not be drawn.
</p>
<dl>
<dt><a name="index-SetWarn-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>SetWarn</b><i> (<code>int</code> code, <code>const char *</code>who=<code>&quot;&quot;</code>)</i></dt>
<dd><p>Set warning code and corresponding message from function <var>who</var>. Normally you should call this function only for clearing the warning state, i.e. call <code>SetWarn(0);</code>.
</p></dd></dl>

<dl>
<dt><a name="index-Message-of-mglGraph"></a><u>General option (C++) of mglGraph:</u> <code>char *</code> <b>Message</b></dt>
<dd><p>Pointer to buffer for writing messages about matters why some plot are not drawn. Set to NULL to disable messages. The buffer length must be at least 1024. If Message[0]==0 then there are no messages
</p></dd></dl>

<dl>
<dt><a name="index-GetWarnCode-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>int</code> <b>GetWarnCode</b><i> ()</i></dt>
<dt><a name="index-mgl_005fget_005fwarn_005fcode"></a><u>C function:</u> <code>int</code> <b>mgl_get_warn_code</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Return the numerical ID of warning about the not drawn plot. Possible values are:
</p><dl compact="compact">
<dt> <code>mglWarnNone=0</code></dt>
<dd><p>Everything OK
</p></dd>
<dt> <code>mglWarnDim</code></dt>
<dd><p>Data dimension(s) is incompatible
</p></dd>
<dt> <code>mglWarnLow</code></dt>
<dd><p>Data dimension(s) is too small
</p></dd>
<dt> <code>mglWarnNeg</code></dt>
<dd><p>Minimal data value is negative
</p></dd>
<dt> <code>mglWarnFile</code></dt>
<dd><p>No file or wrong data dimensions
</p></dd>
<dt> <code>mglWarnMem</code></dt>
<dd><p>Not enough memory
</p></dd>
<dt> <code>mglWarnZero</code></dt>
<dd><p>Data values are zero
</p></dd>
<dt> <code>mglWarnLegA</code></dt>
<dd><p>Too many legend entries
</p></dd>
<dt> <code>mglWarnLeg</code></dt>
<dd><p>No legend entries
</p></dd>
<dt> <code>mglWarnSlc</code></dt>
<dd><p>Slice value is out of range
</p></dd>
<dt> <code>mglWarnCnt</code></dt>
<dd><p>Number of contours is zero or negative
</p></dd>
<dt> <code>mglWarnOpen</code></dt>
<dd><p>Couldn&rsquo;t open file
</p></dd>
<dt> <code>mglWarnLId</code></dt>
<dd><p>Light: ID is out of range
</p></dd>
<dt> <code>mglWarnSize</code></dt>
<dd><p>Setsize: size(s) is zero or negative
</p></dd>
<dt> <code>mglWarnFmt</code></dt>
<dd><p>Format is not supported for that build
</p></dd>
</dl>
</dd></dl>

<dl>
<dt><a name="index-WarnCode-of-mglGraph"></a><u>Obsolete option of mglGraph:</u> <code>int</code> <b>WarnCode</b></dt>
<dd><p>Numerical ID of warning about the not drawn plot.
</p></dd></dl>

<hr size="6">
<a name="Other-settings"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Error-handling" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Axis-settings" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Graphics-setup" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Other-settings-1"></a>
<h3 class="subsection">3.1.10 Other settings</h3>
<a name="index-SetMeshNum"></a>
<a name="index-SetAxialDir"></a>
<a name="index-SetDrawFace"></a>
<a name="index-PlotId"></a>

<dl>
<dt><a name="index-SetMeshNum-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetMeshNum</b><i> (<code>int</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005fmeshnum"></a><u>C function:</u> <code>void</code> <b>mgl_set_meshnum</b><i> (<code>HMGL</code> gr, <code>int</code> num)</i></dt>
<dd><p>Sets approximate number of lines in Mesh(), Fall(), Grid() and also the number of hachures in Vect(), VectC(), Dew() and the number of cells in Cloud*(). By default (=0) it draws all lines/hachures/cells.
</p></dd></dl>

<dl>
<dt><a name="index-SetAxialDir-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetAxialDir</b><i> (<code>char</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005faxial_005fdir"></a><u>C function:</u> <code></code> <b>mgl_set_axial_dir</b><i> (<code>HMGL</code> gr, <code>char</code> dir)</i></dt>
<dd><p>Sets direction around which curve rotated in Axial() and Torus(). Default value is &rsquo;z&rsquo;.
</p></dd></dl>

<dl>
<dt><a name="index-SetDrawFace-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetDrawFace</b><i> (<code>bool</code> val)</i></dt>
<dt><a name="index-mgl_005fset_005fdraw_005fface"></a><u>C function:</u> <code>void</code> <b>mgl_set_draw_face</b><i> (<code>HMGL</code> gr, <code>int</code> val)</i></dt>
<dd><p>Enable/disable faces drawing. It is useful for speeding up drawing (for example, during rotation and so on).
</p></dd></dl>

<dl>
<dt><a name="index-PlotId-of-mglGraph"></a><u>General option (C++) of mglGraph:</u> <code>const char *</code> <b>PlotId</b></dt>
<dd><p>Id of plot for saving filename (in GLUT window for example).
</p></dd></dl>

<dl>
<dt><a name="index-MeshNum-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>int</code> <b>MeshNum</b></dt>
<dd><p>Sets approximate number of lines/hachures/cells. See <code>SetMeshNum()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-AxialDir-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>char</code> <b>AxialDir</b></dt>
<dd><p>Set rotation direction. See <code>SetAxialDir()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-DrawFace-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>bool</code> <b>DrawFace</b></dt>
<dd><p>Flag for preventing faces drawing. See <code>SetDrawFace()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-CirclePnts-of-mglGraph"></a><u>General option (C++) of mglGraph:</u> <code>int</code> <b>CirclePnts</b></dt>
<dd><p>Number of points used for a circle approximation (for example, in <a href="#Primitives-drawing">Primitives drawing</a>, <a href="#Tube">Tube</a>, <a href="#Pipe">Pipe</a> and so on). Default value is 40.
</p></dd></dl>

<dl>
<dt><a name="index-GridPnts-of-mglGraph"></a><u>General option (C++) of mglGraph:</u> <code>int</code> <b>GridPnts</b></dt>
<dd><p>Number of points used for grid lines drawing (it is important for curved coordinates). Default value is 50.
</p></dd></dl>

<hr size="6">
<a name="Axis-settings"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Other-settings" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Ranges-_0028bounding-box_0029" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Axis-settings-1"></a>
<h2 class="section">3.2 Axis settings</h2>

<p>These large set of variables and functions control how the axis and ticks will be drawn. Note that there is 3-step transformation of data coordinates are performed. Firstly, coordinates are projected if <code>Cut=true</code> (see section <a href="#Cutting">Cutting</a>), after it transformation formulas are applied, and finally the data was normalized in bounding box.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Ranges-_0028bounding-box_0029">3.2.1 Ranges (bounding box)</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Curved-coordinates">3.2.2 Curved coordinates</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Ticks">3.2.3 Ticks</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
</table>

<hr size="6">
<a name="Ranges-_0028bounding-box_0029"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Axis-settings" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Curved-coordinates" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Axis-settings" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Ranges-_0028bounding-box_0029-1"></a>
<h3 class="subsection">3.2.1 Ranges (bounding box)</h3>
<a name="index-Axis"></a>
<a name="index-CAxis"></a>
<a name="index-XRange"></a>
<a name="index-YRange"></a>
<a name="index-ZRange"></a>
<a name="index-Min"></a>
<a name="index-Max"></a>
<a name="index-Cmin"></a>
<a name="index-Cmax"></a>
<a name="index-RecalcBorder"></a>
<a name="index-Org"></a>
<a name="index-AutoOrg"></a>
<a name="index-SetRanges"></a>
<a name="index-SetAutoRanges"></a>

<dl>
<dt><a name="index-SetRanges-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetRanges</b><i> (<code>float</code> x1, <code>float</code> x2, <code>float</code> y1, <code>float</code> y2, <code>float</code> z1=<code>0</code>, <code>float</code> z2=<code>0</code>)</i></dt>
<dt><a name="index-Axis-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Axis</b><i> (<code>mglPoint</code> min, <code>mglPoint</code> max, <code>mglPoint</code> org=<code>mglPoint(NAN,NAN,NAN)</code>)</i></dt>
<dt><a name="index-mgl_005fset_005faxis_005f2d"></a><u>C function:</u> <code>void</code> <b>mgl_set_axis_2d</b><i> (<code>HMGL</code> gr, <code>float</code> x1, <code>float</code> y1, <code>float</code> x2, <code>float</code> y2)</i></dt>
<dt><a name="index-mgl_005fset_005faxis_005f3d"></a><u>C function:</u> <code>void</code> <b>mgl_set_axis_3d</b><i> (<code>HMGL</code> gr, <code>float</code> x1, <code>float</code> y1, <code>float</code> z1, <code>float</code> x2, <code>float</code> y2, <code>float</code> z2)</i></dt>
<dd><p>Safely sets the value for <var>Min</var>, <var>Max</var> and <var>Org</var> members (options) of the class. If minimal and maximal values of the coordinate are the same then they are ignored. This function also sets <var>Cmin</var>=<code>Min.z</code> and <var>Cmax</var>=<code>Max.z</code>. This is default color range for 2d plots.
</p></dd></dl>

<dl>
<dt><a name="index-SetCRange"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetCRange</b><i> (<code>float</code> min, <code>float</code> max)</i></dt>
<dt><a name="index-CAxis-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>CAxis</b><i> (<code>float</code> min, <code>float</code> max)</i></dt>
<dt><a name="index-mgl_005fset_005fcaxis"></a><u>C function:</u> <code>void</code> <b>mgl_set_caxis</b><i> (<code>HMGL</code> gr, <code>float</code> min, <code>float</code> max)</i></dt>
<dd><p>Safely sets minimal and maximal values of data for coloring. This values are used later for determining the color of the surface.
</p></dd></dl>

<dl>
<dt><a name="index-XRange-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>XRange</b><i> (<code>const mglData &amp;</code> dat, <code>bool</code> add=<code>false</code>, <code>float</code> fact=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fset_005fxrange"></a><u>C function:</u> <code>void</code> <b>mgl_set_xrange</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>int</code> add)</i></dt>
<dd><p>Sets values of <code>Min.x</code> and <code>Max.x</code> as minimal and maximal values of data <var>a</var>. Parameter <var>add</var> specify to add or not the new range to current one. Parameter <var>fact</var> add additional range increase on value (<var>Max</var>-<var>Min</var>)*<var>fact</var>. See also Axis().
</p></dd></dl>

<dl>
<dt><a name="index-YRange-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>YRange</b><i> (<code>const mglData &amp;</code> dat, <code>bool</code> add=<code>false</code>, <code>float</code> fact=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fset_005fyrange"></a><u>C function:</u> <code>void</code> <b>mgl_set_yrange</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>int</code> add)</i></dt>
<dd><p>Sets values of <code>Min.y</code> and <code>Max.y</code> as minimal and maximal values of data <var>a</var>. Parameter <var>add</var> specify to add or not the new range to current one. Parameter <var>fact</var> add additional range increase on value (<var>Max</var>-<var>Min</var>)*<var>fact</var>. See also Axis().
</p></dd></dl>

<dl>
<dt><a name="index-ZRange-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ZRange</b><i> (<code>const mglData &amp;</code> dat, <code>bool</code> add=<code>false</code>, <code>float</code> fact=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fset_005fzrange"></a><u>C function:</u> <code>void</code> <b>mgl_set_zrange</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>int</code> add)</i></dt>
<dd><p>Sets values of <code>Min.z</code> and <code>Max.z</code> as minimal and maximal values of data <var>a</var>. Parameter <var>add</var> specify to add or not the new range to current one. Parameter <var>fact</var> add additional range increase on value (<var>Max</var>-<var>Min</var>)*<var>fact</var>. See also Axis().
</p></dd></dl>

<dl>
<dt><a name="index-CRange"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>CRange</b><i> (<code>const mglData &amp;</code> dat, <code>bool</code> add=<code>false</code>, <code>float</code> fact=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fset_005fcrange"></a><u>C function:</u> <code>void</code> <b>mgl_set_crange</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>int</code> add)</i></dt>
<dd><p>Sets values of <code>Cmin</code> and <code>Cmax</code> as minimal and maximal values of data <var>a</var>. Parameter <var>add</var> specify to add or not the new range to current one. Parameter <var>fact</var> add additional range increase on value (<var>Cmax</var>-<var>Cmin</var>)*<var>fact</var>. See also CAxis().
</p></dd></dl>

<dl>
<dt><a name="index-SetAutoRanges-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetAutoRanges</b><i> (<code>float</code> x1, <code>float</code> x2, <code>float</code> y1=<code>0</code>, <code>float</code> y2=<code>0</code>, <code>float</code> z1=<code>0</code>, <code>float</code> z2=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fset_005fauto"></a><u>C function:</u> <code>void</code> <b>mgl_set_auto</b><i> (<code>HMGL</code> gr, <code>float</code> x1, <code>float</code> x2, <code>float</code> y1, <code>float</code> y2, <code>float</code> z1, <code>float</code> z2)</i></dt>
<dd><p>Sets ranges for automatic variables of plots. It act as changing of <var>Min</var>, <var>Max</var> proprties without calling of RecalcBorder(). Function don&rsquo;t change the direction if minimal and maximal values are the same. For example, if y<var>y1</var>=<var>y2</var> then ranges along y-direction will not be changed (will be used previous one). Note that the automatic range become axis range after next call of [XYZ]Range() function(s).
</p></dd></dl>

<dl>
<dt><a name="index-SetOrigin"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetOrigin</b><i> (<code>float</code> x0, <code>float</code> y0, <code>float</code> z0=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fset_005forigin"></a><u>C function:</u> <code>void</code> <b>mgl_set_origin</b><i> (<code>HMGL</code> gr, <code>float</code> x0, <code>float</code> y0, <code>float</code> z0)</i></dt>
<dd><p>Sets center of axis cross section. If one of values is NAN then MathGL library try to select optimal axis position.
</p></dd></dl>

<dl>
<dt><a name="index-RecalcBorder-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>RecalcBorder</b><i> ()</i></dt>
<dd><p>Recalculates internal parameter for correct apply of transformation rules. <strong>Must be called</strong> after any direct change of members <var>Min</var>, <var>Max</var>, <var>fx</var>, <var>fy</var>, <var>fz</var> if its changes should be seen on the plot.
</p></dd></dl>

<dl>
<dt><a name="index-Min_002c-Max-of-mglGraph"></a><u>General option (C++) of mglGraph:</u> <code>mglPoint</code> <b>Min, Max</b></dt>
<dd><p>Lower and upper edges of bounding box for graphics. These variables are used for determining the range of automatic (non-specified) arrays in most of plotting functions. So, you may change it before plot and return it back after it and the plot will have automatic x-(y-,z-)coordinate normalized in this range but not in bounding box. <strong>BUT</strong> if you want to change the bounding box then you <strong>must</strong> call <code>RecalcBorder();</code> after it or use Axis() function.
</p></dd></dl>

<dl>
<dt><a name="index-Cmin_002c-Cmax-of-mglGraph"></a><u>General option (C++) of mglGraph:</u> <code>float</code> <b>Cmin, Cmax</b></dt>
<dd><p>Minimal and maximal value for data (used for coloring).
</p></dd></dl>

<dl>
<dt><a name="index-Org-of-mglGraph"></a><u>General option (C++) of mglGraph:</u> <code>mglPoint</code> <b>Org</b></dt>
<dd><p>Center of axis cross section. If one of values is NAN then MathGL library try to select optimal axis position.
</p></dd></dl>

<dl>
<dt><a name="index-AutoOrg-of-mglGraph"></a><u>General option (C++) of mglGraph:</u> <code>bool</code> <b>AutoOrg</b></dt>
<dd><p>Flag for automatic shifting of axes origin <var>Org</var> if it lies out of range <var>Min</var> ... <var>Max</var>.
</p></dd></dl>


<hr size="6">
<a name="Curved-coordinates"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Ranges-_0028bounding-box_0029" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Ticks" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Axis-settings" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Curved-coordinates-1"></a>
<h3 class="subsection">3.2.2 Curved coordinates</h3>
<a name="index-SetFunc"></a>
<a name="index-SetCoor"></a>
<a name="index-Ternary"></a>

<dl>
<dt><a name="index-SetFunc-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetFunc</b><i> (<code>const char *</code>EqX, <code>const char *</code>EqY, <code>const char *</code>EqZ=<code>&quot;&quot;</code>, <code>const char *</code>EqA=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fset_005ffunc"></a><u>C function:</u> <code>void</code> <b>mgl_set_func</b><i> (<code>HMGL</code> gr, <code>const char *</code>EqX, <code>const char *</code>EqY, <code>const char *</code>EqZ)</i></dt>
<dt><a name="index-mgl_005fset_005ffunc_005fext"></a><u>C function:</u> <code>void</code> <b>mgl_set_func_ext</b><i> (<code>HMGL</code> gr, <code>const char *</code>EqX, <code>const char *</code>EqY, <code>const char *</code>EqZ, <code>const char *</code>EqA)</i></dt>
<dd><p>Sets transformation formulas for curvilinear coordinate. Each string should contain mathematical expression for real coordinate depending on internal coordinates &lsquo;<samp>x</samp>&rsquo;, &lsquo;<samp>y</samp>&rsquo;, &lsquo;<samp>z</samp>&rsquo; and &lsquo;<samp>a</samp>&rsquo; or &lsquo;<samp>c</samp>&rsquo; for colorbar. For example, the cylindrical coordinates are introduced as <code>Axis(&quot;x*cos(y)&quot;, &quot;x*sin(y)&quot;, &quot;z&quot;);</code>. For removing of formulas the corresponding parameter should be empty or <code>NULL</code>. Using transformation formulas will slightly slowing the program. Parameter <var>EqA</var> set the similar transformation formula for color scheme. See section <a href="mathgl_en_1.html#Textual-formulas">Textual formulas</a>.
</p></dd></dl>

<dl>
<dt><a name="index-SetCoor-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetCoor</b><i> (<code>int</code> how)</i></dt>
<dt><a name="index-mgl_005fset_005fcoor"></a><u>C function:</u> <code>void</code> <b>mgl_set_coor</b><i> (<code>HMGL</code> gr, <code>int</code> how)</i></dt>
<dd><p>Sets one of the predefined transformation formulas for curvilinear coordinate. Paramater <var>how</var> define the coordinates: <code>mglCartesian=0</code> &ndash; Cartesian coordinates (no transformation); <code>mglPolar=1</code> &ndash; Polar coordiantes <em>x_n=x*cos(y),y_n=x*sin(y), z_n=z</em>; <code>mglSpherical=2</code> &ndash; Sperical coordinates <em>x_n=x*sin(y)*cos(z), y_n=x*sin(y)*sin(z), z_n=x*cos(y)</em>; <code>mglParabolic=3</code> &ndash; Parabolic coordinates <em>x_n=x*y, y_n=(x*x-y*y)/2, z_n=z</em>; <code>mglParaboloidal=4</code> &ndash; Paraboloidal coordinates <em>x_n=(x*x-y*y)*cos(z)/2, y_n=(x*x-y*y)*sin(z)/2, z_n=x*y</em>; <code>mglOblate=5</code> &ndash; Oblate coordinates <em>x_n=cosh(x)*cos(y)*cos(z), y_n=cosh(x)*cos(y)*sin(z), z_n=sinh(x)*sin(y)</em>; <code>mglProlate=6</code> &ndash; Prolate coordinates <em>x_n=sinh(x)*sin(y)*cos(z), y_n=sinh(x)*sin(y)*sin(z), z_n=cosh(x)*cos(y)</em>; <code>mglElliptic=7</code> &ndash; Elliptic coordinates <em>x_n=cosh(x)*cos(y), y_n=sinh(x)*sin(y), z_n=z</em>; <code>mglToroidal=8</code> &ndash; Toroidal coordinates <em>x_n=sinh(x)*cos(z)/(cosh(x)-cos(y)), y_n=sinh(x)*sin(z)/(cosh(x)-cos(y)), z_n=sin(y)/(cosh(x)-cos(y))</em>; <code>mglBispherical=9</code> &ndash; Bispherical coordinates <em>x_n=sin(y)*cos(z)/(cosh(x)-cos(y)), y_n=sin(y)*sin(z)/(cosh(x)-cos(y)), z_n=sinh(x)/(cosh(x)-cos(y))</em>; <code>mglBipolar=10</code> &ndash; Bipolar coordinates <em>x_n=sinh(x)/(cosh(x)-cos(y)), y_n=sin(y)/(cosh(x)-cos(y)), z_n=z</em>.
</p></dd></dl>

<dl>
<dt><a name="index-Ternary-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Ternary</b><i> (<code>bool</code> tern)</i></dt>
<dt><a name="index-mgl_005fset_005fternary"></a><u>C function:</u> <code>void</code> <b>mgl_set_ternary</b><i> (<code>HMGL</code> gr, <code>int</code> tern)</i></dt>
<dd><p>The function sets to draws Ternary plot. This special plot is for 3 dependent coordinates (components) <var>a</var>, <var>b</var>, <var>c</var> so that <var>a</var>+<var>b</var>+<var>c</var>=1. MathGL uses only 2 independent coordinates <var>a</var>=x and <var>b</var>=y since it is enough to plot everything. At this third coordinate z act as another parameter to produce contour lines, surfaces and so on. See section <a href="mathgl_en_9.html#Ternary-plot-sample">Ternary plot sample</a>, for sample code and picture.
</p></dd></dl>

<hr size="6">
<a name="Ticks"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Curved-coordinates" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Transformation-matrix" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Axis-settings" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Ticks-1"></a>
<h3 class="subsection">3.2.3 Ticks</h3>

<a name="index-SetTicks"></a>
<a name="index-SetTicksVal"></a>
<a name="index-SetTuneTicks"></a>
<a name="index-AdjustTicks"></a>
<a name="index-SetXTT"></a>
<a name="index-SetYTT"></a>
<a name="index-SetZTT"></a>
<a name="index-SetCTT"></a>

<dl>
<dt><a name="index-AdjustTicks-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>AdjustTicks</b><i> (<code>const char *</code>dir=<code>&quot;xyz&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fadjust_005fticks"></a><u>C function:</u> <code>void</code> <b>mgl_adjust_ticks</b><i> (<code>HMGL</code> gr, <code>const char *</code>dir)</i></dt>
<dd><p>Set the ticks step, number of sub-ticks and initial ticks position to be the most human readable for the axis along direction(s) <var>dir</var>. Also set <code>SetTuneTicks(true)</code>.
</p></dd></dl>

<dl>
<dt><a name="index-SetTicks-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetTicks</b><i> (<code>char</code> dir, <code>float</code> d=<code>-5</code>, <code>int</code> ns=<code>0</code>, <code>float</code> org=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fset_005fticks_005fdir"></a><u>C function:</u> <code>void</code> <b>mgl_set_ticks_dir</b><i> (<code>HMGL</code> gr, <code>char</code> dir, <code>float</code> d, <code>int</code> ns, <code>float</code> org)</i></dt>
<dt><a name="index-mgl_005fset_005fticks"></a><u>C function:</u> <code>void</code> <b>mgl_set_ticks</b><i> (<code>HMGL</code> gr, <code>float</code> dx, <code>float</code> dy, <code>float</code> dz)</i></dt>
<dt><a name="index-mgl_005fset_005fsubticks"></a><u>C function:</u> <code>void</code> <b>mgl_set_subticks</b><i> (<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> nz)</i></dt>
<dt><a name="index-mgl_005fset_005ftick_005forigin"></a><u>C function:</u> <code>void</code> <b>mgl_set_tick_origin</b><i> (<code>HMGL</code> gr, <code>float</code> x0, <code>float</code> y0, <code>float</code> z0)</i></dt>
<dd><p>Set the ticks step <var>d</var>, number of sub-ticks <var>ns</var> and initial ticks position <var>org</var> for the axis along direction <var>dir</var> (use &rsquo;c&rsquo; for colorbar ticks). Variable <var>d</var> set step for axis ticks (if positive) or it&rsquo;s number on the axis range (if negative). Zero value set logarithmic ticks. If <var>org</var> value is NAN then value from <var>Org</var> is used.
</p></dd></dl>

<dl>
<dt><a name="index-SetTicksVal-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetTicksVal</b><i> (<code>char</code> dir, <code>int</code> n, <code>float *</code>val, <code>const char **</code>lbl)</i></dt>
<dt><a name="index-SetTicksVal-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetTicksVal</b><i> (<code>char</code> dir, <code>int</code> n, <code>float *</code>val, <code>const wchar_t **</code>lbl)</i></dt>
<dt><a name="index-SetTicksVal-3"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>SetTicksVal</b><i> (<code>char</code> dir, <code>int</code> n, <code>float</code> val1, <code>wchar_t *</code>lbl1, ...)</i></dt>
<dt><a name="index-mgl_005fset_005fticks_005fvals"></a><u>C function:</u> <code>void</code> <b>mgl_set_ticks_vals</b><i> (<code>HMGL</code> gr, <code>char</code> dir, <code>int</code> n, <code>float *</code>val, <code>const char **</code>lbl)</i></dt>
<dt><a name="index-mgl_005fset_005fticks_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_set_ticks_val</b><i> (<code>HMGL</code> gr, <code>char</code> dir, <code>int</code> n, <code>double</code> val, <code>const char *</code>lbl, ...)</i></dt>
<dd><p>Set the manual positions <var>val</var> and its labels <var>lbl</var> for <var>n</var>-th ticks along axis <var>dir</var>. The arrays <var>val</var> and <var>lbl</var> must contain <var>n</var> elements. Use <code>SetTicks()</code> to restore automatic ticks. Note, you <strong>have to be</strong> very careful to use floating-point (not integer!!!) values as ticks position due to limitations of stdarg library (argument transfer). See section <a href="mathgl_en_9.html#Manual-ticks-sample">Tick values sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-SetTuneTicks-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetTuneTicks</b><i> (<code>bool</code> tune, <code>float</code> pos=<code>1.15</code>)</i></dt>
<dt><a name="index-mgl_005ftune_005fticks"></a><u>C function:</u> <code>void</code> <b>mgl_tune_ticks</b><i> (<code>HMGL</code> gr, <code>bool</code> tune, <code>float</code> pos)</i></dt>
<dd><p>Switch on/off ticks enhancing by factoring common multiplier (for small, like from 0.001 to 0.002, or large, like from 1000 to 2000, coordinate values) or common component (for narrow range, like from 0.999 to 1.000). Also set the position <var>pos</var> of common multiplier/component on the axis: =0 at minimal axis value, =1 at maximal axis value. Default value is 1.15.
</p></dd></dl>

<dl>
<dt><a name="index-SetXTT-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetXTT</b><i> (<code>const char *</code>xtt)</i></dt>
<dt><a name="index-SetYTT-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetYTT</b><i> (<code>const char *</code>ytt)</i></dt>
<dt><a name="index-SetZTT-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetZTT</b><i> (<code>const char *</code>ztt)</i></dt>
<dt><a name="index-SetCTT-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetCTT</b><i> (<code>const char *</code>ctt)</i></dt>
<dt><a name="index-SetXTT-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetXTT</b><i> (<code>const wchar_t *</code>xtt)</i></dt>
<dt><a name="index-SetYTT-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetYTT</b><i> (<code>const wchar_t *</code>ytt)</i></dt>
<dt><a name="index-SetZTT-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetZTT</b><i> (<code>const wchar_t *</code>ztt)</i></dt>
<dt><a name="index-SetCTT-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetCTT</b><i> (<code>const wchar_t *</code>ctt)</i></dt>
<dt><a name="index-mgl_005fset_005fxttw"></a><u>C function:</u> <code>void</code> <b>mgl_set_xttw</b><i> (<code>HMGL</code> gr, <code>const wchar_t *</code>xtt)</i></dt>
<dt><a name="index-mgl_005fset_005fyttw"></a><u>C function:</u> <code>void</code> <b>mgl_set_yttw</b><i> (<code>HMGL</code> gr, <code>const wchar_t *</code>ytt)</i></dt>
<dt><a name="index-mgl_005fset_005fzttw"></a><u>C function:</u> <code>void</code> <b>mgl_set_zttw</b><i> (<code>HMGL</code> gr, <code>const wchar_t *</code>ztt)</i></dt>
<dt><a name="index-mgl_005fset_005fcttw"></a><u>C function:</u> <code>void</code> <b>mgl_set_cttw</b><i> (<code>HMGL</code> gr, <code>const wchar_t *</code>ctt)</i></dt>
<dt><a name="index-mgl_005fset_005fxtt"></a><u>C function:</u> <code>void</code> <b>mgl_set_xtt</b><i> (<code>HMGL</code> gr, <code>const wchar_t *</code>xtt)</i></dt>
<dt><a name="index-mgl_005fset_005fytt"></a><u>C function:</u> <code>void</code> <b>mgl_set_ytt</b><i> (<code>HMGL</code> gr, <code>const wchar_t *</code>ytt)</i></dt>
<dt><a name="index-mgl_005fset_005fztt"></a><u>C function:</u> <code>void</code> <b>mgl_set_ztt</b><i> (<code>HMGL</code> gr, <code>const wchar_t *</code>ztt)</i></dt>
<dt><a name="index-mgl_005fset_005fctt"></a><u>C function:</u> <code>void</code> <b>mgl_set_ctt</b><i> (<code>HMGL</code> gr, <code>const wchar_t *</code>ctt)</i></dt>
<dd><p>The template for x-,y-,z-axis ticks or colorbar ticks. It may contain TeX symbols also. If <var>xtt</var>, <var>ytt</var>, <var>ztt</var>, <var>ctt</var>=<code>&quot;&quot;</code> then default template is used (in simplest case it is &lsquo;<samp>%.2g</samp>&rsquo;). Setting of template switch off automatic ticks tuning (see <code>SetTuneTicks()</code>).
</p></dd></dl>

<dl>
<dt><a name="index-dx_002c-dy_002c-dz-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>float</code> <b>dx, dy, dz</b></dt>
<dd><p>Step for axis ticks. See <code>SetTicks()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-NSx_002c-NSy_002c-NSz-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>int</code> <b>NSx, NSy, NSz</b></dt>
<dd><p>Number of axis sub-ticks. See <code>SetTicks()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-OrgT-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>mglPoint</code> <b>OrgT</b></dt>
<dd><p>Starting point for ticks. See <code>SetTicks()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-TuneTicks-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>bool</code> <b>TuneTicks</b></dt>
<dd><p>Switch on/off ticks enhancing by factoring common multiplier. See <code>SetTuneTicks()</code>.
</p></dd></dl>

<dl>
<dt><a name="index-FactorPos-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>float</code> <b>FactorPos</b></dt>
<dd><p>The position of common multiplier/component on the axis. See <code>SetTuneTicks()</code>.
</p></dd></dl>


<hr size="6">
<a name="Transformation-matrix"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Ticks" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Export-to-file" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Transformation-matrix-1"></a>
<h2 class="section">3.3 Transformation matrix</h2>
<a name="index-Aspect"></a>
<a name="index-Rotate"></a>
<a name="index-RotateN"></a>
<a name="index-SubPlot"></a>
<a name="index-StickPlot"></a>
<a name="index-InPlot"></a>
<a name="index-Identity"></a>
<a name="index-Perspective"></a>
<a name="index-RestoreM"></a>
<a name="index-View"></a>
<a name="index-ColumnPlot"></a>
<a name="index-Push"></a>
<a name="index-Pop"></a>

<p>These functions control how and where further plotting will be placed. There is a curtain order of calling of these functions for the better plot view. First one should be SubPlot() or InPlot() for specifying the place. After it a Rotate() and Aspect(). And finally any other plotting functions may be called. Alternatevely you can use ColumnPlot() for position plots in the column one by another without gap between plot axis (bounding boxes).
</p>
<dl>
<dt><a name="index-SubPlot-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SubPlot</b><i> (<code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>float</code> dx=<code>0</code>, <code>float</code> dy=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fsubplot"></a><u>C function:</u> <code>void</code> <b>mgl_subplot</b><i> (<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> m)</i></dt>
<dt><a name="index-mgl_005fsubplot_005fd"></a><u>C function:</u> <code>void</code> <b>mgl_subplot_d</b><i> (<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>float</code> dx, <code>float</code> dy)</i></dt>
<dd><p>Puts further plotting in a <var>m</var>-th cell of <var>nx</var>*<var>ny</var> grid of the whole frame area. This function set off any aspects or rotations. So it should be used first for creating the subplot. From the aesthetical point of view it is not recommended to use this function with different matrices in the same frame. The position of the cell can be shifted from its default position by relative size <var>dx</var>, <var>dy</var>.
</p></dd></dl>

<dl>
<dt><a name="index-SubPlot-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SubPlot</b><i> (<code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>const char *</code>style)</i></dt>
<dt><a name="index-mgl_005fsubplot_005fs"></a><u>C function:</u> <code>void</code> <b>mgl_subplot_s</b><i> (<code>HMGL</code> gr, <code>int</code> nx, <code>int</code> ny, <code>int</code> m, <code>const char *</code>style)</i></dt>
<dd><p>The same as previous but space reserved for axis/colorbar is saved only if <var>style</var> contain: &lsquo;<samp>L</samp>&rsquo; or &lsquo;<samp>&lt;</samp>&rsquo; &ndash; at left side, &lsquo;<samp>R</samp>&rsquo; or &lsquo;<samp>&gt;</samp>&rsquo; &ndash; at right side, &lsquo;<samp>A</samp>&rsquo; or &lsquo;<samp>^</samp>&rsquo; &ndash; at top side, &lsquo;<samp>U</samp>&rsquo; or &lsquo;<samp>_</samp>&rsquo; &ndash; at bottom side.
</p></dd></dl>

<dl>
<dt><a name="index-InPlot-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>InPlot</b><i> (<code>float</code> x1, <code>float</code> x2, <code>float</code> y1, <code>float</code> y2, <code>bool</code> rel=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005finplot"></a><u>C function:</u> <code>void</code> <b>mgl_inplot</b><i> (<code>HMGL</code> gr, <code>float</code> x1, <code>float</code> x2, <code>float</code> y1, <code>float</code> y2)</i></dt>
<dt><a name="index-mgl_005frelplot"></a><u>C function:</u> <code>void</code> <b>mgl_relplot</b><i> (<code>HMGL</code> gr, <code>float</code> x1, <code>float</code> x2, <code>float</code> y1, <code>float</code> y2)</i></dt>
<dd><p>Puts further plotting in some region of the whole frame surface. This function allows one to create a plot in arbitrary place of the screen. The position is defined by rectangular coordinates [<var>x1</var>, <var>x2</var>]*[<var>y1</var>, <var>y2</var>]. The coordinates <var>x1</var>, <var>x2</var>, <var>y1</var>, <var>y2</var> are normalized to interval [0, 1]. If parameter <var>rel</var>=<code>true</code> then the relative position to current SubPlot() (or last InPlot() with <var>rel</var>=<code>false</code>) is used. This function set off any aspects or rotations. So it should be used first for creating subplot.
</p></dd></dl>

<dl>
<dt><a name="index-ColumnPlot-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ColumnPlot</b><i> (<code>int</code> num, <code>int</code> ind, <code>float</code> d=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fcolumnplot"></a><u>C function:</u> <code>void</code> <b>mgl_columnplot</b><i> (<code>HMGL</code> gr, <code>int</code> num, <code>int</code> ind)</i></dt>
<dt><a name="index-mgl_005fcolumnplot_005fd"></a><u>C function:</u> <code>void</code> <b>mgl_columnplot_d</b><i> (<code>HMGL</code> gr, <code>int</code> num, <code>int</code> ind, <code>float</code> d)</i></dt>
<dd><p>Puts further plotting in <var>ind</var>-th cell of column with <var>num</var> cells. The position is relative to previous SubPlot() call (or InPlot() with <var>rel</var>=<code>false</code>). Parameter <var>d</var> set extra gap between cells. See section <a href="mathgl_en_9.html#ColumnPlot-sample">ColumnPlot sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-StickPlot-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>StickPlot</b><i> (<code>int</code> num, <code>int</code> ind, <code>float</code> tet, <code>float</code> phi)</i></dt>
<dt><a name="index-mgl_005fstickplot"></a><u>C function:</u> <code>void</code> <b>mgl_stickplot</b><i> (<code>HMGL</code> gr, <code>int</code> num, <code>int</code> ind, <code>float</code> tet, <code>float</code> phi)</i></dt>
<dd><p>Puts further plotting in <var>ind</var>-th cell of stick with <var>num</var> cells. At this, stick is rotated on angles <var>tet</var>, <var>phi</var>. The position is relative to previous SubPlot() call (or InPlot() with <var>rel</var>=<code>false</code>). See section <a href="mathgl_en_9.html#StickPlot-sample">StickPlot sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Rotate-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Rotate</b><i> (<code>float</code> TetX, <code>float</code> TetZ, <code>float</code> TetY=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005frotate"></a><u>C function:</u> <code>void</code> <b>mgl_rotate</b><i> (<code>HMGL</code> gr, <code>float</code> TetX, <code>float</code> TetZ, <code>float</code> TetY)</i></dt>
<dd><p>Rotates a further plotting relative to each axis {x, z, y} consecutively on angles <var>TetX</var>, <var>TetZ</var>, <var>TetY</var>.
</p></dd></dl>

<dl>
<dt><a name="index-RotateN-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>RotateN</b><i> (<code>float</code> Tet, <code>float</code> x, <code>float</code> y, <code>float</code> z)</i></dt>
<dt><a name="index-mgl_005frotate_005fvector"></a><u>C function:</u> <code>void</code> <b>mgl_rotate_vector</b><i> (<code>HMGL</code> gr, <code>float Tet</code>, <code>float x</code>, <code>float y</code>, <code>float z</code>)</i></dt>
<dd><p>Rotates a further plotting around vector {<var>x</var>, <var>y</var>, <var>z</var>} on angle <var>Tet</var>.
</p></dd></dl>

<dl>
<dt><a name="index-Aspect-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Aspect</b><i> (<code>float</code> Ax, <code>float</code> Ay, <code>float</code> Az)</i></dt>
<dt><a name="index-mgl_005faspect"></a><u>C function:</u> <code>void</code> <b>mgl_aspect</b><i> (<code>HMGL</code> gr, <code>float</code> Ax, <code>float</code> Ay, <code>float</code> Az)</i></dt>
<dd><p>Defines aspect ratio for the plot. The viewable axes will be related one to another as the ratio <var>Ax:Ay:Az</var>. For the best effect it should be used after Rotate() function.
</p></dd></dl>

<dl>
<dt><a name="index-Perspective-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Perspective</b><i> (<code>float</code> a)</i></dt>
<dt><a name="index-mgl_005fperspective"></a><u>C function:</u> <code>void</code> <b>mgl_perspective</b><i> (<code>HMGL</code> gr, <code>float</code> a)</i></dt>
<dd><p>Add (switch on) the perspective to plot. The parameter <em>a ~ 1/z_eff \in [0,1)</em>. By default (<code>a=0</code>) the perspective is off.
</p></dd></dl>

<dl>
<dt><a name="index-Identity-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Identity</b><i> (<code>bool</code> rel=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005fidentity"></a><u>C function:</u> <code>void</code> <b>mgl_identity</b><i> (<code>HMGL</code> gr, <code>int</code> rel)</i></dt>
<dd><p>Clears transformation matrix. This function clears all previous effects of Aspect(), SubPlot(), InPlot() or Rotate() functions. It is equivalent to the call of <code>InPlot(0,1,0,1,rel)</code>.
</p></dd></dl>

<dl>
<dt><a name="index-Push-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Push</b><i> ()</i></dt>
<dt><a name="index-mgl_005fmat_005fpush"></a><u>C function:</u> <code>void</code> <b>mgl_mat_push</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Push transformation matrix into stack. Later you can restore its current state by Pop() function. Stack can keep up to 10 matrices.
</p></dd></dl>

<dl>
<dt><a name="index-Pop-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Pop</b><i> ()</i></dt>
<dt><a name="index-mgl_005fmat_005fpop"></a><u>C function:</u> <code>void</code> <b>mgl_mat_pop</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Pop (restore last &rsquo;pushed&rsquo;) transformation matrix into stack.
</p></dd></dl>

<hr size="6">
<a name="Export-to-file"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Transformation-matrix" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Primitives-drawing" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Export-to-file-1"></a>
<h2 class="section">3.4 Export to file</h2>
<a name="index-WriteFrame"></a>
<a name="index-WritePNG"></a>
<a name="index-WriteGIF"></a>
<a name="index-WriteIDTF"></a>
<a name="index-WriteSVG"></a>
<a name="index-WriteBMP"></a>
<a name="index-WriteEPS"></a>
<a name="index-WriteJPEG"></a>
<a name="index-SetSize"></a>
<a name="index-Flush"></a>
<a name="index-Finish"></a>
<a name="index-ShowImage"></a>

<p>These functions export current view to a graphic file. The filename <var>fname</var> should have appropriate extension. Parameter <var>descr</var> gives the short description of the picture. Just now the transparency is supported in PNG and SVG files.
</p>
<dl>
<dt><a name="index-WriteFrame-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>WriteFrame</b><i> (<code>const char *</code>fname=<code>&quot;&quot;</code>, <code>const char *</code>descr=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fwrite_005fframe"></a><u>C function:</u> <code>void</code> <b>mgl_write_frame</b><i> (<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</i></dt>
<dd><p>Exports current frame to a file <var>fname</var> which type is determined by the extension. Parameter <var>descr</var> adds description to file (can be <code>&quot;&quot;</code>). If <var>fname</var>=<code>&quot;&quot;</code> then the file &lsquo;<samp>frame####.jpg</samp>&rsquo; is used, where &lsquo;<samp>####</samp>&rsquo; is current frame id and name &lsquo;<samp>frame</samp>&rsquo; is defined by <var>PlotId</var> class property.
</p></dd></dl>

<dl>
<dt><a name="index-WritePNG-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>WritePNG</b><i> (<code>const char *</code>fname, <code>const char *</code>descr=<code>&quot;&quot;</code>, <code>int</code> compr=<code>&quot;&quot;</code>, <code>bool</code> alpha=<code>true</code>)</i></dt>
<dt><a name="index-mgl_005fwrite_005fpng"></a><u>C function:</u> <code>void</code> <b>mgl_write_png</b><i> (<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</i></dt>
<dt><a name="index-mgl_005fwrite_005fpng_005fsolid"></a><u>C function:</u> <code>void</code> <b>mgl_write_png_solid</b><i> (<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</i></dt>
<dd><p>Exports current frame to PNG file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file, <var>alpha</var> gives the transparency type. By default there are no description added and transparent image used. This function does nothing if NO_PNG is defined during compilation of MathGL library.
</p></dd></dl>

<dl>
<dt><a name="index-WriteJPEG-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>WriteJPEG</b><i> (<code>const char *</code>fname, <code>const char *</code>descr=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fwrite_005fjpg"></a><u>C function:</u> <code>void</code> <b>mgl_write_jpg</b><i> (<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</i></dt>
<dd><p>Exports current frame to JPEG file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file. By default there is no description added. This function does nothing if NO_JPEG is defined during compilation of MathGL library.
</p></dd></dl>

<dl>
<dt><a name="index-WriteGIF-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>WriteGIF</b><i> (<code>const char *</code>fname, <code>const char *</code>descr=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fwrite_005fgif"></a><u>C function:</u> <code>void</code> <b>mgl_write_gif</b><i> (<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</i></dt>
<dd><p>Exports current frame to GIF file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file. By default there is no description added.
</p></dd></dl>

<dl>
<dt><a name="index-WriteBMP-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>WriteBMP</b><i> (<code>const char *</code>fname, <code>const char *</code>descr=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fwrite_005fbmp"></a><u>C function:</u> <code>void</code> <b>mgl_write_bmp</b><i> (<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</i></dt>
<dd><p>Exports current frame to BMP file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file. There is no compression used.
</p></dd></dl>

<dl>
<dt><a name="index-WriteEPS-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>WriteEPS</b><i> (<code>const char *</code>fname, <code>const char *</code>descr=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fwrite_005feps"></a><u>C function:</u> <code>void</code> <b>mgl_write_eps</b><i> (<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</i></dt>
<dd><p>Exports current frame to EPS file. The vector representation is used if possible. So it is not recommended for the export of large data plot. It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file. By default there is no description added. If file name is terminated by &lsquo;<samp>z</samp>&rsquo; (for example, &lsquo;<samp>fname.eps.gz</samp>&rsquo;) then file will be compressed in gzip format.
</p></dd></dl>

<dl>
<dt><a name="index-WriteSVG-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>WriteSVG</b><i> (<code>const char *</code>fname, <code>const char *</code>descr=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fwrite_005fsvg"></a><u>C function:</u> <code>void</code> <b>mgl_write_svg</b><i> (<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</i></dt>
<dd><p>Exports current frame to SVG (Scalable Vector Graphics) file. The vector representation is used. In difference of EPS format, SVG format support transparency that allows to correctly draw half-transparent plot (like SurfA(), Surf3A(), CloudQ() or CloudP()). Note, the output file may be too large for graphic of large data array (especially for surfaces). It is better to use bitmap format (for example PNG or JPEG). However, program has no internal limitations for size of output file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file (default is file name). If file name is terminated by &lsquo;<samp>z</samp>&rsquo; (for example, &lsquo;<samp>fname.svgz</samp>&rsquo;) then file will be compressed in gzip format.
</p></dd></dl>

<dl>
<dt><a name="index-WriteIDTF-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>WriteIDTF</b><i> (<code>const char *</code>fname, <code>const char *</code>descr=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fwrite_005fidtf"></a><u>C function:</u> <code>void</code> <b>mgl_write_idtf</b><i> (<code>HMGL</code> gr, <code>const char *</code>fname, <code>const char *</code>descr)</i></dt>
<dd><p>Exports current frame to IDTF file. Later this file can be converted to U3D format. The vector representation is used. So, the output file may be too large for graphic of large data array (especially for surfaces). However, program has no internal limitations for size of output file. Parameter <var>fname</var> specifies the file name, <var>descr</var> adds description to file (default is file name).
</p></dd></dl>

<dl>
<dt><a name="index-ShowImage-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ShowImage</b><i> (<code>const char *</code>viewer=<code>&quot;kuickshow&quot;</code>, <code>bool</code> nowait=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005fshow_005fimage"></a><u>C function:</u> <code>void</code> <b>mgl_show_image</b><i> (<code>const char *</code>viewer, <code>int</code> nowait)</i></dt>
<dd><p>Displays the current picture using external program <var>viewer</var> for viewing. The function save the picture to temporary file and call <var>viewer</var> to display it. If <var>nowait</var>=<code>true</code> then the function return immediately (it will not wait while window will be closed).
</p></dd></dl>

<dl>
<dt><a name="index-SetSize-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetSize</b><i> (<code>int</code> width, <code>int</code> height)</i></dt>
<dt><a name="index-mgl_005fset_005fsize"></a><u>C function:</u> <code>void</code> <b>mgl_set_size</b><i> (<code>HMGL</code> gr, <code>int</code> width, <code>int</code> height)</i></dt>
<dd><p>Sets size of picture in pixels. This function <strong>must be</strong> called before any other plotting because it completely remove picture contents.
</p></dd></dl>

<dl>
<dt><a name="index-Flush-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Flush</b><i> ()</i></dt>
<dt><a name="index-mgl_005fflush"></a><u>C function:</u> <code>void</code> <b>mgl_flush</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Flushes the plotting commands to frame. This function may be useful if one wants to remove array before the finishing of the plot (i.e. before calling <code>Finish()</code>). Also call of this function separate the objects in mglGraphIDTF. Most of plots call this function internally.
</p></dd></dl>

<dl>
<dt><a name="index-Finish-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Finish</b><i> ()</i></dt>
<dd><p>Finishes plotting and create a picture. Normally this function is called internally.
</p></dd></dl>


<hr size="6">
<a name="Primitives-drawing"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Export-to-file" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Text-printing" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Primitives-drawing-2"></a>
<h2 class="section">3.5 Primitives drawing</h2>
<a name="index-Ball"></a>
<a name="index-Clf"></a>
<a name="index-Line"></a>
<a name="index-Curve"></a>
<a name="index-Glyph"></a>
<a name="index-Mark"></a>
<a name="index-Error"></a>
<a name="index-Face"></a>
<a name="index-FaceX"></a>
<a name="index-FaceY"></a>
<a name="index-FaceZ"></a>
<a name="index-Cone"></a>
<a name="index-Drop"></a>
<a name="index-Sphere"></a>

<p>These functions draw some simple objects like line, point, sphere, drop, cone and so on.
</p>
<dl>
<dt><a name="index-Clf-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Clf</b><i> (<code>mglColor</code> Back=<code>WC</code>)</i></dt>
<dt><a name="index-mgl_005fclf"></a><u>C function:</u> <code>void</code> <b>mgl_clf</b><i> (<code>HMGL</code> gr)</i></dt>
<dt><a name="index-mgl_005fclf_005frgb"></a><u>C function:</u> <code>void</code> <b>mgl_clf_rgb</b><i> (<code>HMGL</code> gr, <code>float</code> r, <code>float</code> g, <code>float</code> b)</i></dt>
<dd><p>Clear the picture and fill it by color <var>Back</var>.
</p></dd></dl>

<dl>
<dt><a name="index-Ball-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Ball</b><i> (<code>float</code> x, <code>float</code> y, <code>float</code> z, <code>mglColor</code> col=<code>RC</code>, <code>float</code> alpha=<code>1</code>)</i></dt>
<dt><a name="index-Ball-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Ball</b><i> (<code>mglPoint</code> p, <code>char</code> col=<code>'r'</code>)</i></dt>
<dt><a name="index-Ball-3"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>Ball</b><i> (<code>float</code> x, <code>float</code> y, <code>float</code> z, <code>char</code> col=<code>'r'</code>)</i></dt>
<dt><a name="index-mgl_005fball"></a><u>C function:</u> <code>void</code> <b>mgl_ball</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>float</code> z)</i></dt>
<dt><a name="index-mgl_005fball_005frgb"></a><u>C function:</u> <code>void</code> <b>mgl_ball_rgb</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>float</code> r, <code>float</code> g, <code>float</code> b, <code>float</code> alpha)</i></dt>
<dt><a name="index-mgl_005fball_005fstr"></a><u>C function:</u> <code>void</code> <b>mgl_ball_str</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>char</code> col)</i></dt>
<dd><p>Draws a point (ball) at position <var>p</var>={<var>x</var>, <var>y</var>, <var>z</var>} with color <var>col</var>.
</p></dd></dl>

<dl>
<dt><a name="index-Error-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Error</b><i> (<code>mglPoint</code> p, <code>mglPoint</code> e, <code>char</code> *pen=<code>&quot;&quot;</code>)</i></dt>
<dd><p>Draws a 3d error box at position <var>p</var> with sizes <var>e</var> and style <var>pen</var>.
</p></dd></dl>

<dl>
<dt><a name="index-Line-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Line</b><i> (<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>char *</code>stl=<code>&quot;B&quot;</code>, <code>int</code>num=<code>2</code>)</i></dt>
<dt><a name="index-Line-2"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>Line</b><i> (<code>float</code> x1, <code>float</code> y1, <code>float</code> z1, <code>float</code> x2, <code>float</code> y2, <code>float</code> z2, <code>char *</code>stl=<code>&quot;B&quot;</code>, <code>int</code>num=<code>2</code>)</i></dt>
<dt><a name="index-mgl_005fline"></a><u>C function:</u> <code>void</code> <b>mgl_line</b><i> (<code>HMGL</code> gr, <code>float</code> x1, <code>float</code> y1, <code>float</code> z1, <code>float</code> x2, <code>float</code> y2, <code>float</code> z2, <code>char *</code>stl, <code>int</code>num)</i></dt>
<dd><p>Draws a geodesic line (straight line in Cartesian coordinates) from point <var>p1</var> to <var>p2</var> using line style <var>stl</var>. Parameter <var>num</var> define the &ldquo;quality&rdquo; of the line. If <var>num</var>=<code>2</code> then the stright line will be drawn in all coordinate system (independently on transformation formulas (see section <a href="#Curved-coordinates">Curved coordinates</a>). Contrary, for large values (for example, =<code>100</code>) the geodesic line will be drawn in corresponding coordinate system (straight line in Cartesian coordinates, circle in polar coordinates and so on). Line will be drawn even if it lies out of bounding box.
</p></dd></dl>

<dl>
<dt><a name="index-Curve-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Curve</b><i> (<code>mglPoint</code> p1, <code>mglPoint</code> d1, <code>mglPoint</code> p2, <code>mglPoint</code> d2, <code>const char *</code>stl=<code>&quot;B&quot;</code>, <code>int</code> num=<code>100</code>)</i></dt>
<dt><a name="index-Curve-2"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>Curve</b><i> (<code>float</code> x1, <code>float</code> y1, <code>float</code> z1, <code>float</code> dx1, <code>float</code> dy1, <code>float</code> dz1, <code>float</code> x2, <code>float</code> y2, <code>float</code> z2, <code>float</code> dx2, <code>float</code> dy2, <code>float</code> dz2, <code>const char *</code>stl=<code>&quot;B&quot;</code>, <code>int</code> num=<code>100</code>)</i></dt>
<dt><a name="index-mgl_005fcurve"></a><u>C function:</u> <code>void</code> <b>mgl_curve</b><i> (<code>HMGL</code> gr, <code>float</code> x1, <code>float</code> y1, <code>float</code> z1, <code>float</code> dx1, <code>float</code> dy1, <code>float</code> dz1, <code>float</code> x2, <code>float</code> y2, <code>float</code> z2, <code>float</code> dx2, <code>float</code> dy2, <code>float</code> dz2, <code>const char *</code>stl, <code>int</code> num)</i></dt>
<dd><p>Draws Bezier-like curve from point <var>p1</var> to <var>p2</var> using line style <var>stl</var>. At this tangent is codirected with <var>d1</var>, <var>d2</var> and proportional to its amplitude. Parameter <var>num</var> define the &ldquo;quality&rdquo; of the curve. If <var>num</var>=<code>2</code> then the straight line will be drawn in all coordinate system (independently on transformation formulas see section <a href="#Curved-coordinates">Curved coordinates</a>). Contrary, for large values (for example, =<code>100</code>) the spline like Bezier curve will be drawn in corresponding coordinate system. Curve will be drawn even if it lies out of bounding box.
</p></dd></dl>

<dl>
<dt><a name="index-Face-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Face</b><i> (<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>mglPoint</code> p3, <code>mglPoint</code> p4, <code>const char *</code>stl=<code>&quot;w&quot;</code>, <code>int</code> num=<code>2</code>, <code>float</code> val=<code>NAN</code>)</i></dt>
<dd><p>Draws the solid quadrangle (face) with vertexes <var>p1</var>, <var>p2</var>, <var>p3</var>, <var>p4</var> and with color(s) <var>stl</var>. At this colors can be the same for all vertexes or different if all 4 colors are specified for each vertex. In first case parameter <var>val</var> (if not <code>NAN</code>) set the color according color scheme. Face will be drawn even if it lies out of bounding box.
</p></dd></dl>

<dl>
<dt><a name="index-FaceX-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>FaceX</b><i> (<code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>float</code> wy, <code>float</code> wz, <code>const char *</code>stl=<code>&quot;w&quot;</code>, <code>float</code> dx=<code>0</code>, <code>float</code> dy=<code>0</code>)</i></dt>
<dt><a name="index-FaceY-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>FaceY</b><i> (<code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>float</code> wx, <code>float</code> wz, <code>const char *</code>stl=<code>&quot;w&quot;</code>, <code>float</code> dx=<code>0</code>, <code>float</code> dy=<code>0</code>)</i></dt>
<dt><a name="index-FaceZ-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>FaceZ</b><i> (<code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>float</code> wx, <code>float</code> wy, <code>const char *</code>stl=<code>&quot;w&quot;</code>, <code>float</code> dx=<code>0</code>, <code>float</code> dy=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005ffacex"></a><u>C function:</u> <code>void</code> <b>mgl_facex</b><i> (<code>HMGL</code> gr, <code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>float</code> wy, <code>float</code> wz, <code>const char *</code>stl, <code>float</code> d1, <code>float</code> d2)</i></dt>
<dt><a name="index-mgl_005ffacey"></a><u>C function:</u> <code>void</code> <b>mgl_facey</b><i> (<code>HMGL</code> gr, <code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>float</code> wx, <code>float</code> wz, <code>const char *</code>stl, <code>float</code> d1, <code>float</code> d2)</i></dt>
<dt><a name="index-mgl_005ffacez"></a><u>C function:</u> <code>void</code> <b>mgl_facez</b><i> (<code>HMGL</code> gr, <code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>float</code> wx, <code>float</code> wy, <code>const char *</code>stl, <code>float</code> d1, <code>float</code> d2)</i></dt>
<dd><p>Draws the solid rectangle (face) perpendicular to [x,y,z]-axis correspondingly at position {<var>x0</var>, <var>y0</var>, <var>z0</var>} with color <var>stl</var> and with widths <var>wx</var>, <var>wy</var>, <var>wz</var> along corresponding directions. At this colors can be the same for all vertexes or separately if all 4 colors are specified for each vertex. Parameters <var>d1</var>!=0, <var>d2</var>!=0 set additional shift of the last vertex (i.e. to draw quadrangle).
</p></dd></dl>

<dl>
<dt><a name="index-Sphere-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Sphere</b><i> (<code>mglPoint</code> p, <code>float</code> r, <code>const char *</code>stl=<code>&quot;r&quot;</code>)</i></dt>
<dt><a name="index-Sphere-2"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>Sphere</b><i> (<code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>float</code> r, <code>const char *</code>stl=<code>&quot;r&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsphere"></a><u>C function:</u> <code>void</code> <b>mgl_sphere</b><i> (<code>HMGL</code> gr, <code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>float</code> r, <code>const char *</code>stl)</i></dt>
<dd><p>Draw the sphere with radius <var>r</var> and center at point <var>p</var>={<var>x</var>, <var>y</var>, <var>z</var>} and color <var>stl</var>.
</p></dd></dl>

<dl>
<dt><a name="index-Drop-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Drop</b><i> (<code>mglPoint</code> p, <code>mglPoint</code> q, <code>float</code> r, <code>mglColor</code> col, <code>float</code> shift=<code>1</code>, <code>float</code> ap=<code>1</code>)</i></dt>
<dt><a name="index-Drop-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Drop</b><i> (<code>mglPoint</code> p, <code>mglPoint</code> q, <code>float</code> r, <code>const char *</code>col=&quot;r&quot;, <code>float</code> shift=<code>1</code>, <code>float</code> ap=<code>1</code>)</i></dt>
<dt><a name="index-Drop-3"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>Drop</b><i> (<code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>float</code> dx, <code>float</code> dy, <code>float</code> dz, <code>float</code> r, <code>const char *</code>col=&quot;r&quot;, <code>float</code> shift=<code>1</code>, <code>float</code> ap=<code>1</code>)</i></dt>
<dt><a name="index-mgl_005fdrop"></a><u>C function:</u> <code>void</code> <b>mgl_drop</b><i> (<code>HMGL</code> gr, <code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>float</code> dx, <code>float</code> dy, <code>float</code> dz, <code>float</code> r, <code>const char *</code>col, <code>float</code> shift, <code>float</code> ap)</i></dt>
<dd><p>Draw the drop with radius <var>r</var> at point <var>p</var> elongated in direction <var>q</var> and with color <var>col</var>. Parameter <var>shift</var> set the degree of drop oblongness: &lsquo;<samp>0</samp>&rsquo; is sphere, &lsquo;<samp>1</samp>&rsquo; is maximally oblongness drop. Parameter <var>ap</var> set relative width of the drop (this is analogue of &ldquo;ellipticity&rdquo; for the sphere). See section <a href="mathgl_en_9.html#Drops-sample">Drops sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Cone-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Cone</b><i> (<code>mglPoint</code> p1, <code>mglPoint</code> p2, <code>float</code> r1, <code>float</code> r2=<code>-1</code>, <code>const char *</code>stl=<code>&quot;B&quot;</code>, <code>bool</code> edge=<code>false</code>)</i></dt>
<dt><a name="index-Cone-2"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>Cone</b><i> (<code>float</code> x1, <code>float</code> y1, <code>float</code> z1, <code>float</code> x2, <code>float</code> y2, <code>float</code> z2, <code>float</code> r1, <code>float</code> r2=<code>-1</code>, <code>const char *</code>stl=<code>&quot;B&quot;</code>, <code>bool</code> edge=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005fcone"></a><u>C function:</u> <code>void</code> <b>mgl_cone</b><i> (<code>HMGL</code> gr, <code>float</code> x1, <code>float</code> y1, <code>float</code> z1, <code>float</code> x2, <code>float</code> y2, <code>float</code> z2, <code>float</code> r1, <code>float</code> r2, <code>const char *</code>stl, <code>int</code> draw_edge)</i></dt>
<dd><p>Draw tube (or truncated cone if <var>edge</var>=<code>false</code>) between points <var>p1</var>, <var>p2</var> with radius at the edges <var>r1</var>, <var>r2</var>. If <var>r2</var>&lt;0 then it is supposed that <var>r2</var>=<var>r1</var>. The cone color is defined by string <var>stl</var>.
</p></dd></dl>

<dl>
<dt><a name="index-Mark-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Mark</b><i> (<code>mglPoint</code> p, <code>char</code> mark=<code>'.'</code>)</i></dt>
<dt><a name="index-Mark-2"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>Mark</b><i> (<code>float</code> x, <code>float</code> y, <code>float</code> z, <code>char</code> mark=<code>'.'</code>)</i></dt>
<dt><a name="index-mgl_005fmark"></a><u>C function:</u> <code>void</code> <b>mgl_mark</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>char</code> mark)</i></dt>
<dd><p>Draws a marks of different type at position <var>p</var>.
</p></dd></dl>

<dl>
<dt><a name="index-Glyph-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Glyph</b><i> (<code>float</code> x, <code>float</code> y, <code>float</code> f, <code>int</code> nt, <code>const short *</code>trig, <code>int</code> nl, <code>const short *</code>line)</i></dt>
<dd><p>Draw a set of triangles (or lines if <var>trig</var>=<code>NULL</code>) for glyph which is placed at point {<var>x</var>, <var>y</var>}. Values in the arrays are normalized by factor <var>f</var>. Normally this function is used internally.
</p></dd></dl>

<hr size="6">
<a name="Text-printing"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Primitives-drawing" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Axis-and-Colorbar" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Text-printing-1"></a>
<h2 class="section">3.6 Text printing</h2>
<a name="index-Puts"></a>
<a name="index-Putsw"></a>
<a name="index-Text"></a>
<a name="index-Title"></a>

<p>These functions draw the text. There are functions for drawing text in arbitrary place, in arbitrary direction and along arbitrary curve. The class mglFont (see section <a href="mathgl_en_7.html#mglFont-class">mglFont class</a>) is used for low-level string parsing and printing. It can use arbitrary font-faces and parse many TeX commands (for detail see section <a href="mathgl_en_1.html#Font-styles">Font styles</a>). All these functions have 2 variant: for printing 8-bit text (<code>char *</code>) and for printing Unicode text (<code>wchar_t *</code>). In first case the conversion in current locale is used. So sometimes you need to specify it by <code>setlocale()</code> function. The size argument control the size of text: if positive it give the value, if negative it give the value relative to <var>FontSize</var>. The font type (STIX, arial, courier, times and so on) can be selected by function SetFont(), GetFont(). See section <a href="#Font-settings">Font settings</a>.
</p>
<p>The font parameters are described by string. This string may contain several characters of font type (&lsquo;<samp>rbiwou</samp>&rsquo;) and/or align (&lsquo;<samp>LRC</samp>&rsquo;) specification. Also it may contain the text color &lsquo;<samp>wkrgbcymhRGBCYMHW</samp>&rsquo; (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>) after symbol &lsquo;<samp>:</samp>&rsquo;. The font types are: &lsquo;<samp>r</samp>&rsquo; &ndash; roman font, &lsquo;<samp>i</samp>&rsquo; &ndash; italic style, &lsquo;<samp>b</samp>&rsquo; &ndash; bold style, &lsquo;<samp>w</samp>&rsquo; &ndash; wired style, &lsquo;<samp>o</samp>&rsquo; &ndash; over-lined text, &lsquo;<samp>u</samp>&rsquo; &ndash; underlined text. By default roman font is used. The align types are: &lsquo;<samp>L</samp>&rsquo; &ndash; align left (default), &lsquo;<samp>C</samp>&rsquo; &ndash; align center, &lsquo;<samp>R</samp>&rsquo; &ndash; align right. For example, string &lsquo;<samp>iC:b</samp>&rsquo; correspond to italic font style for centered text which printed by blue color.
</p>
<p>If string contains symbols &lsquo;<samp>aA</samp>&rsquo; then text is printed at arbitrary position {<var>x</var>, <var>y</var>} (supposed to be in range [0,1]) of subplot (for &lsquo;<samp>a</samp>&rsquo;) or picture (for &lsquo;<samp>A</samp>&rsquo;).
</p>
<dl>
<dt><a name="index-Puts-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Puts</b><i> (<code>mglPoint</code> p, <code>const char *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, <code>float</code> size=<code>-1</code>, <code>char</code> dir=<code>0</code>, <code>float</code> shift=<code>0</code>)</i></dt>
<dt><a name="index-Putsw-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Putsw</b><i> (<code>mglPoint</code> p, <code>const wchar_t *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, <code>float</code> size=<code>-1</code>, <code>char</code> dir=<code>0</code>, <code>float</code> shift=<code>0</code>)</i></dt>
<dt><a name="index-Puts-2"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>Puts</b><i> (<code>float</code> x, <code>float</code> y, <code>float</code> z, <code>const char *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, <code>float</code> size=<code>-1</code>, <code>char</code> dir=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fputs"></a><u>C function:</u> <code>void</code> <b>mgl_puts</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>const char *</code>text)</i></dt>
<dt><a name="index-mgl_005fputsw"></a><u>C function:</u> <code>void</code> <b>mgl_putsw</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>const wchar_t *</code>text)</i></dt>
<dt><a name="index-mgl_005fputs_005fext"></a><u>C function:</u> <code>void</code> <b>mgl_puts_ext</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>const char *</code>text, <code>const char *</code>font, <code>float</code> size, <code>char</code> dir)</i></dt>
<dt><a name="index-mgl_005fputsw_005fext"></a><u>C function:</u> <code>void</code> <b>mgl_putsw_ext</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>const wchar_t *</code>text, <code>const char *</code>font, <code>float</code> size, <code>char</code> dir)</i></dt>
<dd><p>The function plots the string <var>text</var> at position <var>p</var> with fonts specifying by the criteria <var>how</var>. The size of font is set by <var>size</var> parameter (default is <var>FontSize</var>). Parameter <var>dir</var> specifies the additional string align. The aligns are: &lsquo;<samp>x</samp>&rsquo; &ndash; align as x-label, &lsquo;<samp>y</samp>&rsquo; &ndash; align as y-label, &lsquo;<samp>z</samp>&rsquo; &ndash; align as z-label, &lsquo;<samp>i</samp>&rsquo; &ndash; align as x-label but inverse writing direction, &lsquo;<samp>t</samp>&rsquo; &ndash; no align (default), &lsquo;<samp>n</samp>&rsquo; &ndash; align in x-y plane.
</p></dd></dl>

<dl>
<dt><a name="index-Puts-3"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>float</code> <b>Puts</b><i> (<code>mglPoint</code> p, <code>mglPoint</code> l, <code>const char *</code>text, <code>char</code>where=<code>'t'</code>, <code>float</code> size=<code>-1</code>)</i></dt>
<dt><a name="index-Putsw-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>float</code> <b>Putsw</b><i> (<code>mglPoint</code> p, <code>mglPoint</code> l, <code>const wchar_t *</code>text, <code>char</code>where=<code>'t'</code>, <code>float</code> size=<code>-1</code>)</i></dt>
<dt><a name="index-Puts-4"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>Puts</b><i> (<code>float</code> x, <code>float</code> y, <code>float</code> z, <code>float</code> dx, <code>float</code> dy, <code>float</code> dz, <code>const char *</code>text, <code>char</code>where=<code>'t'</code>, <code>float</code> size=<code>-1</code>)</i></dt>
<dt><a name="index-mgl_005fputs_005fdir"></a><u>C function:</u> <code>void</code> <b>mgl_puts_dir</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>float</code> dx, <code>float</code> dy, <code>float</code> dz, <code>const char *</code>text, <code>float</code> size)</i></dt>
<dt><a name="index-mgl_005fputsw_005fdir"></a><u>C function:</u> <code>void</code> <b>mgl_putsw_dir</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>float</code> dx, <code>float</code> dy, <code>float</code> dz, <code>const wchar_t *</code>text, <code>float</code> size)</i></dt>
<dd><p>The function plots the string <var>text</var> at position <var>p</var> along direction <var>l</var> with specified <var>size</var>. Parameter <var>where</var> set to print text above the line (&lsquo;<samp>T</samp>&rsquo;) or under the line (&lsquo;<samp>t</samp>&rsquo;). Function return the width of the string.
</p></dd></dl>

<dl>
<dt><a name="index-Text-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Text</b><i> (<code>mglPoint</code> p, <code>const char *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, <code>float</code> size=<code>-1</code>, <code>char</code> dir=<code>0</code>)</i></dt>
<dt><a name="index-Text-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Text</b><i> (<code>mglPoint</code> p, <code>const wchar_t *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, <code>float</code> size=<code>-1</code>, <code>char</code> dir=<code>0</code>)</i></dt>
<dd><p>The function plots the string <var>text</var> at position <var>p</var> with fonts <var>how</var>. These functions are obsolete &ndash; use Puts(), Putsw() functions instead.
</p></dd></dl>

<dl>
<dt><a name="index-Printf"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Printf</b><i> (<code>mglPoint</code> p, <code>const char *</code>arg, ...)</i></dt>
<dd><p>Print formatted string at point <var>p</var>.
</p></dd></dl>

<dl>
<dt><a name="index-Label"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Label</b><i> (<code>float</code> x, <code>float</code> y, <code>const char *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, <code>float</code> size=<code>-1</code>)</i></dt>
<dt><a name="index-Labelw"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Labelw</b><i> (<code>float</code> x, <code>float</code> y, <code>const wchar_t *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, <code>float</code> size=<code>-1</code>)</i></dt>
<dt><a name="index-mgl_005flabel_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_label_xy</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>const char *</code>text, <code>const char *</code>font, <code>float</code> size)</i></dt>
<dt><a name="index-mgl_005flabelw_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_labelw_xy</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>const wchar_t *</code>text, <code>const char *</code>font, <code>float</code> size)</i></dt>
<dd><p>The function draws the string <var>text</var> at position {<var>x</var>, <var>y</var>} with fonts specifying by <var>font</var>. The size of font is set by <var>size</var> parameter (default is <var>FontSize</var>). Coordiantes <code>x, y</code> are supposed to be in range [0,1].
</p></dd></dl>

<dl>
<dt><a name="index-Title-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Title</b><i> (<code>const char *</code>text, <code>const char *</code>font=<code>0</code>, <code>float</code> size=<code>-2</code>)</i></dt>
<dt><a name="index-Title-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Title</b><i> (<code>const wchar_t *</code>text, <code>const char *</code>font=<code>0</code>, <code>float</code> size=<code>-2</code>)</i></dt>
<dt><a name="index-Title-3"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>Title</b><i> (<code>const char *</code>text, <code>const char *</code>font=<code>0</code>, <code>int</code> size=<code>-2</code>)</i></dt>
<dt><a name="index-mgl_005ftitle"></a><u>C function:</u> <code>void</code> <b>mgl_title</b><i> (<code>HMGL</code> gr, <code>const char *</code>text, <code>const char *</code>font, <code>int</code> size)</i></dt>
<dt><a name="index-mgl_005ftitlew"></a><u>C function:</u> <code>void</code> <b>mgl_titlew</b><i> (<code>HMGL</code> gr, <code>const wchar_t *</code>text, <code>const char *</code>font, <code>int</code> size)</i></dt>
<dd><p>Print string <var>text</var> as title of the picture (at the top of the picture). Can be used at any place (even inside SubPlot()).
</p></dd></dl>

<dl>
<dt><a name="index-Text-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Text</b><i> (<code>const mglData &amp;</code>y, <code>const char *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, float size=<code>-1</code>)</i></dt>
<dt><a name="index-Text-4"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Text</b><i> (<code>const mglData &amp;</code>y, <code>const wchar_t *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, float size=<code>-1</code>)</i></dt>
<dt><a name="index-Text-5"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Text</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const char *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, float size=<code>-1</code>)</i></dt>
<dt><a name="index-Text-6"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Text</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const wchar_t *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, float size=<code>-1</code>)</i></dt>
<dt><a name="index-Text-7"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Text</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, float size=<code>-1</code>)</i></dt>
<dt><a name="index-Text-8"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Text</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const wchar_t *</code>text, <code>const char *</code>font=<code>&quot;&quot;</code>, float size=<code>-1</code>)</i></dt>
<dt><a name="index-mgl_005ftext_005fy"></a><u>C function:</u> <code>void</code> <b>mgl_text_y</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const char *</code>text, <code>const char *</code>font, float size)</i></dt>
<dt><a name="index-mgl_005ftext_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_text_xy</b><i> (<code>const HMDT</code> x, <code>const HMDT</code> y, <code>const char *</code>text, <code>const char *</code>font, float size)</i></dt>
<dt><a name="index-mgl_005ftext_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_text_xyz</b><i> (<code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>text, <code>const char *</code>font, float size)</i></dt>
<dd><p>The function draws <var>text</var> along the curve between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} by font style <var>font</var> and with size <var>size</var>. The string <var>font</var> may contain symbols &lsquo;<samp>t</samp>&rsquo; for printing the text under the curve (default), or &lsquo;<samp>T</samp>&rsquo; for printing the text above the curve. The sizes of 1st dimension must be equal for all arrays <code>x.nx=y.nx=z.nx</code>. If array <var>x</var> is not specified then its an automatic array is used with values equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x] (see section <a href="#Ranges-_0028bounding-box_0029">Ranges (bounding box)</a>). If array <var>z</var> is not specified then <var>z</var>[i] = <var>zVal</var> is used. See section <a href="mathgl_en_9.html#Text-sample">Text sample</a>, for sample code and picture.
</p></dd></dl>

<hr size="6">
<a name="Axis-and-Colorbar"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Text-printing" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Legend" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Axis-and-Colorbar-1"></a>
<h2 class="section">3.7 Axis and Colorbar</h2>
<a name="index-Axis-2"></a>
<a name="index-Box"></a>
<a name="index-Grid"></a>
<a name="index-Colorbar"></a>
<a name="index-Label-1"></a>

<p>These functions draw the &ldquo;things for measuring&rdquo;, like axis with ticks, colorbar with ticks, grid along axis, bounding box and labels for axis. For more information see section <a href="#Axis-settings">Axis settings</a>.
</p>
<dl>
<dt><a name="index-Axis-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Axis</b><i> (<code>const char *</code>dir=<code>&quot;xyz&quot;</code>, <code>bool</code> adjust=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005faxis"></a><u>C function:</u> <code>void</code> <b>mgl_axis</b><i> (<code>HMGL</code> gr, <code>const char *</code>dir)</i></dt>
<dd><p>Draws axes with ticks (see section <a href="#Axis-settings">Axis settings</a>) in directions determined by string parameter <var>dir</var>.If string contain the symbol &lsquo;<samp>_</samp>&rsquo; then tick labels are not printed. Font for ticks labels is determined by <var>FontDef</var> (see section <a href="#Font-settings">Font settings</a>). Ticks will be adjusted if <var>adjust</var>=<code>true</code> (by call of <code>AdjustTicks()</code>). You may specified an arrow at the end of axis (see see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>)
</p></dd></dl>

<dl>
<dt><a name="index-Colorbar-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Colorbar</b><i> (<code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> where=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fcolorbar"></a><u>C function:</u> <code>void</code> <b>mgl_colorbar</b><i> (<code>HMGL</code> gr, <code>const char *</code>sch, <code>int</code> where)</i></dt>
<dd><p>Draws colorbar with color scheme <var>sch</var> (current scheme if <code>sch=&quot;&quot;</code>) at edge of plot. Parameter <var>where</var> specifies the position of the colorbar: &lsquo;<samp>0</samp>&rsquo; - at right (default), &lsquo;<samp>1</samp>&rsquo; - at left, &lsquo;<samp>2</samp>&rsquo; - at top, &lsquo;<samp>3</samp>&rsquo; - at bottom. If string <var>sch</var> contains &lsquo;<samp>&lt;&gt;^_</samp>&rsquo; then the parameter <var>pos</var> is defined as: <code>pos=0</code> for &lsquo;<samp>&gt;</samp>&rsquo; (right), <code>pos=1</code> for &lsquo;<samp>&lt;</samp>&rsquo; (left), <code>pos=2</code> for &lsquo;<samp>^</samp>&rsquo; (top), <code>pos=3</code> for &lsquo;<samp>_</samp>&rsquo; (bottom). If string have &lsquo;<samp>A</samp>&rsquo; then absolute (relative to picture) coordinates is used. See section <a href="mathgl_en_9.html#Dens-sample">Dens sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Colorbar-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Colorbar</b><i> (<code>const mglData &amp;</code>v, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> where=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fcolorbar_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_colorbar_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const char *</code>sch, <code>int</code> where)</i></dt>
<dd><p>The same as previous but with sharp colors <var>sch</var> (current palette if <code>sch=&quot;&quot;</code>) for values <var>v</var>. See section <a href="mathgl_en_9.html#ContD-sample">ContD sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Colorbar-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Colorbar</b><i> (<code>const char *</code>sch, <code>int</code> where, <code>float</code> x, <code>float</code> y, <code>float</code> w, <code>float</code> h)</i></dt>
<dt><a name="index-Colorbar-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Colorbar</b><i> (<code>int</code> where, <code>float</code> x, <code>float</code> y, <code>float</code> w, <code>float</code> h)</i></dt>
<dt><a name="index-mgl_005fcolorbar_005fext"></a><u>C function:</u> <code>void</code> <b>mgl_colorbar_ext</b><i> (<code>HMGL</code> gr, <code>const char *</code>sch, <code>int</code> where, <code>float</code> x, <code>float</code> y, <code>float</code> w, <code>float</code> h)</i></dt>
<dd><p>The same as first one but at arbitrary position of subplot {<var>x</var>, <var>y</var>} (supposed to be in range [0,1]). Parameters <var>w</var>, <var>h</var> set the relative width and height of the colorbar.
</p></dd></dl>

<dl>
<dt><a name="index-Colorbar-5"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Colorbar</b><i> (<code>const mglData &amp;</code>v, <code>const char *</code>sch, <code>int</code> where, <code>float</code> x, <code>float</code> y, <code>float</code> w, <code>float</code> h)</i></dt>
<dd><p>The same as previous but with sharp colors <var>sch</var> (current palette if <code>sch=&quot;&quot;</code>) for values <var>v</var>. See section <a href="mathgl_en_9.html#ContD-sample">ContD sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Grid-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Grid</b><i> (<code>const char *</code>dir=<code>&quot;xyz&quot;</code>, <code>const char *</code>pen=<code>&quot;B-&quot;</code>)</i></dt>
<dt><a name="index-mgl_005faxis_005fgrid"></a><u>C function:</u> <code>void</code> <b>mgl_axis_grid</b><i> (<code>HMGL</code> gr, <code>const char *</code>dir, <code>const char *</code>pen)</i></dt>
<dd><p>Draws grid lines perpendicular to direction determined by string parameter <var>dir</var>. The step of grid lines is the same as tick step for an Axis(). The style of lines is determined by <var>pen</var> parameter (default value is dark blue solid line &lsquo;<samp>B-</samp>&rsquo;).
</p></dd></dl>

<dl>
<dt><a name="index-Box-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Box</b><i> (<code>const char *</code>col=<code>&quot;&quot;</code>, <code>bool</code> ticks=<code>true</code>)</i></dt>
<dt><a name="index-Box-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Box</b><i> (<code>mglColor</code> col, <code>bool</code> ticks=<code>true</code>)</i></dt>
<dt><a name="index-mgl_005fbox"></a><u>C function:</u> <code>void</code> <b>mgl_box</b><i> (<code>HMGL</code> gr, <code>int</code> ticks)</i></dt>
<dt><a name="index-mgl_005fbox_005frgb"></a><u>C function:</u> <code>void</code> <b>mgl_box_rgb</b><i> (<code>HMGL</code> gr, <code>float</code> r, <code>float</code> g, <code>float</code> b, <code>int</code> ticks)</i></dt>
<dt><a name="index-mgl_005fbox_005fstr"></a><u>C function:</u> <code>void</code> <b>mgl_box_str</b><i> (<code>HMGL</code> gr, <code>const char *</code>col, <code>int</code> ticks)</i></dt>
<dd><p>Draws bounding box outside the plotting volume with color <var>col</var>.
</p></dd></dl>

<dl>
<dt><a name="index-Label-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Label</b><i> (<code>char</code> dir, <code>const char *</code>text, <code>float</code> pos=<code>0</code>, <code>float</code> size=<code>-1.4</code>, <code>float</code> shift=<code>0</code>)</i></dt>
<dt><a name="index-Label-3"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Label</b><i> (<code>char</code> dir, <code>const wchar_t *</code>text, <code>float</code> pos=<code>0</code>, <code>float</code> size=<code>-1.4</code>, <code>float</code> shift=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005flabel"></a><u>C function:</u> <code>void</code> <b>mgl_label</b><i> (<code>HMGL</code> gr, <code>char</code> dir, <code>const char *</code>text)</i></dt>
<dt><a name="index-mgl_005flabel_005fext"></a><u>C function:</u> <code>void</code> <b>mgl_label_ext</b><i> (<code>HMGL</code> gr, <code>char</code> dir, <code>const char *</code>text, <code>float</code> pos, <code>float</code> size, <code>float</code> shift)</i></dt>
<dt><a name="index-mgl_005flabelw_005fext"></a><u>C function:</u> <code>void</code> <b>mgl_labelw_ext</b><i> (<code>HMGL</code> gr, <code>char</code> dir, <code>const wchar_t *</code>text, <code>float</code> pos, <code>float</code> size, <code>float</code> shift)</i></dt>
<dd><p>Prints the label <var>text</var> for axis <var>dir</var>=&lsquo;<samp>x</samp>&rsquo;,&lsquo;<samp>y</samp>&rsquo;,&lsquo;<samp>z</samp>&rsquo;,&lsquo;<samp>t</samp>&rsquo; (here &lsquo;<samp>t</samp>&rsquo; is &ldquo;ternary&rdquo; axis <em>t=1-x-y</em>). The position of label is determined by <var>pos</var> parameter. If <var>pos</var>=0 then label is printed at the center of axis. If <var>pos</var>&gt;0 then label is printed at the maximum of axis. If <var>pos</var>&lt;0 then label is printed at the minimum of axis. Parameter <var>size</var> determines the font size for the label. By default the font size is 1.4 times larger than the one for ticks <var>FontSize</var> (see section <a href="#Font-settings">Font settings</a>). See section <a href="#Text-printing">Text printing</a>.
</p></dd></dl>

<hr size="6">
<a name="Legend"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Axis-and-Colorbar" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Legend-1"></a>
<h2 class="section">3.8 Legend</h2>
<a name="index-Legend"></a>
<a name="index-AddLegend"></a>
<a name="index-ClearLegend"></a>
<a name="index-SetLegendBox"></a>
<a name="index-SetLegendMarks"></a>

<p>These functions draw legend to the graph (useful for <a href="#g_t1D-plotting">1D plotting</a>). Legend entry is a pair of strings: one for style of the line, another one with description text (with included TeX parsing). The arrays of strings may be used directly or by accumulating first to the internal arrays (by function AddLegend()) and further plotting it. The position of the legend can be selected automatic or manually. Parameters <var>font</var> and <var>size</var> specify the font style and size (see section <a href="#Font-settings">Font settings</a>). Parameter <var>llen</var> set the relative width of the line sample and the text indent. If line style string for entry is empty then the corresponding text is printed without indent. If string <var>font</var> contains symbol &lsquo;<samp>A</samp>&rsquo; then legend coordinates set position in the picture (not in the current subplot). See section <a href="mathgl_en_9.html#Legend-sample">Legend sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Legend-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Legend</b><i> (<code>int</code> where=<code>0x3</code>, <code>const char *</code>font=<code>&quot;rL&quot;</code>, <code>float</code> size=<code>-0.8</code>, <code>float</code> llen=<code>0.1</code>)</i></dt>
<dt><a name="index-mgl_005flegend"></a><u>C function:</u> <code>void</code> <b>mgl_legend</b><i> (<code>HMGL</code> gr, <code>int</code> where, <code>const char *</code>font, <code>float</code> size, <code>float</code> llen)</i></dt>
<dd><p>Draws legend of accumulated legend entries by font <var>font</var> with <var>size</var>. Parameter <var>where</var> sets the position of the legend: &lsquo;<samp>0</samp>&rsquo; is bottom left corner, &lsquo;<samp>1</samp>&rsquo; is bottom right corner, &lsquo;<samp>2</samp>&rsquo; is top left corner, &lsquo;<samp>3</samp>&rsquo; is top right corner (is default).
</p></dd></dl>

<dl>
<dt><a name="index-Legend-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Legend</b><i> (<code>int</code> n, <code>wchar_t **</code>text, <code>char **</code>style, <code>int</code> where=<code>0x3</code>, <code>const char *</code>font=<code>&quot;rL&quot;</code>, <code>float</code> size=<code>-0.8</code>, <code>float</code> llen=<code>0.1</code>)</i></dt>
<dd><p>Draws legend with <var>n</var>-th elements of string array <var>text</var> by font <var>font</var> with <var>size</var>. Entry strings <var>text</var> describe curves with line style <var>style</var> (including marks). Parameter <var>where</var> sets the position of the legend: &lsquo;<samp>0</samp>&rsquo; is bottom left corner, &lsquo;<samp>1</samp>&rsquo; is bottom right corner, &lsquo;<samp>2</samp>&rsquo; is top left corner, &lsquo;<samp>3</samp>&rsquo; is top right corner (is default).
</p></dd></dl>

<dl>
<dt><a name="index-Legend-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Legend</b><i> (<code>float</code> x, <code>float</code> y, <code>const char *</code>font=<code>&quot;rL&quot;</code>, <code>float</code> size=<code>-0.8</code>, <code>float</code> llen=<code>0.1</code>)</i></dt>
<dt><a name="index-mgl_005flegend_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_legend_xy</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>const char *</code>font, <code>float</code> size, <code>float</code> llen)</i></dt>
<dd><p>Draws legend of accumulated legend entries by font <var>font</var> with <var>size</var>. Position of legend is determined by parameter <var>x</var>, <var>y</var> which supposed to be normalized to interval [0,1].
</p></dd></dl>

<dl>
<dt><a name="index-Legend-4"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Legend</b><i> (<code>int</code> n, <code>wchar_t **</code>text, <code>char **</code>style, <code>float</code> x, <code>float</code> y, <code>const char *</code>font=<code>&quot;rL&quot;</code>, <code>float</code> size=<code>-0.8</code>, <code>float</code> llen=<code>0.1</code>)</i></dt>
<dd><p>Draws legend with <var>n</var>-th elements of string array <var>text</var> by font <var>font</var> with <var>size</var>. Entry strings <var>text</var> describe curves with line style <var>style</var> (including marks). Position of legend is determined by parameter <var>x</var>, <var>y</var> which supposed to be normalized to interval [0,1].
</p></dd></dl>

<dl>
<dt><a name="index-AddLegend-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>AddLegend</b><i> (<code>const char *</code>text, <code>const char *</code>style)</i></dt>
<dt><a name="index-AddLegend-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>AddLegend</b><i> (<code>const wchar_t *</code>text, <code>const char *</code>style)</i></dt>
<dt><a name="index-mgl_005fadd_005flegend"></a><u>C function:</u> <code>void</code> <b>mgl_add_legend</b><i> (<code>HMGL</code> gr, <code>const char *</code>text, <code>const char *</code>style)</i></dt>
<dt><a name="index-mgl_005fadd_005flegendw"></a><u>C function:</u> <code>void</code> <b>mgl_add_legendw</b><i> (<code>HMGL</code> gr, <code>const wchar_t *</code>text, <code>const char *</code>style)</i></dt>
<dd><p>Adds string <var>text</var> to internal legend accumulator. The style of described line and mark is specified in string <var>style</var> (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). Maximal number of entries is 100.
</p></dd></dl>

<dl>
<dt><a name="index-ClearLegend-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ClearLegend</b><i> ()</i></dt>
<dt><a name="index-mgl_005fclear_005flegend"></a><u>C function:</u> <code>void</code> <b>mgl_clear_legend</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Clears saved legend strings.
</p></dd></dl>

<dl>
<dt><a name="index-SetLegendBox-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetLegendBox</b><i> (<code>bool</code> enable)</i></dt>
<dt><a name="index-mgl_005fset_005flegend_005fbox"></a><u>C function:</u> <code>void</code> <b>mgl_set_legend_box</b><i> (<code>HMGL</code> gr, <code>int</code> enable)</i></dt>
<dd><p>Switch on/off drawing box near legend. By default (=<code>true</code>) box is drawn.
</p></dd></dl>

<dl>
<dt><a name="index-SetLegendMarks-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SetLegendMarks</b><i> (<code>int</code> num)</i></dt>
<dt><a name="index-mgl_005fset_005flegend_005fmarks"></a><u>C function:</u> <code>void</code> <b>mgl_set_legend_marks</b><i> (<code>HMGL</code> gr, <code>int</code> num)</i></dt>
<dd><p>Set the number of marks in the legend. By default 1 mark is used.
</p></dd></dl>

<dl>
<dt><a name="index-LegendBox-of-mglGraph"></a><u><em>Obsolete option</em> of mglGraph:</u> <code>bool</code> <b>LegendBox</b></dt>
<dd><p>Switch on/off drawing box near legend. See <code>SetLegendBox()</code>.
</p></dd></dl>

<hr size="6">
<a name="g_t1D-plotting"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Legend" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Plot" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="g_t1D-plotting-1"></a>
<h2 class="section">3.9 1D plotting</h2>

<p>These functions perform plotting of 1D data. 1D means that data depended from only 1 parameter like parametric curve {x(i),y(i),z(i)}, i=1...n. There are 5 generally different types of data representations: simple line plot (Plot), line plot with filling under it (Area), stairs plot (Step), bar plot (Bars, Barh) and vertical lines (Stem). Each type of plotting has similar interface. There are 3D version and two 2D versions. One of last requires single array. The parameters of line and marks are specified by the string argument. If the string parameter is &quot;&quot; then solid line with color from palette Pal is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). Also there are some special 1d plots having slightly different interface: surface of curve rotation (Torus), chart (Chart) and error boxes (Error), marks with variable size (Mark), tubes (Tube) and so on. See section <a href="mathgl_en_1.html#Line-styles">Line styles</a>. See section <a href="mathgl_en_9.html#g_t1D-plot-sample">1D plot sample</a>, for sample code and picture.
</p>

<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Plot">3.9.1 Plot</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Radar">3.9.2 Radar</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Tens">3.9.3 Tens</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Area">3.9.4 Area</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Region">3.9.5 Region</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Stem">3.9.6 Stem</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Bars">3.9.7 Bars</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Barh">3.9.8 Barh</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Chart">3.9.9 Chart</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Step">3.9.10 Step</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Torus">3.9.11 Torus</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Tube">3.9.12 Tube</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Mark">3.9.13 Mark</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#TextMark">3.9.14 TextMark</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Error">3.9.15 Error</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#BoxPlot">3.9.16 BoxPlot</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top">
</td></tr>
</table>

<hr size="6">
<a name="Plot"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Radar" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Plot-1"></a>
<h3 class="subsection">3.9.1 Plot</h3>
<a name="index-Plot"></a>

<p>These functions draw continuous lines between points. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx</code>. String <var>pen</var> specifies the color and style of line and marks (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). See also <a href="#Area">Area</a>, <a href="#Step">Step</a>, <a href="#Stem">Stem</a>, <a href="#Tube">Tube</a>, <a href="#Mark">Mark</a>, <a href="#Error">Error</a>, <a href="#Belt">Belt</a>, <a href="#Tens">Tens</a>. See section <a href="mathgl_en_9.html#Plot-sample">Plot sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Plot-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Plot</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fplot_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_plot_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous lines between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} in 3D space.
</p></dd></dl>

<dl>
<dt><a name="index-Plot-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Plot</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fplot_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_plot_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous lines between points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>).
</p></dd></dl>

<dl>
<dt><a name="index-Plot-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Plot</b><i> (<code>const mglData &amp;</code>y, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fplot"></a><u>C function:</u> <code>void</code> <b>mgl_plot</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous lines between points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>), where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<hr size="6">
<a name="Radar"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Plot" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Tens" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Radar-1"></a>
<h3 class="subsection">3.9.2 Radar</h3>
<a name="index-Radar"></a>

<dl>
<dt><a name="index-Radar-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Radar</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>pen=<code>&quot;&quot;</code>, <code>float</code> r=<code>-1</code>)</i></dt>
<dt><a name="index-mgl_005fradar"></a><u>C function:</u> <code>void</code> <b>mgl_radar</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>pen, <code>float</code> r)</i></dt>
<dd><p>This functions draws radar chart which is continuous lines between points located on an radial lines (like plot in Polar coordinates). The plots are drawn for each row if one of the data is the matrix. Parameter <var>r</var> set the additional shift of data (i.e. the data <var>a</var>+<var>r</var> is used instead of <var>a</var>). If <code>r&lt;0</code> then <code>r=max(0, -min(a)</code>. String <var>pen</var> specifies the color and style of line and marks (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). If <var>pen</var> containt &lsquo;<samp>#</samp>&rsquo; symbol then &quot;grid&quot; (radial lines and circle for <var>r</var>) is drawn See also <a href="#Plot">Plot</a>. See section <a href="mathgl_en_9.html#Radar-sample">Radar sample</a>, for sample code and picture.
</p></dd></dl>

<hr size="6">
<a name="Tens"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Radar" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Area" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Tens-1"></a>
<h3 class="subsection">3.9.3 Tens</h3>
<a name="index-Tens"></a>

<p>These functions draw continuous lines between points with color defined by the special array (look like tension plot). The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx</code>. String <var>pen</var> specifies the color scheme (see section <a href="mathgl_en_1.html#Color-scheme">Color scheme</a>) and style and/or width of line (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with current color scheme is used. See also <a href="#Plot">Plot</a>, <a href="#Mesh">Mesh</a>, <a href="#Fall">Fall</a>. See section <a href="mathgl_en_9.html#Tens-sample">Tens sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Tens-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Tens</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>c, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftens_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_tens_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> c, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous lines between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} in 3D space with color defined by <var>c</var>[i].
</p></dd></dl>

<dl>
<dt><a name="index-Tens-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Tens</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>c, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftens_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_tens_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> c, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous lines between points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>) with color defined by <var>c</var>[i].
</p></dd></dl>

<dl>
<dt><a name="index-Tens-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Tens</b><i> (<code>const mglData &amp;</code>y, <code>const mglData &amp;</code>c, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftens"></a><u>C function:</u> <code>void</code> <b>mgl_tens</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const HMDT</code> c, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous lines between points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>) with color defined by <var>c</var>[i], where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<hr size="6">
<a name="Area"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Tens" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Region" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Area-1"></a>
<h3 class="subsection">3.9.4 Area</h3>
<a name="index-Area"></a>

<p>These functions draw continuous lines between points and fills it to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx</code>. String <var>pen</var> specifies the color and style of line and marks (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). Also you can use gradient filling if number of specified colors is equal to 2*number of curves. If string contain symbol &lsquo;<samp>a</samp>&rsquo; then lines are drawn one above another (like summation) &ndash; you can reach the same effect if call <code>y.CumSum(&quot;y&quot;);</code> before plot. See also <a href="#Plot">Plot</a>, <a href="#Bars">Bars</a>, <a href="#Stem">Stem</a>. See section <a href="mathgl_en_9.html#Area-sample">Area sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Area-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Area</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005farea_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_area_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous lines between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} in 3D space and fills it down to <var>z</var> = Org.z.
</p></dd></dl>

<dl>
<dt><a name="index-Area-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Area</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005farea_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_area_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous lines between points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>) and fills it down to <var>y</var> = Org.y.
</p></dd></dl>

<dl>
<dt><a name="index-Area-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Area</b><i> (<code>const mglData &amp;</code>y, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005farea"></a><u>C function:</u> <code>void</code> <b>mgl_area</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous lines between points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>) and fills it down to <var>y</var> = Org.y, where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<hr size="6">
<a name="Region"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Area" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Stem" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Region-1"></a>
<h3 class="subsection">3.9.5 Region</h3>
<a name="index-Region"></a>

<p>These functions fill area between 2 curves. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y1.nx=y2.nx</code> and all dimensions of arrays <var>y1</var> and <var>y2</var> must be equal too. String <var>pen</var> specifies the color (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). Also you can use gradient filling if number of specified colors is equal to 2*number of curves. See also <a href="#Area">Area</a>, <a href="#Bars">Bars</a>, <a href="#Stem">Stem</a>. See section <a href="mathgl_en_9.html#Region-sample">Region sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Region-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Region</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y1, <code>const mglData &amp;</code>y2, <code>const char *</code>pen=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>, <code>bool</code> inside=<code>true</code>)</i></dt>
<dt><a name="index-mgl_005fregion_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_region_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y1, <code>const HMDT</code> y2, <code>const char *</code>pen, <code>int</code> inside)</i></dt>
<dd><p>The function fills area between curves {<var>x</var>[i], <var>y1</var>[i]} and {<var>x</var>[i], <var>y2</var>[i]} at z=<var>zVal</var>. Parameter <code>inside=false</code> set to fill are with y1&lt;y&lt;y2 else the area with y2&lt;y&lt;y1 will be also filled.
</p></dd></dl>

<dl>
<dt><a name="index-Region-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Region</b><i> (<code>const mglData &amp;</code>y1, <code>const mglData &amp;</code>y2, <code>const char *</code>pen=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>, <code>bool</code> inside=<code>true</code>)</i></dt>
<dt><a name="index-mgl_005fregion"></a><u>C function:</u> <code>void</code> <b>mgl_region</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y1, <code>const HMDT</code> y2, <code>const char *</code>pen, <code>int</code> inside)</i></dt>
<dd><p>The function fills area between curves {<var>x</var>[i], <var>y1</var>[i]} and {<var>x</var>[i], <var>y2</var>[i]}, where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x] at z=<var>zVal</var>.
</p></dd></dl>

<hr size="6">
<a name="Stem"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Region" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Bars" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Stem-1"></a>
<h3 class="subsection">3.9.6 Stem</h3>
<a name="index-Stem"></a>

<p>These functions draw vertical lines from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx</code>. String <var>pen</var> specifies the color and style of line and marks (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). See also <a href="#Area">Area</a>, <a href="#Bars">Bars</a>, <a href="#Plot">Plot</a>, <a href="#Mark">Mark</a>. See section <a href="mathgl_en_9.html#Stem-sample">Stem sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Stem-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Stem</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fstem_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_stem_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws vertical lines from points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} down to <var>z</var> = Org.z.
</p></dd></dl>

<dl>
<dt><a name="index-Stem-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Stem</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fstem_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_stem_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws vertical lines from points {<var>x</var>[i], <var>y</var>[i]} down to <var>y</var> = Org.y in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>).
</p></dd></dl>

<dl>
<dt><a name="index-Stem-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Stem</b><i> (<code>const mglData &amp;</code>y, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fstem"></a><u>C function:</u> <code>void</code> <b>mgl_stem</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws vertical lines from points {<var>x</var>[i], <var>y</var>[i]} down to <var>y</var> = Org.y in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>), where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<hr size="6">
<a name="Bars"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Stem" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Barh" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Bars-1"></a>
<h3 class="subsection">3.9.7 Bars</h3>
<a name="index-Bars"></a>

<p>These functions draw vertical bars from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx</code>. String <var>pen</var> specifies the color and style of line and marks (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). If string contain symbol &lsquo;<samp>a</samp>&rsquo; then lines are drawn one above another (like summation). If string contain symbol &lsquo;<samp>f</samp>&rsquo; then waterfall chart is drawn for determining the cumulative effect of sequentially introduced positive or negative values. You can different colors for positive and negative values if number of specified colors is equal to 2*number of curves. See also <a href="#Barh">Barh</a>, <a href="#Area">Area</a>, <a href="#Stem">Stem</a>, <a href="#Chart">Chart</a>, <a href="#Default-sizes">Default sizes</a>. See section <a href="mathgl_en_9.html#Bars-sample">Bars sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Bars-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Bars</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fbars_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_bars_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws vertical bars from points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} down to <var>z</var> = Org.z.
</p></dd></dl>

<dl>
<dt><a name="index-Bars-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Bars</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fbars_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_bars_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws vertical bars from points {<var>x</var>[i], <var>y</var>[i]} down to <var>y</var> = Org.y in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>).
</p></dd></dl>

<dl>
<dt><a name="index-Bars-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Bars</b><i> (<code>const mglData &amp;</code>y, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fbars"></a><u>C function:</u> <code>void</code> <b>mgl_bars</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws vertical bars from points {<var>x</var>[i], <var>y</var>[i]} down to <var>y</var> = Org.y in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>), where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<hr size="6">
<a name="Barh"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Bars" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Chart" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Barh-1"></a>
<h3 class="subsection">3.9.8 Barh</h3>
<a name="index-Barh"></a>

<p>These functions draw horizontal bars from points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx</code>. String <var>pen</var> specifies the color and style of line and marks (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). If string contain symbol &lsquo;<samp>a</samp>&rsquo; then lines are drawn one above another (like summation). See also <a href="#Barh">Barh</a>, <a href="#Default-sizes">Default sizes</a>. See section <a href="mathgl_en_9.html#Barh-sample">Barh sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Barh-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Barh</b><i> (<code>const mglData &amp;</code>y, <code>const mglData &amp;</code>v, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fbarh_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_barh_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const HMDT</code> v, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws horizontal bars from points {<var>v</var>[i], <var>y</var>[i]} down to <var>x</var> = Org.x in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>).
</p></dd></dl>

<dl>
<dt><a name="index-Barh-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Barh</b><i> (<code>const mglData &amp;</code>v, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fbarh"></a><u>C function:</u> <code>void</code> <b>mgl_barh</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws horizontal bars from points {<var>v</var>[i], <var>y</var>[i]} down to <var>x</var> = Org.x in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>), where <var>y</var>[i] values are equidistantly distributed in interval [<var>Min</var>.y, <var>Max</var>.y].
</p></dd></dl>

<hr size="6">
<a name="Chart"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Barh" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Step" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Chart-1"></a>
<h3 class="subsection">3.9.9 Chart</h3>
<a name="index-Chart"></a>

<dl>
<dt><a name="index-Chart-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Chart</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>col=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fchart"></a><u>C function:</u> <code>void</code> <b>mgl_chart</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>col)</i></dt>
<dd><p>The function draws colored stripes (boxes) for data in array <var>a</var>. The number of stripes is equal to the number of rows in <var>a</var> (equal to <var>a.ny</var>). The color of each next stripe is cyclically changed from colors specified in string <var>col</var> or in palette Pal (see section <a href="#Palette-and-colors">Pallete and colors</a>). Spaces in colors denote transparent &ldquo;color&rdquo;, i.e. if <var>col</var> contain space(s) then corresponding stripe(s) are not drawn. The stripe width is proportional to value of element in <var>a</var>. Chart is plotted only for data with non-negative elements. If string <var>col</var> have symbol &lsquo;<samp>#</samp>&rsquo; then black border lines are drawn. The most nice form the chart have in 3d (after rotation of coordinates) or in cylindrical coordinates (becomes so called Pie chart). See section <a href="mathgl_en_9.html#Chart-sample">Chart sample</a>, for sample code and picture.
</p></dd></dl>


<hr size="6">
<a name="Step"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Chart" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Torus" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Step-1"></a>
<h3 class="subsection">3.9.10 Step</h3>
<a name="index-Step"></a>

<p>These functions draw continuous stairs for points to axis plane. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx</code>. String <var>pen</var> specifies the color and style of line and marks (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). See also <a href="#Plot">Plot</a>, <a href="#Stem">Stem</a>, <a href="#Tile">Tile</a>, <a href="#Boxs">Boxs</a>. See section <a href="mathgl_en_9.html#Step-sample">Step sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Step-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Step</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fstep_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_step_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous stairs for points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}.
</p></dd></dl>

<dl>
<dt><a name="index-Step-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Step</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fstep_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_step_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous stairs for points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>).
</p></dd></dl>

<dl>
<dt><a name="index-Step-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Step</b><i> (<code>const mglData &amp;</code>y, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fstep"></a><u>C function:</u> <code>void</code> <b>mgl_step</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws continuous stairs for points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>), where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<hr size="6">
<a name="Torus"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Step" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Tube" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Torus-1"></a>
<h3 class="subsection">3.9.11 Torus</h3>
<a name="index-Torus"></a>

<p>These functions draw surface which is result of curve {<var>r</var>, <var>z</var>} rotation around <var>AxialDir</var> axis (see section <a href="#Other-settings">Other settings</a>). The sizes of 1st dimension <strong>must be equal</strong> for all arrays <var>r.nx=z.nx</var>. String <var>pen</var> specifies the color (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). See also <a href="#Plot">Plot</a>, <a href="#Axial">Axial</a>. See section <a href="mathgl_en_9.html#Torus-sample">Torus sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Torus-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Torus</b><i> (<code>const mglData &amp;</code>r, <code>const mglData &amp;</code>z, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftorus"></a><u>C function:</u> <code>void</code> <b>mgl_torus</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> r, <code>const HMDT</code> z, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws surface which is result of curve {<var>r</var>[i], <var>z</var>[i]} rotation.
</p></dd></dl>

<dl>
<dt><a name="index-Torus-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Torus</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dd><p>The function draws surface which is result of curve {<var>r</var>[i], <var>z</var>[i]} rotation, where <var>r</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<hr size="6">
<a name="Tube"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Torus" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Mark" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Tube-1"></a>
<h3 class="subsection">3.9.12 Tube</h3>
<a name="index-Tube"></a>

<p>These functions draw the tube with variable radius <var>r</var>[i] along the curve between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx=r.nx</code>. String <var>pen</var> specifies the color and style of line and marks (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). See also <a href="#Plot">Plot</a>. See section <a href="mathgl_en_9.html#Tube-sample">Tube sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Tube-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Tube</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>r, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-Tube-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Tube</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>float</code> r, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftube_005fxyzr"></a><u>C function:</u> <code>void</code> <b>mgl_tube_xyzr</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> r, <code>const char *</code>pen)</i></dt>
<dt><a name="index-mgl_005ftube_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_tube_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>float</code> r, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws tube with radius <var>r</var> between points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} in 3D space.
</p></dd></dl>

<dl>
<dt><a name="index-Tube-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Tube</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>r, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-Tube-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Tube</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>float</code> r, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftube_005fxyr"></a><u>C function:</u> <code>void</code> <b>mgl_tube_xyr</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> r, <code>const char *</code>pen)</i></dt>
<dt><a name="index-mgl_005ftube_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_tube_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>float</code> r, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws tube with radius <var>r</var> between points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>).
</p></dd></dl>

<dl>
<dt><a name="index-Tube-5"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Tube</b><i> (<code>const mglData &amp;</code>y, <code>const mglData &amp;</code>r, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-Tube-6"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Tube</b><i> (<code>const mglData &amp;</code>y, <code>float</code> r, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftube_005fr"></a><u>C function:</u> <code>void</code> <b>mgl_tube_r</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const HMDT</code> r, <code>const char *</code>pen)</i></dt>
<dt><a name="index-mgl_005ftube"></a><u>C function:</u> <code>void</code> <b>mgl_tube</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>float</code> r, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws tube with radius <var>r</var> between points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>), where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<hr size="6">
<a name="Mark"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Tube" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#TextMark" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Mark-1"></a>
<h3 class="subsection">3.9.13 Mark</h3>
<a name="index-Mark-3"></a>

<p>These functions draw marks with size <var>r</var>*<var>MarkSize</var> (see section <a href="#Default-sizes">Default sizes</a>) at points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx=r.nx</code>. String <var>pen</var> specifies the color and style of line and marks (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). If you need to draw markers of the same size then you may use <a href="#Plot">Plot</a> function. See also <a href="#Plot">Plot</a>, <a href="#TextMark">TextMark</a>, <a href="#Stem">Stem</a>, <a href="#Error">Error</a>. See section <a href="mathgl_en_9.html#Mark-sample">Mark sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Mark-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Mark</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>r, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fmark_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_mark_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> r, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws marks for points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} in 3D space.
</p></dd></dl>

<dl>
<dt><a name="index-Mark-5"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Mark</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>r, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fmark_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_mark_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> r, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws marks for points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>).
</p></dd></dl>

<dl>
<dt><a name="index-Mark-6"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Mark</b><i> (<code>const mglData &amp;</code>y, <code>const mglData &amp;</code>r, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fmark_005fy"></a><u>C function:</u> <code>void</code> <b>mgl_mark_y</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const HMDT</code> r, <code>const char *</code>pen)</i></dt>
<dd><p>The function draws marks for points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>), where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<hr size="6">
<a name="TextMark"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Mark" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Error" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="TextMark-1"></a>
<h3 class="subsection">3.9.14 TextMark</h3>
<a name="index-TextMark"></a>

<p>These functions draw string <var>text</var> as marks with size proportional to <var>r</var>*<var>MarkSize</var> (see section <a href="#Default-sizes">Default sizes</a>) at points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx=r.nx</code>. String <var>pen</var> specifies the color and style of line and marks (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). See also <a href="#Plot">Plot</a>, <a href="#Mark">Mark</a>, <a href="#Stem">Stem</a>. See section <a href="mathgl_en_9.html#TextMark-sample">TextMark sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-TextMark-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TextMark</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>r, <code>const char *</code>text, <code>const char *</code>fnt=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-TextMark-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>TextMark</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>r, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftextmarkw_005fxyzr"></a><u>C function:</u> <code>void</code> <b>mgl_textmarkw_xyzr</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> r, <code>const wchar_t *</code>text, <code>const char *</code>fnt)</i></dt>
<dt><a name="index-mgl_005ftextmark_005fxyzr"></a><u>C function:</u> <code>void</code> <b>mgl_textmark_xyzr</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> r, <code>const char *</code>text, <code>const char *</code>fnt)</i></dt>
<dd><p>The function draws textual marks for points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]} in 3D space.
</p></dd></dl>

<dl>
<dt><a name="index-TextMark-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TextMark</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>r, <code>const char *</code>text, <code>const char *</code>fnt=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-TextMark-4"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>TextMark</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>r, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftextmarkw_005fxyr"></a><u>C function:</u> <code>void</code> <b>mgl_textmarkw_xyr</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> r, <code>const wchar_t *</code>text, <code>const char *</code>fnt)</i></dt>
<dt><a name="index-mgl_005ftextmark_005fxyr"></a><u>C function:</u> <code>void</code> <b>mgl_textmark_xyr</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> r, <code>const char *</code>text, <code>const char *</code>fnt)</i></dt>
<dd><p>The function draws textual marks for points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>).
</p></dd></dl>

<dl>
<dt><a name="index-TextMark-5"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TextMark</b><i> (<code>const mglData &amp;</code>y, <code>const mglData &amp;</code>r, <code>const char *</code>text, <code>const char *</code>fnt=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-TextMark-6"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>TextMark</b><i> (<code>const mglData &amp;</code>y, <code>const mglData &amp;</code>r, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftextmarkw_005fyr"></a><u>C function:</u> <code>void</code> <b>mgl_textmarkw_yr</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const HMDT</code> r, <code>const wchar_t *</code>text, <code>const char *</code>fnt)</i></dt>
<dt><a name="index-mgl_005ftextmark_005fyr"></a><u>C function:</u> <code>void</code> <b>mgl_textmark_yr</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const HMDT</code> r, <code>const char *</code>text, <code>const char *</code>fnt)</i></dt>
<dd><p>The function draws textual marks for points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>), where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<dl>
<dt><a name="index-TextMark-7"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TextMark</b><i> (<code>const mglData &amp;</code>y, <code>const char *</code>text, <code>const char *</code>fnt=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-TextMark-8"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>TextMark</b><i> (<code>const mglData &amp;</code>y, <code>const wchar_t *</code>text, <code>const char *</code>fnt=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftextmarkw"></a><u>C function:</u> <code>void</code> <b>mgl_textmarkw</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const wchar_t *</code>text, <code>const char *</code>fnt)</i></dt>
<dt><a name="index-mgl_005ftextmark"></a><u>C function:</u> <code>void</code> <b>mgl_textmark</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const char *</code>text, <code>const char *</code>fnt)</i></dt>
<dd><p>The function draws textual marks for points {<var>x</var>[i], <var>y</var>[i]} in plane <var>z</var>=<var>zVal</var> (default in plane <var>z</var>=<var>Min.z</var>), where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x]. The mark sizes <var>r</var>[i]=1 for all points.
</p></dd></dl>

<hr size="6">
<a name="Error"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#TextMark" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#BoxPlot" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Error-1"></a>
<h3 class="subsection">3.9.15 Error</h3>
<a name="index-Error-2"></a>

<p>These functions draw error boxes at points {<var>x</var>[i], <var>y</var>[i]} on plane <var>z</var> = <var>zVal</var> (by default <var>z</var>=<var>Min.z</var>). This can be useful, for example, in experimental points, or to show numeric error or some estimations and so on. The plots are drawn for each row if one of the data is the matrix. By any case the sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=y.nx=z.nx=r.nx</code>. String <var>pen</var> specifies the color and style of line and marks (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). See also <a href="#Plot">Plot</a>. See section <a href="mathgl_en_9.html#Error-sample">Error sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-Error-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Error</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ex, <code>const mglData &amp;</code>ey, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ferror_005fexy"></a><u>C function:</u> <code>void</code> <b>mgl_error_exy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> ex, <code>const HMDT</code> ey, <code>const char *</code>pen)</i></dt>
<dd><p>Draws a error box {<var>ex</var>, <var>ey</var>} in point position {<var>x</var>, <var>y</var>}.
</p></dd></dl>

<dl>
<dt><a name="index-Error-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Error</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ey, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ferror_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_error_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> ey, <code>const char *</code>pen)</i></dt>
<dd><p>Draws a error box <var>ey</var> (along only one direction) in point position {<var>x</var>, <var>y</var>}.
</p></dd></dl>

<dl>
<dt><a name="index-Error-5"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Error</b><i> (<code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ey, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ferror"></a><u>C function:</u> <code>void</code> <b>mgl_error</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> y, <code>const HMDT</code> ey, <code>const char *</code>pen)</i></dt>
<dd><p>Draws a error box <var>ey</var> (along only one direction) in point position {<var>x</var>, <var>y</var>}, where <var>x</var>[i] values are equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<hr size="6">
<a name="BoxPlot"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Error" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t1D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="BoxPlot-1"></a>
<h3 class="subsection">3.9.16 BoxPlot</h3>
<a name="index-BoxPlot"></a>

<p>These functions draw boxplot (also known as a box-and-whisker diagram) at points <var>x</var>[i] on plane <var>z</var> = <var>zVal</var> (by default <var>z</var>=<var>Min.z</var>). This is five-number summaries of data <var>a</var>[i,j] (minimum, lower quartile (Q1), median (Q2), upper quartile (Q3) and maximum) along second (j-th) direction. The sizes of 1st dimension <strong>must be equal</strong> for all arrays <code>x.nx=a.nx</code>. String <var>pen</var> specifies the color and style of line (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) solid line with color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). See also <a href="#Plot">Plot</a>, <a href="#Error">Error</a>, <a href="#Bars">Bars</a>, <a href="#Default-sizes">Default sizes</a>. See section <a href="mathgl_en_9.html#BoxPlot-sample">BoxPlot sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-BoxPlot-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>BoxPlot</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>a, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fboxplot_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_boxplot_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> a, <code>const char *</code>pen)</i></dt>
<dd><p>Draws a boxplot with specified values of coordinate <var>x</var>[i].
</p></dd></dl>

<dl>
<dt><a name="index-BoxPlot-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>BoxPlot</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>pen=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fboxplot"></a><u>C function:</u> <code>void</code> <b>mgl_boxplot</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>pen)</i></dt>
<dd><p>Draws a boxplot with <var>x</var>[i] values equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<hr size="6">
<a name="g_t2D-plotting"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#BoxPlot" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Mesh" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="g_t2D-plotting-1"></a>
<h2 class="section">3.10 2D plotting</h2>

<p>These functions perform plotting of 2D data. 2D means that data depend from 2 independent parameters like matrix <em>f(x_i,y_j), i=1...n, j=1...m</em>. There are several generally different types of data representations: simple mesh lines plot (Mesh), surface plot (Surf), surface plot by boxes (Boxs), surface plot by tiles (Tile), waterfall-like plot (Fall), belt plot (Belt), density plot (Dens), contour lines plot (Cont), solid contours plot (ContF) and its rotational figure (Axial). Cont, ContF and Axial functions have variants for automatic and manual selection of level values for contours. Also there are functions for plotting data grid lines according to the data format (Grid) for enhancing density or contour plots. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. See section <a href="mathgl_en_1.html#Color-scheme">Color scheme</a>. See section <a href="mathgl_en_9.html#g_t2D-plot-sample">2D plot sample</a>, for sample code and picture.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Mesh">3.10.1 Mesh</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Fall">3.10.2 Fall</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Belt">3.10.3 Belt</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Surf">3.10.4 Surf</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Boxs">3.10.5 Boxs</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Tile">3.10.6 Tile</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Dens">3.10.7 Dens</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Cont">3.10.8 Cont</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#ContF">3.10.9 ContF</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#ContD">3.10.10 ContD</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Axial">3.10.11 Axial</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Grad">3.10.12 Grad</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Grid">3.10.13 Grid</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
</table>

<hr size="6">
<a name="Mesh"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Fall" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Mesh-1"></a>
<h3 class="subsection">3.10.1 Mesh</h3>
<a name="index-Mesh"></a>

<dl>
<dt><a name="index-Mesh-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Mesh</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fmesh_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_mesh_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws mesh lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Mesh lines are plotted for each z slice of the data. See also <a href="#Surf">Surf</a>, <a href="#Fall">Fall</a>, MeshNum (see section <a href="#Other-settings">Other settings</a>), <a href="#Cont">Cont</a>, <a href="#Tens">Tens</a>. See section <a href="mathgl_en_9.html#Mesh-sample">Mesh sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Mesh-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Mesh</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fmesh"></a><u>C function:</u> <code>void</code> <b>mgl_mesh</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Fall"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Mesh" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Belt" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Fall-1"></a>
<h3 class="subsection">3.10.2 Fall</h3>
<a name="index-Fall"></a>

<dl>
<dt><a name="index-Fall-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Fall</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ffall_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_fall_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws fall lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. This plot can be used for plotting several curves shifted in depth one from another. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If <var>sch</var> contain &lsquo;<samp>x</samp>&rsquo; then lines are drawn along x-direction else (by default) lines are drawn along y-direction. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Fall lines are plotted for each z slice of the data. See also <a href="#Belt">Belt</a>, <a href="#Mesh">Mesh</a>, <a href="#Tens">Tens</a>, MeshNum (see section <a href="#Other-settings">Other settings</a>). See section <a href="mathgl_en_9.html#Fall-sample">Fall sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Fall-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Fall</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ffall"></a><u>C function:</u> <code>void</code> <b>mgl_fall</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Belt"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Fall" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Surf" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Belt-1"></a>
<h3 class="subsection">3.10.3 Belt</h3>
<a name="index-Belt"></a>

<dl>
<dt><a name="index-Belt-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Belt</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fbelt_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_belt_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws belts for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. This plot can be used as 3d generalization of Plot (see section <a href="#Plot">Plot</a>). String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If <var>sch</var> contain &lsquo;<samp>x</samp>&rsquo; then belts are drawn along x-direction else (by default) belts are drawn along y-direction. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Belts are plotted for each z slice of the data. See also <a href="#Fall">Fall</a>, <a href="#Surf">Surf</a>, <a href="#Plot">Plot</a>, MeshNum (see section <a href="#Other-settings">Other settings</a>). See section <a href="mathgl_en_9.html#Belt-sample">Belt sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Belt-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Belt</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fbelt"></a><u>C function:</u> <code>void</code> <b>mgl_belt</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Surf"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Belt" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Boxs" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Surf-1"></a>
<h3 class="subsection">3.10.4 Surf</h3>
<a name="index-Surf"></a>

<dl>
<dt><a name="index-Surf-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurf_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_surf_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string <var>sch</var> have symbol &lsquo;<samp>#</samp>&rsquo; then grid lines are drawn. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Surface is plotted for each z slice of the data. See also <a href="#Mesh">Mesh</a>, <a href="#Dens">Dens</a>, <a href="#Belt">Belt</a>, <a href="#Tile">Tile</a>, <a href="#Boxs">Boxs</a>, <a href="#SurfC">SurfC</a>, <a href="#SurfA">SurfA</a>. See section <a href="mathgl_en_9.html#Surf-sample">Surf sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Surf-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurf"></a><u>C function:</u> <code>void</code> <b>mgl_surf</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Boxs"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Surf" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Tile" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Boxs-1"></a>
<h3 class="subsection">3.10.5 Boxs</h3>
<a name="index-Boxs"></a>

<dl>
<dt><a name="index-Boxs-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Boxs</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fboxs_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_boxs_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws vertical boxes for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Surface is plotted for each z slice of the data. See also <a href="#Surf">Surf</a>, <a href="#Dens">Dens</a>, <a href="#Tile">Tile</a>, <a href="#Step">Step</a>. See section <a href="mathgl_en_9.html#Boxs-sample">Boxs sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Boxs-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Boxs</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fboxs"></a><u>C function:</u> <code>void</code> <b>mgl_boxs</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Tile"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Boxs" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dens" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Tile-1"></a>
<h3 class="subsection">3.10.6 Tile</h3>
<a name="index-Tile"></a>

<dl>
<dt><a name="index-Tile-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Tile</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftile_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_tile_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws horizontal tiles for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Such plot can be used as 3d generalization of Step (see section <a href="#Step">Step</a>). String <var>sch</var> sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Surface is plotted for each z slice of the data. See also <a href="#Surf">Surf</a>, <a href="#Boxs">Boxs</a>, <a href="#Step">Step</a>, <a href="#TileS">TileS</a>. See section <a href="mathgl_en_9.html#Tile-sample">Tile sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Tile-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Tile</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftile"></a><u>C function:</u> <code>void</code> <b>mgl_tile</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Dens"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Tile" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Cont" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Dens-1"></a>
<h3 class="subsection">3.10.7 Dens</h3>
<a name="index-Dens"></a>

<dl>
<dt><a name="index-Dens-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Dens</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fdens_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_dens_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The function draws density plot for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var> = <var>zVal</var>. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string <var>sch</var> have symbol &lsquo;<samp>#</samp>&rsquo; then grid lines are drawn. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Surface is plotted for each z slice of the data. See also <a href="#Surf">Surf</a>, <a href="#Cont">Cont</a>, <a href="#ContF">ContF</a>, <a href="#Boxs">Boxs</a>, <a href="#Tile">Tile</a>, <a href="#DensXYZ">DensXYZ</a>. See section <a href="mathgl_en_9.html#Dens-sample">Dens sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Dens-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Dens</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fdens"></a><u>C function:</u> <code>void</code> <b>mgl_dens</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Cont"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Dens" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#ContF" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Cont-1"></a>
<h3 class="subsection">3.10.8 Cont</h3>
<a name="index-Cont"></a>

<dl>
<dt><a name="index-Cont-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Cont</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcont_005fxy_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_cont_xy_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The function draws contour lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var> = <var>zVal</var> (or for <var>z=v</var>[k] if <code>zVal==NAN</code>). Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string <var>sch</var> have symbol &lsquo;<samp>#</samp>&rsquo; then grid lines are drawn. If string <var>sch</var> have symbol &lsquo;<samp>t</samp>&rsquo; or &lsquo;<samp>T</samp>&rsquo; then contour labels <var>v</var>[k] will be drawn below (or above) the contours. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Surface is plotted for each z slice of the data. See also <a href="#Dens">Dens</a>, <a href="#ContF">ContF</a>, <a href="#ContD">ContD</a>, <a href="#Axial">Axial</a>, <a href="#ContXYZ">ContXYZ</a>. See section <a href="mathgl_en_9.html#Cont-sample">Cont sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Cont-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Cont</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcont_005f_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_cont__val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Cont-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Cont</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcont_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_cont_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>int</code> num, <code>float</code> zVal)</i></dt>
<dd><p>The same as first one with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in range [<var>Cmin</var>, <var>Cmax</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Cont-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Cont</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcont"></a><u>C function:</u> <code>void</code> <b>mgl_cont</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch, <code>int</code> num, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="ContF"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Cont" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#ContD" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="ContF-1"></a>
<h3 class="subsection">3.10.9 ContF</h3>
<a name="index-ContF"></a>

<dl>
<dt><a name="index-ContF-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContF</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcontf_005fxy_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_contf_xy_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The function draws solid (or filled) contour lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var> = <var>zVal</var> (or for <var>z=v</var>[k] if <code>zVal==NAN</code>). Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var> (must be <code>v.nx&gt;2</code>). String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string <var>sch</var> have symbol &lsquo;<samp>#</samp>&rsquo; then grid lines are drawn. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Surface is plotted for each z slice of the data. See also <a href="#Dens">Dens</a>, <a href="#Cont">Cont</a>, <a href="#Axial">Axial</a>, <a href="#ContFXYZ">ContFXYZ</a>. See section <a href="mathgl_en_9.html#ContF-sample">ContF sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-ContF-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContF</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcontf_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_contf_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-ContF-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContF</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcontf_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_contf_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>int</code> num, <code>float</code> zVal)</i></dt>
<dd><p>The same as first one with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in range [<var>Cmin</var>, <var>Cmax</var>].
</p></dd></dl>

<dl>
<dt><a name="index-ContF-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContF</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcontf"></a><u>C function:</u> <code>void</code> <b>mgl_contf</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch, <code>int</code> num, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="ContD"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#ContF" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Axial" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="ContD-1"></a>
<h3 class="subsection">3.10.10 ContD</h3>
<a name="index-ContD"></a>

<dl>
<dt><a name="index-ContD-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContD</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcontd_005fxy_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_contd_xy_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The function draws solid (or filled) contour lines for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var> = <var>zVal</var> (or for <var>z=v</var>[k] if <code>zVal==NAN</code>) with manual colors. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var> (must be <code>v.nx&gt;2</code>). String <var>sch</var> sets the contour colors: the color of k-th contour is determined by character <code>sch[k%strlen(sch)]</code>. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Surface is plotted for each z slice of the data. See also <a href="#Dens">Dens</a>, <a href="#Cont">Cont</a>, <a href="#ContF">ContF</a>. See section <a href="mathgl_en_9.html#ContD-sample">ContD sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-ContD-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContD</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcontd_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_contd_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-ContD-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContD</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcontd_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_contd_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>int</code> num, <code>float</code> zVal)</i></dt>
<dd><p>The same as first one with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in range [<var>Cmin</var>, <var>Cmax</var>].
</p></dd></dl>

<dl>
<dt><a name="index-ContD-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContD</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcontd"></a><u>C function:</u> <code>void</code> <b>mgl_contd</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch, <code>int</code> num, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Axial"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#ContD" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Grad" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Axial-1"></a>
<h3 class="subsection">3.10.11 Axial</h3>
<a name="index-Axial"></a>

<dl>
<dt><a name="index-Axial-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Axial</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005faxial_005fxy_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_axial_xy_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws surface which is result of contour plot rotation for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string <var>sch</var> have symbol &lsquo;<samp>#</samp>&rsquo; then wire plot is produced. If string contain symbols &lsquo;<samp>x</samp>&rsquo;, &lsquo;<samp>y</samp>&rsquo; or &lsquo;<samp>z</samp>&rsquo; then rotation axis <var>AxialDir</var> (see section <a href="#Other-settings">Other settings</a>) will be set to specified direction. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Surface is plotted for each z slice of the data. See also <a href="#Cont">Cont</a>, <a href="#ContF">ContF</a>, <a href="#Torus">Torus</a>, <a href="#Surf3">Surf3</a>. See section <a href="mathgl_en_9.html#Axial-sample">Axial sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Axial-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Axial</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005faxial_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_axial_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Axial-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Axial</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>3</code>)</i></dt>
<dt><a name="index-mgl_005faxial_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_axial_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>int</code> num)</i></dt>
<dd><p>The same as first one with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in range [<var>Cmin</var>, <var>Cmax</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Axial-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Axial</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>3</code>)</i></dt>
<dt><a name="index-mgl_005faxial"></a><u>C function:</u> <code>void</code> <b>mgl_axial</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch, <code>int</code> num)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>


<hr size="6">
<a name="Grad"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Axial" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Grid" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Grad-1"></a>
<h3 class="subsection">3.10.12 Grad</h3>
<a name="index-Grad"></a>

<dl>
<dt><a name="index-Grad-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Grad</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>phi, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>5</code>)</i></dt>
<dt><a name="index-mgl_005fgrad_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_grad_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>int</code> num, <code>float</code> zVal)</i></dt>
<dd><p>The function draws gradient lines for scalar field <var>phi</var>[i,j,k] specified parametrically {<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]}. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. Number of lines is proportional to <var>num</var>. If <var>num</var>&lt;0 then lines start from borders only. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var>, <var>phi</var> should be equal <code>x.nx=phi.nx &amp;&amp; y.nx=phi.ny &amp;&amp; z.nx=phi.nz</code> or <code>x.nx=y.nx=z.nx=phi.nx &amp;&amp; x.ny=y.ny=z.ny=phi.ny &amp;&amp; x.nz=y.nz=z.nz=phi.nz</code>. Arrays <var>x</var>, <var>y</var> and <var>z</var> can be vectors (not matrices as <var>phi</var>). See also <a href="#Dens3">Dens3</a>, <a href="#Cont3">Cont3</a>, <a href="#Flow">Flow</a>.
</p></dd></dl>

<dl>
<dt><a name="index-Grad-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Grad</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>5</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fgrad_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_grad_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>int</code> num, <code>float</code> zVal)</i></dt>
<dd><p>The function draws gradient lines for scalar field <var>phi</var>[i,j] specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>phi</var>[i,j]} at <var>z</var> = <var>zVal</var>. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. Number of lines is proportional to <var>num</var>. If <var>num</var>&lt;0 then lines start from borders only. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>phi</var> should be equal <code>x.nx=phi.nx &amp;&amp; y.nx=phi.ny</code> or <code>x.nx=y.nx=phi.nx &amp;&amp; x.ny=y.ny=phi.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>phi</var>). Lines are plotted for each z slice of the data. See also <a href="#Dens">Dens</a>, <a href="#Cont">Cont</a>, <a href="#ContF">ContF</a>, <a href="#Flow">Flow</a>. See section <a href="mathgl_en_9.html#Grad-sample">Grad sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Grad-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Grad</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>5</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fgrad"></a><u>C function:</u> <code>void</code> <b>mgl_grad</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch, <code>int</code> num, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Grid"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Grad" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t3D-plotting" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t2D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Grid-1"></a>
<h3 class="subsection">3.10.13 Grid</h3>
<a name="index-Grid-2"></a>

<dl>
<dt><a name="index-Grid-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Grid</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fgrid_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_grid_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The function draws grid lines for density plot of surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} at <var>z</var> = <var>zVal</var>. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Grid is plotted for each z slice of the data. See also <a href="#Dens">Dens</a>, <a href="#Cont">Cont</a>, <a href="#ContF">ContF</a>.
</p></dd></dl>

<dl>
<dt><a name="index-Grid-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Grid</b><i> (<code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fgrid"></a><u>C function:</u> <code>void</code> <b>mgl_grid</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>


<hr size="6">
<a name="g_t3D-plotting"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Grid" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Surf3" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="g_t3D-plotting-1"></a>
<h2 class="section">3.11 3D plotting</h2>

<p>These functions perform plotting of 3D data. 3D means that data depend from 3 independent parameters like matrix <em>f(x_i,y_j,z_k), i=1...n, j=1...m, k=1...l</em>. There are 5 generally different types of data representations: isosurface or surface of constant value (Surf3), density plot at slices (Dens3), contour lines plot at slices (Cont3), solid contours plot at slices (ContF3) and cloud-like plot (Cloud). Surf3, Cont3 and ContF3 functions have variants for automatic and manual selection of level values for surfaces/contours. Also there are functions for plotting data grid lines according to the data format (Grid3) for enhancing density or contour plots. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. See section <a href="mathgl_en_1.html#Color-scheme">Color scheme</a>. See section <a href="mathgl_en_9.html#g_t3D-plot-sample">3D plot sample</a>, for sample code and picture.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Surf3">3.11.1 Surf3</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Dens3">3.11.2 Dens3</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Cont3">3.11.3 Cont3</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#ContF3">3.11.4 ContF3</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Grid3">3.11.5 Grid3</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Cloud">3.11.6 Cloud</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Beam">3.11.7 Beam</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
</table>

<hr size="6">
<a name="Surf3"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#g_t3D-plotting" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dens3" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t3D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Surf3-1"></a>
<h3 class="subsection">3.11.1 Surf3</h3>
<a name="index-Surf3"></a>

<dl>
<dt><a name="index-Surf3-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3</b><i> (<code>float</code> val, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3_005fxyz_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_surf3_xyz_val</b><i> (<code>HMGL</code> gr, <code>float</code> val, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const char *</code>stl)</i></dt>
<dd><p>The function draws isosurface plot for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) at <var>a</var>(x,y,z)=<var>val</var>. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string contain &lsquo;<samp>#</samp>&rsquo; then wire plot is produced. Arrays <var>x</var>, <var>y</var>, <var>z</var> can be vectors (not 3d arrays as <var>a</var>). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also <a href="#Cloud">Cloud</a>, <a href="#Dens3">Dens3</a>, <a href="#Surf3C">Surf3C</a>, <a href="#Surf3A">Surf3A</a>, <a href="#Axial">Axial</a>. See section <a href="mathgl_en_9.html#Surf3-sample">Surf3 sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Surf3-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3</b><i> (<code>float</code> val, <code>const mglData &amp;</code>a, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_surf3_val</b><i> (<code>HMGL</code> gr, <code>float</code> val, <code>const HMDT</code> a, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Surf3-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>int</code> num=<code>3</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_surf3_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const char *</code>stl, <code>int</code> num)</i></dt>
<dd><p>Draws <var>num</var>-th uniformly distributed in range [<var>Cmin</var>, <var>Cmax</var>] isosurfaces for 3d data specified parametrically.
</p></dd></dl>

<dl>
<dt><a name="index-Surf3-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>3</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3"></a><u>C function:</u> <code>void</code> <b>mgl_surf3</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>sch, <code>int</code> num)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Dens3"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Surf3" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Cont3" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t3D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Dens3-1"></a>
<h3 class="subsection">3.11.2 Dens3</h3>
<a name="index-Dens3"></a>
<a name="index-DensA"></a>

<dl>
<dt><a name="index-Dens3-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Dens3</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>stl=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fdens3_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_dens3_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>stl)</i></dt>
<dd><p>The function draws density plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Density is plotted at slice <var>sVal</var> in <var>dir</var>={&lsquo;<samp>x</samp>&rsquo;, &lsquo;<samp>y</samp>&rsquo;, &lsquo;<samp>z</samp>&rsquo;} direction. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string <var>stl</var> have symbol &lsquo;<samp>#</samp>&rsquo; then grid lines are drawn. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> must be equal. Arrays <var>x</var>, <var>y</var>, <var>z</var> can be vectors (not 3d arrays as <var>a</var>). See also <a href="#Cont3">Cont3</a>, <a href="#ContF3">ContF3</a>, <a href="#Dens">Dens</a>, <a href="#Grid3">Grid3</a>. See section <a href="mathgl_en_9.html#Dens3-sample">Dens3 sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Dens3-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Dens3</b><i> (<code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fdens3"></a><u>C function:</u> <code>void</code> <b>mgl_dens3</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-DensA-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>DensA</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fdens3_005fall_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_dens3_all_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const char *</code>stl)</i></dt>
<dd><p>Draws density plots at all central slices of the 3d data specified parametrically.
</p></dd></dl>

<dl>
<dt><a name="index-DensA-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>DensA</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fdens3_005fall"></a><u>C function:</u> <code>void</code> <b>mgl_dens3_all</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Cont3"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Dens3" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#ContF3" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t3D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Cont3-1"></a>
<h3 class="subsection">3.11.3 Cont3</h3>
<a name="index-Cont3"></a>
<a name="index-ContA"></a>

<dl>
<dt><a name="index-Cont3-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Cont3</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>stl=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fcont3_005fxyz_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_cont3_xyz_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>stl)</i></dt>
<dd><p>The function draws contour plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Contours are plotted for values specified in array <var>v</var> at slice <var>sVal</var> in <var>dir</var>={&lsquo;<samp>x</samp>&rsquo;, &lsquo;<samp>y</samp>&rsquo;, &lsquo;<samp>z</samp>&rsquo;} direction. String <var>stl</var> sets the color scheme. Previous color scheme is used by default. If string <var>stl</var> have symbol &lsquo;<samp>#</samp>&rsquo; then grid lines are drawn. If string <var>stl</var> have symbol &lsquo;<samp>t</samp>&rsquo; or &lsquo;<samp>T</samp>&rsquo; then contour labels <var>v</var>[k] will be drawn below (or above) the contours. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> must be equal. Arrays <var>x</var>, <var>y</var>, <var>z</var> can be vectors (not 3d arrays as <var>a</var>). See also <a href="#Dens3">Dens3</a>, <a href="#ContF3">ContF3</a>, <a href="#Cont">Cont</a>, <a href="#Grid3">Grid3</a>. See section <a href="mathgl_en_9.html#Cont3-sample">Cont3 sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Cont3-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Cont3</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fcont3_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_cont3_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Cont3-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Cont3</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcont3_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_cont3_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>stl, <code>int</code> num)</i></dt>
<dd><p>The same as first one with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in range [<var>Cmin</var>, <var>Cmax</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Cont3-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Cont3</b><i> (<code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcont3"></a><u>C function:</u> <code>void</code> <b>mgl_cont3</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>sch, <code>int</code> num)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-ContA-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContA</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcont3_005fall_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_cont3_all_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const char *</code>stl, <code>int</code> num)</i></dt>
<dd><p>Draws contour plots at all central slices of the 3d data specified parametrically.
</p></dd></dl>

<dl>
<dt><a name="index-ContA-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContA</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcont3_005fall"></a><u>C function:</u> <code>void</code> <b>mgl_cont3_all</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>sch, <code>int</code> num)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="ContF3"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Cont3" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Grid3" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t3D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="ContF3-1"></a>
<h3 class="subsection">3.11.4 ContF3</h3>
<a name="index-ContF3"></a>
<a name="index-ContFA"></a>

<dl>
<dt><a name="index-ContF3-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContF3</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>stl=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fcontf3_005fxyz_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_contf3_xyz_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>stl)</i></dt>
<dd><p>The function draws solid (or filled) contour plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Contours are plotted for values specified in array <var>v</var> at slice <var>sVal</var> in <var>dir</var>={&lsquo;<samp>x</samp>&rsquo;, &lsquo;<samp>y</samp>&rsquo;, &lsquo;<samp>z</samp>&rsquo;} direction. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string <var>stl</var> have symbol &lsquo;<samp>#</samp>&rsquo; then grid lines are drawn. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> must be equal. Arrays <var>x</var>, <var>y</var>, <var>z</var> can be vectors (not 3d arrays as <var>a</var>). See also <a href="#Dens3">Dens3</a>, <a href="#Cont3">Cont3</a>, <a href="#ContF">ContF</a>, <a href="#Grid3">Grid3</a>. See section <a href="mathgl_en_9.html#ContF3-sample">ContF3 sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-ContF3-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContF3</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fcontf3_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_contf3_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-ContF3-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContF3</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcontf3_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_contf3_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>stl, <code>int</code> num)</i></dt>
<dd><p>The same as first one with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in range [<var>Cmin</var>, <var>Cmax</var>].
</p></dd></dl>

<dl>
<dt><a name="index-ContF3-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContF3</b><i> (<code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcontf3"></a><u>C function:</u> <code>void</code> <b>mgl_contf3</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>sch, <code>int</code> num)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-ContFA-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContFA</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcontf3_005fall_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_contf3_all_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const char *</code>stl, <code>int</code> num)</i></dt>
<dd><p>Draws contour plots at all central slices of the 3d data specified parametrically.
</p></dd></dl>

<dl>
<dt><a name="index-ContFA-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContFA</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcontf3_005fall"></a><u>C function:</u> <code>void</code> <b>mgl_contf3_all</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>sch, <code>int</code> num)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Grid3"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#ContF3" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Cloud" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t3D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Grid3-1"></a>
<h3 class="subsection">3.11.5 Grid3</h3>
<a name="index-Grid3"></a>
<a name="index-GridA"></a>

<dl>
<dt><a name="index-Grid3-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Grid3</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>stl=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fgrid3_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_grid3_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>stl)</i></dt>
<dd><p>The function draws grid for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). Grid is plotted at slice <var>sVal</var> in <var>dir</var>={&lsquo;<samp>x</samp>&rsquo;, &lsquo;<samp>y</samp>&rsquo;, &lsquo;<samp>z</samp>&rsquo;} direction. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> must be equal. Arrays <var>x</var>, <var>y</var>, <var>z</var> can be vectors (not 3d arrays as <var>a</var>). See also <a href="#Cont3">Cont3</a>, <a href="#ContF3">ContF3</a>, <a href="#Dens3">Dens3</a>, <a href="#Grid">Grid</a>.
</p></dd></dl>

<dl>
<dt><a name="index-Grid3-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Grid3</b><i> (<code>const mglData &amp;</code>a, <code>char</code> dir, <code>int</code> sVal=<code>-1</code>, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fgrid3"></a><u>C function:</u> <code>void</code> <b>mgl_grid3</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>char</code> dir, <code>int</code> sVal, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-GridA-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>GridA</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fgrid3_005fall_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_grid3_all_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const char *</code>stl)</i></dt>
<dd><p>Draws grids at all central slices of the 3d data specified parametrically.
</p></dd></dl>

<dl>
<dt><a name="index-GridA-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>GridA</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fgrid3_005fall"></a><u>C function:</u> <code>void</code> <b>mgl_grid3_all</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Cloud"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Grid3" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Beam" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t3D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Cloud-1"></a>
<h3 class="subsection">3.11.6 Cloud</h3>
<a name="index-CloudP"></a>
<a name="index-CloudQ"></a>

<dl>
<dt><a name="index-Cloud"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Cloud</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> alpha=<code>1</code>)</i></dt>
<dt><a name="index-mgl_005fcloud_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_cloud_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> alpha=<code>1</code>)</i></dt>
<dd><p>The function draws cloud plot for 3d data specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]). This plot is a set of cubes with color and transparency proportional to value of <var>a</var>. The resulting plot is like cloud &ndash; low value is transparent but higher ones are not. The number of plotting cells depend on MeshNum (see section <a href="#Other-settings">Other settings</a>). String <var>sch</var> sets the color scheme. Previous color scheme is used by default. Parameter <var>alpha</var> changes the overall transparency of plot. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> must be equal. Arrays <var>x</var>, <var>y</var>, <var>z</var> can be vectors (not 3d arrays as <var>a</var>). See also <a href="#Surf3">Surf3</a>. See section <a href="mathgl_en_9.html#Cloud-sample">Cloud sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Cloud-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Cloud</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> alpha=<code>1</code>)</i></dt>
<dt><a name="index-mgl_005fcloud"></a><u>C function:</u> <code>void</code> <b>mgl_cloud</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> alpha=<code>1</code>)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-CloudP-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>CloudP</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> alpha=<code>1</code>)</i></dt>
<dt><a name="index-mgl_005fcloudp_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_cloudp_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> alpha=<code>1</code>)</i></dt>
<dd><p>The same as first one but the semi-transparent points are used instead of cubes. See section <a href="mathgl_en_9.html#CloudP-sample">CloudP sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-CloudP-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>CloudP</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> alpha=<code>1</code>)</i></dt>
<dt><a name="index-mgl_005fcloudp"></a><u>C function:</u> <code>void</code> <b>mgl_cloudp</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> alpha=<code>1</code>)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>


<hr size="6">
<a name="Beam"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Cloud" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dual-plotting" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#g_t3D-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Beam-1"></a>
<h3 class="subsection">3.11.7 Beam</h3>
<a name="index-Beam"></a>

<dl>
<dt><a name="index-Beam-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Beam</b><i> (<code>float</code> val, <code>const mglData &amp;</code>tr, <code>const mglData &amp;</code>g1, <code>const mglData &amp;</code>g2, <code>const mglData &amp;</code>a, <code>float</code> r, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>int</code> flag=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fbeam_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_beam_val</b><i> (<code>HMGL</code> gr, <code>float</code> val, <code>const HMDT</code> tr, <code>const HMDT</code> g1, <code>const HMDT</code> g2, <code>const HMDT</code> a, <code>float</code> r, <code>const char *</code>stl, <code>int</code> flag)</i></dt>
<dd><p>Draws the isosurface for 3d array <var>a</var> at constant values of <var>a</var>=<var>val</var>. This is special kind of plot for <var>a</var> specified in accompanied coordinates along curve <var>tr</var> with orts <var>g1</var>, <var>g2</var> and with transverse scale <var>r</var>. Variable <var>flag</var> is bitwise: &lsquo;<samp>0x1</samp>&rsquo; - draw in accompanied (not laboratory) coordinates; &lsquo;<samp>0x2</samp>&rsquo; - draw projection to <em>\rho-z</em> plane; &lsquo;<samp>0x4</samp>&rsquo; - draw normalized in each slice field. The x-size of data arrays <var>tr</var>, <var>g1</var>, <var>g2</var> must be nx&gt;2. The y-size of data arrays <var>tr</var>, <var>g1</var>, <var>g2</var> and z-size of the data array <var>a</var> must be equal. See section <a href="#Surf3">Surf3</a>.
</p></dd></dl>

<dl>
<dt><a name="index-Beam-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Beam</b><i> (<code>const mglData &amp;</code>tr, <code>const mglData &amp;</code>g1, <code>const mglData &amp;</code>g2, <code>const mglData &amp;</code>a, <code>float</code> r, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>int</code> flag=<code>0</code>, <code>int</code> num=<code>3</code>)</i></dt>
<dt><a name="index-mgl_005fbeam"></a><u>C function:</u> <code>void</code> <b>mgl_beam</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> tr, <code>const HMDT</code> g1, <code>const HMDT</code> g2, <code>const HMDT</code> a, <code>float</code> r, <code>const char *</code>stl, <code>int</code> flag=<code>0</code>, <code>int</code> num=<code>3</code>)</i></dt>
<dd><p>Draws <var>num</var>-th uniformly distributed in range [<var>Cmin</var>, <var>Cmax</var>] isosurfaces for 3d data specified parametrically.
</p></dd></dl>



<hr size="6">
<a name="Dual-plotting"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Beam" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SurfC" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Dual-plotting-1"></a>
<h2 class="section">3.12 Dual plotting</h2>

<p>These plotting functions draw <em>two matrix</em> simultaneously. There are 5 generally different types of data representations: surface or isosurface colored by other data (SurfC, Surf3C), surface or isosurface transpared by other data (SurfA, Surf3A), tiles with variable size (TileS), mapping diagram (Map), STFA diagram (STFA). Surf3A and Surf3C have variants for automatic and manual selection of level values for isosurfaces. Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. See section <a href="mathgl_en_1.html#Color-scheme">Color scheme</a>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#SurfC">3.12.1 SurfC</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Surf3C">3.12.2 Surf3C</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#SurfA">3.12.3 SurfA</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Surf3A">3.12.4 Surf3A</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#TileS">3.12.5 TileS</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Map">3.12.6 Map</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#STFA">3.12.7 STFA</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
</table>

<hr size="6">
<a name="SurfC"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Dual-plotting" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Surf3C" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dual-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="SurfC-1"></a>
<h3 class="subsection">3.12.1 SurfC</h3>
<a name="index-SurfC"></a>

<dl>
<dt><a name="index-SurfC-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SurfC</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurfc_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_surfc_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> c, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and color it by matrix <var>c</var>[i,j]. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string <var>sch</var> have symbol &lsquo;<samp>#</samp>&rsquo; then grid lines are drawn. All dimensions of arrays <var>z</var> and <var>c</var> must be equal. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Surface is plotted for each z slice of the data. See also <a href="#Surf">Surf</a>, <a href="#SurfA">SurfA</a>, <a href="#Surf3C">Surf3C</a>. See section <a href="mathgl_en_9.html#SurfC-sample">SurfC sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-SurfC-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SurfC</b><i> (<code>const mglData &amp;</code>z, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurfc"></a><u>C function:</u> <code>void</code> <b>mgl_surfc</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const HMDT</code> c, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>


<hr size="6">
<a name="Surf3C"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SurfC" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SurfA" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dual-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Surf3C-1"></a>
<h3 class="subsection">3.12.2 Surf3C</h3>
<a name="index-Surf3C"></a>

<dl>
<dt><a name="index-Surf3C-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3C</b><i> (<code>float</code> val, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>c, <code>const char *</code>stl=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3c_005fxyz_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_surf3c_xyz_val</b><i> (<code>HMGL</code> gr, <code>float</code> val, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const HMDT</code> c, <code>const char *</code>stl)</i></dt>
<dd><p>The function draws isosurface plot for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) at <var>a</var>(x,y,z)=<var>val</var>. It is mostly the same as Surf3() function but the color of isosurface depends on values of array <var>c</var>. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string contain &lsquo;<samp>#</samp>&rsquo; then wire plot is produced. All dimensions of arrays <var>z</var> and <var>c</var> must be equal. Arrays <var>x</var>, <var>y</var>, <var>z</var> can be vectors (not 3d arrays as <var>a</var>). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also <a href="#Surf3">Surf3</a>, <a href="#SurfC">SurfC</a>, <a href="#Surf3A">Surf3A</a>. See section <a href="mathgl_en_9.html#Surf3C-sample">Surf3C sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Surf3C-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3C</b><i> (<code>float</code> val, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3c_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_surf3c_val</b><i> (<code>HMGL</code> gr, <code>float</code> val, <code>const HMDT</code> a, <code>const HMDT</code> c, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Surf3C-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3C</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>c, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>int</code> num=<code>3</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3c_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_surf3c_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const HMDT</code> c, <code>const char *</code>stl, <code>int</code> num)</i></dt>
<dd><p>Draws <var>num</var>-th uniformly distributed in range [<var>Cmin</var>, <var>Cmax</var>] isosurfaces for 3d data specified parametrically.
</p></dd></dl>

<dl>
<dt><a name="index-Surf3C-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3C</b><i> (<code>const mglData &amp;</code>a, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>3</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3c"></a><u>C function:</u> <code>void</code> <b>mgl_surf3c</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const HMDT</code> c, <code>const char *</code>sch, <code>int</code> num)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>


<hr size="6">
<a name="SurfA"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Surf3C" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Surf3A" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dual-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="SurfA-1"></a>
<h3 class="subsection">3.12.3 SurfA</h3>
<a name="index-SurfA"></a>

<dl>
<dt><a name="index-SurfA-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SurfA</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurfa_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_surfa_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> c, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]} and transparent it by matrix <var>c</var>[i,j]. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string <var>sch</var> have symbol &lsquo;<samp>#</samp>&rsquo; then grid lines are drawn. All dimensions of arrays <var>z</var> and <var>c</var> must be equal. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Surface is plotted for each z slice of the data. See also <a href="#Surf">Surf</a>, <a href="#SurfC">SurfC</a>, <a href="#Surf3A">Surf3A</a>, <a href="#TileS">TileS</a>. See section <a href="mathgl_en_9.html#SurfA-sample">SurfA sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-SurfA-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SurfA</b><i> (<code>const mglData &amp;</code>z, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurfa"></a><u>C function:</u> <code>void</code> <b>mgl_surfa</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const HMDT</code> c, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>


<hr size="6">
<a name="Surf3A"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SurfA" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#TileS" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dual-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Surf3A-1"></a>
<h3 class="subsection">3.12.4 Surf3A</h3>
<a name="index-Surf3A"></a>

<dl>
<dt><a name="index-Surf3A-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3A</b><i> (<code>float</code> val, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>c, <code>const char *</code>stl=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3a_005fxyz_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_surf3a_xyz_val</b><i> (<code>HMGL</code> gr, <code>float</code> val, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const HMDT</code> c, <code>const char *</code>stl)</i></dt>
<dd><p>The function draws isosurface plot for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) at <var>a</var>(x,y,z)=<var>val</var>. It is mostly the same as Surf3() function but the transparency of isosurface depends on values of <var>b</var> array. This allows one to remove the part of isosurface where <var>b</var> is negligibly small (useful for phase plotting of a beam or a pulse). String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string contain &lsquo;<samp>#</samp>&rsquo; then wire plot is produced. All dimensions of arrays <var>z</var> and <var>c</var> must be equal. Arrays <var>x</var>, <var>y</var>, <var>z</var> can be vectors (not 3d arrays as <var>a</var>). Note, that there is possibility of incorrect plotting due to uncertainty of cross-section defining if there are two or more isosurface intersections inside one cell. See also <a href="#Surf3">Surf3</a>, <a href="#SurfA">SurfA</a>, <a href="#Surf3C">Surf3C</a>. See section <a href="mathgl_en_9.html#Surf3A-sample">Surf3A sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Surf3A-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3A</b><i> (<code>float</code> val, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3a_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_surf3a_val</b><i> (<code>HMGL</code> gr, <code>float</code> val, <code>const HMDT</code> a, <code>const HMDT</code> c, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Surf3A-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3A</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>c, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>int</code> num=<code>3</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3a_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_surf3a_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const HMDT</code> c, <code>const char *</code>stl, <code>int</code> num)</i></dt>
<dd><p>Draws <var>num</var>-th uniformly distributed in range [<var>Cmin</var>, <var>Cmax</var>] isosurfaces for 3d data specified parametrically.
</p></dd></dl>

<dl>
<dt><a name="index-Surf3A-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf3A</b><i> (<code>const mglData &amp;</code>a, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>3</code>)</i></dt>
<dt><a name="index-mgl_005fsurf3a"></a><u>C function:</u> <code>void</code> <b>mgl_surf3a</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const HMDT</code> c, <code>const char *</code>sch, <code>int</code> num)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="TileS"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Surf3A" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Map" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dual-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="TileS-1"></a>
<h3 class="subsection">3.12.5 TileS</h3>
<a name="index-TileS"></a>

<dl>
<dt><a name="index-TileS-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TileS</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>r, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftiles_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_tiles_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> r, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws horizontal tiles for surface specified parametrically {<var>x</var>[i,j], <var>y</var>[i,j], <var>z</var>[i,j]}. It is mostly the same as Tile() but the size of tiles is determined by <var>r</var> array. This is some kind of &ldquo;transparency&rdquo; useful for exporting to EPS files. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>z</var> should be equal <code>x.nx=z.nx &amp;&amp; y.nx=z.ny</code> or <code>x.nx=y.nx=z.nx &amp;&amp; x.ny=y.ny=z.ny</code>. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>z</var>). Surface is plotted for each z slice of the data. See also <a href="#SurfA">SurfA</a>, <a href="#Tile">Tile</a>. See section <a href="mathgl_en_9.html#TileS-sample">TileS sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-TileS-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TileS</b><i> (<code>const mglData &amp;</code>z, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftiles"></a><u>C function:</u> <code>void</code> <b>mgl_tiles</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> z, <code>const HMDT</code> c, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Map"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#TileS" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#STFA" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dual-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Map-1"></a>
<h3 class="subsection">3.12.6 Map</h3>
<a name="index-Map"></a>

<dl>
<dt><a name="index-Map-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Map</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> ks=<code>0</code>, <code>bool</code> pnts=<code>true</code>)</i></dt>
<dt><a name="index-mgl_005fmap_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_map_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>int</code> ks, <code>int</code> pnts)</i></dt>
<dd><p>The function draws mapping plot for matrices {<var>ax</var>, <var>ay</var> } which parametrically depend on coordinates <var>x</var>, <var>y</var>. The initial position of the cell (point) is marked by color. Height is proportional to Jacobian(ax,ay). This plot is like Arnold diagram ???. If <code>pnts=false</code> then face is drawn otherwise the color ball at matrix knots are drawn. Parameter <var>ks</var> specifies the slice of matrices which will be used. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. The size of <var>ax</var> and <var>ay</var> must be the same. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>ax</var> should be equal. Arrays <var>x</var>, <var>y</var> can be vectors (not matrix as <var>ax</var>). See section <a href="mathgl_en_1.html#Color-scheme">Color scheme</a>. See section <a href="mathgl_en_9.html#Map-sample">Map sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Map-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Map</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> ks=<code>0</code>, <code>bool</code> pnts=<code>true</code>)</i></dt>
<dt><a name="index-mgl_005fmap"></a><u>C function:</u> <code>void</code> <b>mgl_map</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>int</code> ks, <code>int</code> pnts)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="STFA"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Map" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Vector-fields" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dual-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="STFA-1"></a>
<h3 class="subsection">3.12.7 STFA</h3>
<a name="index-STFA"></a>

<dl>
<dt><a name="index-STFA-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>STFA</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>re, <code>const mglData &amp;</code>im, <code>int</code> dn, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fstfa_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_stfa_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> re, <code>const HMDT</code> im, <code>int</code> dn, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>Draws spectrogram of complex array <var>re</var>+i*<code>im</code> for Fourier size of <var>dn</var> points at plane <var>z=zVal</var>. Parameter <var>dn</var> is arbitrary even integer. For example in 1D case, result is density plot of data <em>res[i,j]=|\sum_d^dn exp(I*j*d)*(re[i*dn+d]+I*im[i*dn+d])|/dn</em> with size {int(nx/dn), dn, ny}. At this array <var>re</var>, <var>im</var> parametrically depend on coordinates <var>x</var>, <var>y</var>. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. The size of <var>re</var> and <var>im</var> must be the same. The minor dimensions of arrays <var>x</var>, <var>y</var>, <var>re</var> should be equal. Arrays <var>x</var>, <var>y</var> can be vectors (not matrix as <var>re</var>).  See section <a href="mathgl_en_9.html#STFA-sample">STFA sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-STFA-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>STFA</b><i> (<code>const mglData &amp;</code>re, <code>const mglData &amp;</code>im, <code>int</code> dn, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fstfa"></a><u>C function:</u> <code>void</code> <b>mgl_stfa</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> re, <code>const HMDT</code> im, <code>int</code> dn, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>


<hr size="6">
<a name="Vector-fields"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#STFA" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Traj" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Vector-fields-1"></a>
<h2 class="section">3.13 Vector fields</h2>

<p>These functions perform plotting of 2D and 3D vector fields. There are 5 generally different types of vector fields representations: simple vector field (Vect), vectors along the curve (Traj), vector field by dew-drops (Dew), flow threads (Flow, FlowP), flow pipes (Pipe). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. See section <a href="mathgl_en_1.html#Color-scheme">Color scheme</a>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#Traj">3.13.1 Traj</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Vect">3.13.2 Vect</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#VectL">3.13.3 VectL</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#VectC">3.13.4 VectC</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Dew">3.13.5 Dew</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Flow">3.13.6 Flow</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#FlowP">3.13.7 FlowP</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Pipe">3.13.8 Pipe</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
</table>

<hr size="6">
<a name="Traj"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Vector-fields" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Vect" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Vector-fields" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Traj-1"></a>
<h3 class="subsection">3.13.1 Traj</h3>
<a name="index-Traj"></a>

<dl>
<dt><a name="index-Traj-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Traj</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> len=<code>0</code>)</i></dt>
<dt><a name="index-Traj-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Traj</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>, <code>float</code> len=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005ftraj_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_traj_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code>x, <code>const HMDT</code>y, <code>const HMDT</code>z, <code>const HMDT</code>ax, <code>const HMDT</code>ay, <code>const HMDT</code>az, <code>const char *</code>sch, <code>float</code> len)</i></dt>
<dt><a name="index-mgl_005ftraj_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_traj_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code>x, <code>const HMDT</code>y, <code>const HMDT</code>ax, <code>const HMDT</code>ay, <code>const char *</code>sch, <code>float</code> zVal, <code>float</code> len)</i></dt>
<dd><p>The function draws vectors {<var>ax</var>, <var>ay</var>, <var>az</var>} along a curve {<var>x</var>, <var>y</var>, <var>z</var>}. The length of arrows are proportional to <em>\sqrtax^2+ay^2+az^2</em>. String <var>pen</var> specifies the color (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>). By default (<code>pen=&quot;&quot;</code>) color from palette is used (see section <a href="#Palette-and-colors">Pallete and colors</a>). Parameter <var>len</var> set the vector length factor (if non-zero) or vector length to be proportional the distance between curve points (if <var>len</var>=0). The minor sizes of all arrays must be equal and large 2. The plots are drawn for each row if one of the data is the matrix. See also <a href="#Vect">Vect</a>. See section <a href="mathgl_en_9.html#Traj-sample">Traj sample</a>, for sample code and picture.
</p></dd></dl>

<hr size="6">
<a name="Vect"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Traj" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#VectL" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Vector-fields" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Vect-1"></a>
<h3 class="subsection">3.13.2 Vect</h3>
<a name="index-Vect"></a>

<dl>
<dt><a name="index-Vect-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Vect</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>, <code>int</code> flag=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fvect_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_vect_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>float</code> zVal, <code>int</code> flag)</i></dt>
<dd><p>The function draws plane vector field plot for the field {<var>ax</var>, <var>ay</var>} depending parametrically on coordinates <var>x</var>, <var>y</var> at level <var>z=zVal</var>. The length and color of arrows are proportional to <em>\sqrtax^2+ay^2</em>. The number of arrows depend on <var>MeshNum</var> (see section <a href="#Other-settings">Other settings</a>). The color is specified by the string argument <var>sch</var>. Previous color scheme is used by default. Parameter <var>flag</var> is bitwise flag for setup the hachures (arrows): <code>MGL_VEC_COL</code> for drawing bi-color arrow, <code>MGL_VEC_LEN</code> for drawing fixed length arrows, <code>MGL_VEC_DOT</code> for drawing hachures with dots instead of arrows, <code>MGL_VEC_END</code> for drawing arrows to the cell point, <code>MGL_VEC_MID</code> for drawing arrows with center at cell point. The size of <var>ax</var> and <var>ay</var> must be equal. The minor dimensions of arrays <var>x</var>, <var>y</var> and <var>ax</var> must be equal too. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>ax</var>). The vector field is plotted for each z slice of <var>ax</var>, <var>ay</var>. See also <a href="#VectL">VectL</a>, <a href="#VectC">VectC</a>, <a href="#Flow">Flow</a>, <a href="#Dew">Dew</a>. See section <a href="mathgl_en_9.html#Vect-sample">Vect sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Vect-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Vect</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>, <code>int</code> flag=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fvect_005f2d"></a><u>C function:</u> <code>void</code> <b>mgl_vect_2d</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>float</code> zVal, <code>int</code> flag)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Vect-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Vect</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> flag=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fvect_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_vect_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch, <code>int</code> flag)</i></dt>
<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the length and color of arrows is proportional to <em>\sqrtax^2+ay^2+az^2</em>. See section <a href="mathgl_en_9.html#Vect-3D-sample">Vect 3D sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Vect-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Vect</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> flag=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fvect_005f3d"></a><u>C function:</u> <code>void</code> <b>mgl_vect_3d</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch, <code>int</code> flag)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="VectL"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Vect" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#VectC" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Vector-fields" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="VectL-1"></a>
<h3 class="subsection">3.13.3 VectL</h3>
<a name="index-VectL"></a>

<p>These functions are obsolete &ndash; use Vect() functions instead.
</p>
<dl>
<dt><a name="index-VectL-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>VectL</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fvectl_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_vectl_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The function draws plane vector field plot for the field {<var>ax</var>, <var>ay</var>} depending parametrically on coordinates <var>x</var>, <var>y</var> at level <var>z=zVal</var>. The length of hachures is proportional to <em>\sqrtax^2+ay^2</em>. The number of hachures depend on <var>MeshNum</var> (see section <a href="#Other-settings">Other settings</a>). Points are denote the start of hachures. The color is specified by the string argument <var>sch</var>. Previous color scheme is used by default. The size of <var>ax</var> and <var>ay</var> must be equal. The minor dimensions of arrays <var>x</var>, <var>y</var> and <var>ax</var> must be equal too. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>ax</var>). The vector field is plotted for each z slice of <var>ax</var>, <var>ay</var>. See also <a href="#Vect">Vect</a>, <a href="#VectC">VectC</a>, <a href="#Flow">Flow</a>, <a href="#Dew">Dew</a>. See section <a href="mathgl_en_9.html#VectL-sample">VectL sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-VectL-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>VectL</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fvectl_005f2d"></a><u>C function:</u> <code>void</code> <b>mgl_vectl_2d</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-VectL-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>VectL</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fvectl_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_vectl_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch)</i></dt>
<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the length of hachures is proportional to <em>\sqrtax^2+ay^2+az^2</em>. See section <a href="mathgl_en_9.html#VectL-3D-sample">VectL 3D sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-VectL-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>VectL</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fvectl_005f3d"></a><u>C function:</u> <code>void</code> <b>mgl_vectl_3d</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="VectC"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#VectL" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dew" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Vector-fields" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="VectC-1"></a>
<h3 class="subsection">3.13.4 VectC</h3>
<a name="index-VectC"></a>

<p>These functions are obsolete &ndash; use Vect() functions instead.
</p>
<dl>
<dt><a name="index-VectC-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>VectC</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fvectc_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_vectc_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The function draws plane vector field plot for the field {<var>ax</var>, <var>ay</var>} depending parametrically on coordinates <var>x</var>, <var>y</var> at level <var>z=zVal</var>. The color of hachures is proportional to <em>\sqrtax^2+ay^2</em>. The number of hachures depend on <var>MeshNum</var> (see section <a href="#Other-settings">Other settings</a>). Points are denote the start of hachures. The color is specified by the string argument <var>sch</var>. Previous color scheme is used by default. The size of <var>ax</var> and <var>ay</var> must be equal. The minor dimensions of arrays <var>x</var>, <var>y</var> and <var>ax</var> must be equal too. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>ax</var>). The vector field is plotted for each z slice of <var>ax</var>, <var>ay</var>. See also <a href="#Vect">Vect</a>, <a href="#VectL">VectL</a>, <a href="#Flow">Flow</a>, <a href="#Dew">Dew</a>. See section <a href="mathgl_en_9.html#VectC-sample">VectC sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-VectC-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>VectC</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fvectc_005f2d"></a><u>C function:</u> <code>void</code> <b>mgl_vectc_2d</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-VectC-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>VectC</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fvectc_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_vectc_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch)</i></dt>
<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the color of hachures is proportional to <em>\sqrtax^2+ay^2+az^2</em>. See section <a href="mathgl_en_9.html#VectC-3D-sample">VectC 3D sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-VectC-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>VectC</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fvectc_005f3d"></a><u>C function:</u> <code>void</code> <b>mgl_vectc_3d</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Dew"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#VectC" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Flow" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Vector-fields" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Dew-1"></a>
<h3 class="subsection">3.13.5 Dew</h3>
<a name="index-Dew"></a>

<dl>
<dt><a name="index-Dew-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Dew</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fdew_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_dew_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The function draws dew-drops for plane vector field {<var>ax</var>, <var>ay</var>} depending parametrically on coordinates <var>x</var>, <var>y</var> at level <var>z=zVal</var>. Note that this is very expensive plot in memory usage and creation time! The color of drops is proportional to <em>\sqrtax^2+ay^2</em>. The number of drops depend on <var>MeshNum</var> (see section <a href="#Other-settings">Other settings</a>). The color is specified by the string argument <var>sch</var>. Previous color scheme is used by default. The size of <var>ax</var> and <var>ay</var> must be equal. The minor dimensions of arrays <var>x</var>, <var>y</var> and <var>ax</var> must be equal too. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>ax</var>). The vector field is plotted for each z slice of <var>ax</var>, <var>ay</var>. See also <a href="#Vect">Vect</a>, <a href="#VectC">VectC</a>. See section <a href="mathgl_en_9.html#Dew-sample">Dew sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Dew-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Dew</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fdew"></a><u>C function:</u> <code>void</code> <b>mgl_dew</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="Flow"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Dew" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#FlowP" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Vector-fields" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Flow-1"></a>
<h3 class="subsection">3.13.6 Flow</h3>
<a name="index-Flow"></a>

<dl>
<dt><a name="index-Flow-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Flow</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>5</code>, <code>bool</code> central=<code>true</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fflow_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_flow_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>int</code> num, <code>int</code> central, <code>float</code> zVal)</i></dt>
<dd><p>The function draws flow threads for the plane vector field {<var>ax</var>, <var>ay</var>} parametrically depending on coordinates <var>x</var>, <var>y</var> at level z = <var>zVal</var>. Number of threads is proportional to <var>num</var>. Parameter <var>central</var> sets the thread start from center (if true) or only from edges (if false). From v.1.11 it is ignored and always equal to (<var>num</var>&gt;0). The color of lines is proportional to <em>\sqrtax^2+ay^2</em>. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String <var>sch</var> sets the color scheme. Previous color scheme is used by default. The size of <var>ax</var> and <var>ay</var> must be equal. The minor dimensions of arrays <var>x</var>, <var>y</var> and <var>ax</var> must be equal too. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>ax</var>). The vector field is plotted for each z slice of <var>ax</var>, <var>ay</var>. See also <a href="#Pipe">Pipe</a>, <a href="#VectC">VectC</a>, <a href="#Vect">Vect</a>. See section <a href="mathgl_en_9.html#Flow-sample">Flow sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Flow-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Flow</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>5</code>, <code>bool</code> central=<code>true</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fflow_005f2d"></a><u>C function:</u> <code>void</code> <b>mgl_flow_2d</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>int</code> num, <code>int</code> central, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Flow-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Flow</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>3</code>, <code>bool</code> central=<code>true</code>)</i></dt>
<dt><a name="index-mgl_005fflow_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_flow_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch, <code>int</code> num, <code>int</code> central)</i></dt>
<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the color of line is proportional to <em>\sqrtax^2+ay^2+az^2</em>. See section <a href="mathgl_en_9.html#Flow-3D-sample">Flow 3D sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Flow-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Flow</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>int</code> num=<code>3</code>, <code>bool</code> central=<code>true</code>)</i></dt>
<dt><a name="index-mgl_005fflow_005f3d"></a><u>C function:</u> <code>void</code> <b>mgl_flow_3d</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch, <code>int</code> num, <code>int</code> central)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<hr size="6">
<a name="FlowP"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Flow" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Pipe" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Vector-fields" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="FlowP-1"></a>
<h3 class="subsection">3.13.7 FlowP</h3>
<a name="index-FlowP"></a>

<dl>
<dt><a name="index-FlowP-1"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>FlowP</b><i> (<code>mglPoint</code> p0, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-FlowP-2"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>FlowP</b><i> (<code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fflowp_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_flowp_xy</b><i> (<code>HMGL</code> gr, <code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws flow thread for the plane vector field {<var>ax</var>, <var>ay</var>} parametrically depending on coordinates <var>x</var>, <var>y</var> from point <var>p0</var> at level z = <var>p0</var>.z. The color of lines is proportional to <em>\sqrtax^2+ay^2</em>. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String <var>sch</var> sets the color scheme. Previous color scheme is used by default. The size of <var>ax</var> and <var>ay</var> must be equal. The minor dimensions of arrays <var>x</var>, <var>y</var> and <var>ax</var> must be equal too. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>ax</var>). The vector field is plotted for each z slice of <var>ax</var>, <var>ay</var>. See also <a href="#Pipe">Pipe</a>, <a href="#VectC">VectC</a>, <a href="#Vect">Vect</a>.
</p></dd></dl>

<dl>
<dt><a name="index-FlowP-3"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>FlowP</b><i> (<code>mglPoint</code> p0, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-FlowP-4"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>FlowP</b><i> (<code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fflowp_005f2d"></a><u>C function:</u> <code>void</code> <b>mgl_flowp_2d</b><i> (<code>HMGL</code> gr, <code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-FlowP-5"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>FlowP</b><i> (<code>mglPoint</code> p0, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-FlowP-6"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>FlowP</b><i> (<code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fflowp_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_flowp_xyz</b><i> (<code>HMGL</code> gr, <code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch)</i></dt>
<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the color of line is proportional to <em>\sqrtax^2+ay^2+az^2</em>. See section <a href="mathgl_en_9.html#Flow-3D-sample">Flow 3D sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-FlowP-7"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>FlowP</b><i> (<code>mglPoint</code> p0, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-FlowP-8"></a><u>Method on <code>mglGraph</code> (Python):</u> <code>void</code> <b>FlowP</b><i> (<code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fflowp_005f3d"></a><u>C function:</u> <code>void</code> <b>mgl_flowp_3d</b><i> (<code>HMGL</code> gr, <code>float</code> x0, <code>float</code> y0, <code>float</code> z0, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>


<hr size="6">
<a name="Pipe"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#FlowP" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-plotting" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Vector-fields" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Pipe-1"></a>
<h3 class="subsection">3.13.8 Pipe</h3>
<a name="index-Pipe"></a>

<dl>
<dt><a name="index-Pipe-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Pipe</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> r0=<code>0.05</code>, <code>int</code> num=<code>5</code>, <code>bool</code> central=<code>true</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fpipe_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_pipe_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>float</code> r0, <code>int</code> num, <code>int</code> central, <code>float</code> zVal)</i></dt>
<dd><p>The function draws flow pipes for the plane vector field {<var>ax</var>, <var>ay</var>} parametrically depending on coordinates <var>x</var>, <var>y</var> at level z = <var>zVal</var>. Number of pipes is proportional to <var>num</var>. Parameter <var>central</var> sets the pipe start from center (if true) or only from edges (if false). From v.1.11 it is ignored and always equal to (<var>num</var>&gt;0). The color of lines is proportional to <em>\sqrtax^2+ay^2</em>. Warm color corresponds to normal flow (like attractor). Cold one corresponds to inverse flow (like source). String <var>sch</var> sets the color scheme. Previous color scheme is used by default. Parameter <var>r0</var> set the base pipe radius. If <var>r0</var>&lt;0 then pipe radius is inverse proportional to amplitude. The size of <var>ax</var> and <var>ay</var> must be equal. The minor dimensions of arrays <var>x</var>, <var>y</var> and <var>ax</var> must be equal too. Arrays <var>x</var> and <var>y</var> can be vectors (not matrices as <var>ax</var>). The vector field is plotted for each z slice of <var>ax</var>, <var>ay</var>. See also <a href="#Flow">Flow</a>, <a href="#VectC">VectC</a>, <a href="#Vect">Vect</a>. See section <a href="mathgl_en_9.html#Pipe-sample">Pipe sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Pipe-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Pipe</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> r0=<code>0.05</code>, <code>int</code> num=<code>5</code>, <code>bool</code> central=<code>true</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fpipe_005f2d"></a><u>C function:</u> <code>void</code> <b>mgl_pipe_2d</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const char *</code>sch, <code>float</code> r0, <code>int</code> num, <code>int</code> central, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Pipe-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Pipe</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> r0=<code>0.05</code>, <code>int</code> num=<code>3</code>, <code>bool</code> central=<code>true</code>)</i></dt>
<dt><a name="index-mgl_005fpipe_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_pipe_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch, <code>float</code> r0, <code>int</code> num, <code>int</code> central)</i></dt>
<dd><p>This is 3D version of the first functions. Here arrays <var>ax</var>, <var>ay</var>, <var>az</var> must be 3-ranged tensors with equal sizes and the color of line is proportional to <em>\sqrtax^2+ay^2+az^2</em>. See section <a href="mathgl_en_9.html#Pipe-3D-sample">Pipe 3D sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Pipe-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Pipe</b><i> (<code>const mglData &amp;</code>ax, <code>const mglData &amp;</code>ay, <code>const mglData &amp;</code>az, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> r0=<code>0.05</code>, <code>int</code> num=<code>3</code>, <code>bool</code> central=<code>true</code>)</i></dt>
<dt><a name="index-mgl_005fpipe_005f3d"></a><u>C function:</u> <code>void</code> <b>mgl_pipe_3d</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> ax, <code>const HMDT</code> ay, <code>const HMDT</code> az, <code>const char *</code>sch, <code>float</code> r0, <code>int</code> num, <code>int</code> central)</i></dt>
<dd><p>The same as previous with <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>


<hr size="6">
<a name="Other-plotting"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Pipe" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#DensXYZ" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Other-plotting-1"></a>
<h2 class="section">3.14 Other plotting</h2>

<p>These functions perform miscelaneous plotting. There is unstructured data points plots (Dots), surface reconstruction (Crust), surfaces on the triangular mesh (TriPlot), textual formula plotting (Plots by formula), data plots at edges (Dens[XYZ], Cont[XYZ], ContF[XYZ]), simple plot (SimplePlot). Each type of plotting has similar interface. There are 2 kind of versions which handle the arrays of data and coordinates or only single data array. Parameters of color scheme are specified by the string argument. See section <a href="mathgl_en_1.html#Color-scheme">Color scheme</a>.
</p>
<table class="menu" border="0" cellspacing="0">
<tr><td align="left" valign="top"><a href="#DensXYZ">3.14.1 DensXYZ</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#ContXYZ">3.14.2 ContXYZ</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#ContFXYZ">3.14.3 ContFXYZ</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Dots">3.14.4 Dots</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Crust">3.14.5 Crust</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#TriPlot">3.14.6 TriPlot</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#TriCont">3.14.7 TriCont</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#QuadPlot">3.14.8 QuadPlot</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#Plots-by-formula">3.14.9 Plots by formula</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
<tr><td align="left" valign="top"><a href="#SimplePlot">3.14.10 SimplePlot</a></td><td>&nbsp;&nbsp;</td><td align="left" valign="top"> 
</td></tr>
</table>

<hr size="6">
<a name="DensXYZ"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Other-plotting" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#ContXYZ" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="DensXYZ-1"></a>
<h3 class="subsection">3.14.1 DensXYZ</h3>
<a name="index-DensX"></a>
<a name="index-DensY"></a>
<a name="index-DensZ"></a>

<p>These plotting functions draw density plot in x, y, or z plain. If <var>a</var> is a tensor (3-dimensional data) then interpolation to a given <var>sVal</var> is performed. These functions are useful for creating projections of the 3D data array to the bounding box. For example, code like
</p><table><tr><td>&nbsp;</td><td><pre class="example">gr-&gt;DensX(c.Sum(&quot;x&quot;),&quot;BbcyrR&quot;,-1);
gr-&gt;DensY(c.Sum(&quot;y&quot;),0,1);
gr-&gt;DensZ(c.Sum(&quot;z&quot;),0,-1);
</pre></td></tr></table>
<p>will produce the following picture. See also <a href="#ContXYZ">ContXYZ</a>, <a href="#ContFXYZ">ContFXYZ</a>, <a href="#Dens">Dens</a>, <a href="#Data-distributions">Data distributions</a>. See section <a href="mathgl_en_9.html#Dens-projection-sample">Dens projection sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-DensX-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>DensX</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fdens_005fx"></a><u>C function:</u> <code>void</code> <b>mgl_dens_x</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal)</i></dt>
<dd><p>Draws density plot for data <var>a</var> at x = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-DensY-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>DensY</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fdens_005fy"></a><u>C function:</u> <code>void</code> <b>mgl_dens_y</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal)</i></dt>
<dd><p>Draws density plot for data <var>a</var> at y = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-DensZ-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>DensZ</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fdens_005fz"></a><u>C function:</u> <code>void</code> <b>mgl_dens_z</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal)</i></dt>
<dd><p>Draws density plot for data <var>a</var> at z = <var>sVal</var>.
</p></dd></dl>

<hr size="6">
<a name="ContXYZ"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#DensXYZ" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#ContFXYZ" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="ContXYZ-1"></a>
<h3 class="subsection">3.14.2 ContXYZ</h3>
<a name="index-ContX"></a>
<a name="index-ContY"></a>
<a name="index-ContZ"></a>

<p>These plotting functions draw contour lines in x, y, or z plain. If <var>a</var> is a tensor (3-dimensional data) then interpolation to a given <var>sVal</var> is performed. These functions are useful for creating projections of the 3D data array to the bounding box. For example, code like
</p><table><tr><td>&nbsp;</td><td><pre class="example">gr-&gt;ContX(c.Sum(&quot;x&quot;),&quot;BbcyrR&quot;,-1);
gr-&gt;ContY(c.Sum(&quot;y&quot;),0,1);
gr-&gt;ContZ(c.Sum(&quot;z&quot;),0,-1);
</pre></td></tr></table>
<p>will produce the following picture. See also <a href="#ContFXYZ">ContFXYZ</a>, <a href="#DensXYZ">DensXYZ</a>, <a href="#Cont">Cont</a>, <a href="#Data-distributions">Data distributions</a>. See section <a href="mathgl_en_9.html#Cont-projection-sample">Cont projection sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-ContX-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContX</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcont_005fx"></a><u>C function:</u> <code>void</code> <b>mgl_cont_x</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal, <code>int</code> num)</i></dt>
<dd><p>Draws <var>num</var>-th contour lines for data <var>a</var> at x = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-ContY-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContY</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcont_005fy"></a><u>C function:</u> <code>void</code> <b>mgl_cont_y</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal, <code>int</code> num)</i></dt>
<dd><p>Draws <var>num</var>-th contour lines for data <var>a</var> at y = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-ContZ-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContZ</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcont_005fz"></a><u>C function:</u> <code>void</code> <b>mgl_cont_z</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal, <code>int</code> num)</i></dt>
<dd><p>Draws <var>num</var>-th contour lines for data <var>a</var> at z = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-ContX-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContX</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcont_005fx_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_cont_x_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal)</i></dt>
<dd><p>Draws contour lines for data <var>a</var>=<var>v</var>[i] at x = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-ContY-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContY</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcont_005fy_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_cont_y_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal)</i></dt>
<dd><p>Draws contour lines for data <var>a</var>=<var>v</var>[i] at y = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-ContZ-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContZ</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcont_005fz_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_cont_z_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal)</i></dt>
<dd><p>Draws contour lines for data <var>a</var>=<var>v</var>[i] at z = <var>sVal</var>.
</p></dd></dl>

<hr size="6">
<a name="ContFXYZ"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#ContXYZ" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Dots" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="ContFXYZ-1"></a>
<h3 class="subsection">3.14.3 ContFXYZ</h3>
<a name="index-ContFX"></a>
<a name="index-ContFY"></a>
<a name="index-ContFZ"></a>

<p>These plotting functions draw solid contour lines in x, y, or z plain. If <var>a</var> is a tensor (3-dimensional data) then interpolation to a given <var>sVal</var> is performed. These functions are useful for creating projections of the 3D data array to the bounding box. See also <a href="#ContXYZ">ContXYZ</a>, <a href="#DensXYZ">DensXYZ</a>, <a href="#ContF">ContF</a>, <a href="#Data-distributions">Data distributions</a>.
</p>
<dl>
<dt><a name="index-ContFX-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContFX</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcontf_005fx"></a><u>C function:</u> <code>void</code> <b>mgl_contf_x</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal, <code>int</code> num)</i></dt>
<dd><p>Draws <var>num</var>-th solid contours for data <var>a</var> at x = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-ContFY-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContFY</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcontf_005fy"></a><u>C function:</u> <code>void</code> <b>mgl_contf_y</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal, <code>int</code> num)</i></dt>
<dd><p>Draws <var>num</var>-th solid contours for data <var>a</var> at y = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-ContFZ-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContFZ</b><i> (<code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>, <code>int</code> num=<code>7</code>)</i></dt>
<dt><a name="index-mgl_005fcontf_005fz"></a><u>C function:</u> <code>void</code> <b>mgl_contf_z</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal, <code>int</code> num)</i></dt>
<dd><p>Draws <var>num</var>-th solid contours for data <var>a</var> at z = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-ContFX-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContFX</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcontf_005fx_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_contf_x_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal)</i></dt>
<dd><p>Draws solid contours for data <var>a</var>=<var>v</var>[i] at x = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-ContFY-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContFY</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcontf_005fy_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_contf_y_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal)</i></dt>
<dd><p>Draws solid contours for data <var>a</var>=<var>v</var>[i] at y = <var>sVal</var>.
</p></dd></dl>

<dl>
<dt><a name="index-ContFZ-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ContFZ</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>a, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> sVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fcontf_005fz_005fval"></a><u>C function:</u> <code>void</code> <b>mgl_contf_z_val</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> a, <code>const char *</code>stl, <code>float</code> sVal)</i></dt>
<dd><p>Draws solid contours for data <var>a</var>=<var>v</var>[i] at z = <var>sVal</var>.
</p></dd></dl>

<hr size="6">
<a name="Dots"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#ContFXYZ" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Crust" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Dots-1"></a>
<h3 class="subsection">3.14.4 Dots</h3>
<a name="index-Dots"></a>

<dl>
<dt><a name="index-Dots-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Dots</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-Dots-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Dots</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fdots"></a><u>C function:</u> <code>void</code> <b>mgl_dots</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dt><a name="index-mgl_005fdots_005fa"></a><u>C function:</u> <code>void</code> <b>mgl_dots_a</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws the arbitrary placed points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If array <var>a</var> is specified then it define the transparency of dots. Arrays <var>x</var>, <var>y</var>, <var>z</var>, <var>a</var> must have equal sizes. See also <a href="#Crust">Crust</a>, <a href="#Mark">Mark</a>, <a href="#Plot">Plot</a>. See section <a href="mathgl_en_9.html#Dots-sample">Dots sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Dots-3"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Dots</b><i> (<code>const mglData &amp;</code>tr, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fdots_005ftr"></a><u>C function:</u> <code>void</code> <b>mgl_dots_tr</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> tr, <code>const char *</code>sch)</i></dt>
<dd><p>The same as previous with <var>x=tr</var>(0,:), <var>y=tr</var>(1,:), <var>z=tr</var>(2,:) and if <var>tr</var>.nx&gt;3 then <var>a=tr</var>(3,:).
</p></dd></dl>

<hr size="6">
<a name="Crust"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Dots" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#TriPlot" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Crust-1"></a>
<h3 class="subsection">3.14.5 Crust</h3>
<a name="index-Crust"></a>

<dl>
<dt><a name="index-Crust-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Crust</b><i> (<code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> er=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fcrust"></a><u>C function:</u> <code>void</code> <b>mgl_crust</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> er)</i></dt>
<dd><p>The function reconstruct and draws the surface for arbitrary placed points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Parameter <var>er</var> set relative radius for (increase it for removing holes). String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string contain &lsquo;<samp>#</samp>&rsquo; then wire plot is produced. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. See also <a href="#Dots">Dots</a>, <a href="#TriPlot">TriPlot</a>. See section <a href="mathgl_en_9.html#Crust-sample">Crust sample</a>, for sample code and picture.
</p></dd></dl>

<dl>
<dt><a name="index-Crust-2"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Crust</b><i> (<code>const mglData &amp;</code>tr, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> er=<code>0</code>)</i></dt>
<dt><a name="index-mgl_005fcrust_005ftr"></a><u>C function:</u> <code>void</code> <b>mgl_crust_tr</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> tr, <code>const char *</code>sch, <code>float</code> er)</i></dt>
<dd><p>The same as previous with <var>x=tr</var>(0,:), <var>y=tr</var>(1,:), <var>z=tr</var>(2,:).
</p></dd></dl>

<hr size="6">
<a name="TriPlot"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Crust" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#TriCont" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="TriPlot-1"></a>
<h3 class="subsection">3.14.6 TriPlot</h3>
<a name="index-TriPlot"></a>

<dl>
<dt><a name="index-TriPlot-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TriPlot</b><i> (<code>const mglData &amp;</code>id, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-TriPlot-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TriPlot</b><i> (<code>const mglData &amp;</code>id, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005ftriplot_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_triplot_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> id, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dt><a name="index-mgl_005ftriplot_005fxyzc"></a><u>C function:</u> <code>void</code> <b>mgl_triplot_xyzc</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> id, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> c, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws the surface of triangles. Triangle vertexes are set by indexes <var>id</var> of data points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string contain &lsquo;<samp>#</samp>&rsquo; then wire plot is produced. First dimensions of <var>id</var> must be 3 or greater. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. Parameter <var>c</var> set the colors of triangles (if <var>id</var>.ny=<var>c</var>.nx) or colors of vertexes (if <var>x</var>.nx=<var>c</var>.nx). See also <a href="#Dots">Dots</a>, <a href="#Crust">Crust</a>, <a href="#QuadPlot">QuadPlot</a>.
</p></dd></dl>

<dl>
<dt><a name="index-TriPlot-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TriPlot</b><i> (<code>const mglData &amp;</code>id, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005ftriplot_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_triplot_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> id, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>z</var>[i]=<var>zVal</var>.
</p></dd></dl>

<hr size="6">
<a name="TriCont"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#TriPlot" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#QuadPlot" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="TriCont-1"></a>
<h3 class="subsection">3.14.7 TriCont</h3>
<a name="index-TriCont"></a>

<dl>
<dt><a name="index-TriContV"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TriContV</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>id, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-TriContV-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TriContV</b><i> (<code>const mglData &amp;</code>v, <code>const mglData &amp;</code>id, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005ftricont_005fxyzcv"></a><u>C function:</u> <code>void</code> <b>mgl_tricont_xyzcv</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> id, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> c, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dt><a name="index-mgl_005ftricont_005fxyzv"></a><u>C function:</u> <code>void</code> <b>mgl_tricont_xyzv</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> v, <code>const HMDT</code> id, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The function draws contour lines for surface of triangles at <var>z</var> = <var>zVal</var> (or for <var>z=v</var>[k] if <code>zVal==NAN</code>). Triangle vertexes are set by indexes <var>id</var> of data points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. Contours are plotted for <var>z</var>[i,j]=<var>v</var>[k] where <var>v</var>[k] are values of data array <var>v</var>. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. Array <var>c</var> (if specified) is used for contour coloring. First dimensions of <var>id</var> must be 3 or greater. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. Parameter <var>c</var> set the colors of triangles (if <var>id</var>.ny=<var>c</var>.nx) or colors of vertexes (if <var>x</var>.nx=<var>c</var>.nx). See also <a href="#TriPlot">TriPlot</a>, <a href="#Cont">Cont</a>.
</p></dd></dl>

<dl>
<dt><a name="index-TriCont-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TriCont</b><i> (<code>const mglData &amp;</code>id, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>num</code>=<code>7</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-TriCont-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>TriCont</b><i> (<code>const mglData &amp;</code>id, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>num</code>=<code>7</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005ftricont_005fxyzc"></a><u>C function:</u> <code>void</code> <b>mgl_tricont_xyzc</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> id, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> c, <code>const char *</code>sch, <code>num</code>, <code>float</code> zVal)</i></dt>
<dt><a name="index-mgl_005ftricont_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_tricont_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> id, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch, <code>num</code>, <code>float</code> zVal)</i></dt>
<dd><p>The same as first one with vector <var>v</var> of <var>num</var>-th elements equidistantly distributed in range [<var>Cmin</var>, <var>Cmax</var>].
</p></dd></dl>

<hr size="6">
<a name="QuadPlot"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#TriCont" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Plots-by-formula" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="QuadPlot-1"></a>
<h3 class="subsection">3.14.8 QuadPlot</h3>
<a name="index-QuadPlot"></a>

<dl>
<dt><a name="index-QuadPlot-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>QuadPlot</b><i> (<code>const mglData &amp;</code>id, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>c, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-QuadPlot-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>QuadPlot</b><i> (<code>const mglData &amp;</code>id, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const char *</code>sch=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fquadplot_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_quadplot_xyz</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> id, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const char *</code>sch)</i></dt>
<dt><a name="index-mgl_005fquadplot_005fxyzc"></a><u>C function:</u> <code>void</code> <b>mgl_quadplot_xyzc</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> id, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> c, <code>const char *</code>sch)</i></dt>
<dd><p>The function draws the surface of quadrangles. Quadrangles vertexes are set by indexes <var>id</var> of data points {<var>x</var>[i], <var>y</var>[i], <var>z</var>[i]}. String <var>sch</var> sets the color scheme. Previous color scheme is used by default. If string contain &lsquo;<samp>#</samp>&rsquo; then wire plot is produced. First dimensions of <var>id</var> must be 4 or greater. Arrays <var>x</var>, <var>y</var>, <var>z</var> must have equal sizes. Parameter <var>c</var> set the colors of quadrangles (if <var>id</var>.ny=<var>c</var>.nx) or colors of vertexes (if <var>x</var>.nx=<var>c</var>.nx). See also <a href="#TriPlot">TriPlot</a>.
</p></dd></dl>

<dl>
<dt><a name="index-QuadPlot-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>QuadPlot</b><i> (<code>const mglData &amp;</code>id, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const char *</code>sch=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>)</i></dt>
<dt><a name="index-mgl_005fquadplot_005fxy"></a><u>C function:</u> <code>void</code> <b>mgl_quadplot_xy</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> id, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const char *</code>sch, <code>float</code> zVal)</i></dt>
<dd><p>The same as previous with <var>z</var>[i]=<var>zVal</var>.
</p></dd></dl>

<hr size="6">
<a name="Plots-by-formula"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#QuadPlot" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#SimplePlot" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Plots-by-formula-1"></a>
<h3 class="subsection">3.14.9 Plots by formula</h3>
<a name="index-Plot-4"></a>
<a name="index-Surf-3"></a>

<p>These functions perform plotting of 1D or 2D functions specified by textual formula. You do not need to create the data arrays to plot it. The parameter <var>stl</var> set the line style (see section <a href="mathgl_en_1.html#Line-styles">Line styles</a>) for <code>Plot()</code> or color scheme (see section <a href="mathgl_en_1.html#Color-scheme">Color scheme</a>) for <code>Surf()</code>. The parameter <var>n</var> set the minimal number of points along coordinate(s) for plots. At this time (v. 1.10) there is adaptive increase of data points numbers but only for 1D variant (i.e. for Plot()).
</p>
<dl>
<dt><a name="index-Plot-5"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Plot</b><i> (<code>const char *</code>eqY, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>, <code>int</code> n=<code>100</code>)</i></dt>
<dt><a name="index-mgl_005ffplot"></a><u>C function:</u> <code>void</code> <b>mgl_fplot</b><i> (<code>HMGL</code> gr, <code>const char *</code>eqY, <code>const char *</code>stl, <code>float</code> zVal, <code>int</code> n)</i></dt>
<dd><p>The function draws function &lsquo;<samp>eqY(x)</samp>&rsquo; at plane z=<var>zVal</var> where &lsquo;<samp>x</samp>&rsquo; variable is changed in range [<var>Min</var>.x, <var>Max</var>.x]. See also <a href="#Plot">Plot</a>.
</p></dd></dl>

<dl>
<dt><a name="index-Plot-6"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Plot</b><i> (<code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>float</code> zVal=<code>NAN</code>, <code>int</code> n=<code>100</code>)</i></dt>
<dt><a name="index-mgl_005ffplot_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_fplot_xyz</b><i> (<code>HMGL</code> gr, <code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>stl, <code>float</code> zVal, <code>int</code> n)</i></dt>
<dd><p>The function draws parametrical curve {&lsquo;<samp>eqX(t)</samp>&rsquo;, &lsquo;<samp>eqY(t)</samp>&rsquo;, &lsquo;<samp>eqZ(t)</samp>&rsquo;} where &lsquo;<samp>t</samp>&rsquo; variable is changed in range [0, 1]. See also <a href="#Plot">Plot</a>.
</p></dd></dl>

<dl>
<dt><a name="index-Surf-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf</b><i> (<code>const char *</code>eqZ, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>int</code> n=<code>100</code>);</i></dt>
<dt><a name="index-mgl_005ffsurf"></a><u>C function:</u> <code>void</code> <b>mgl_fsurf</b><i> (<code>HMGL</code> gr, <code>const char *</code>eqZ, <code>const char *</code>stl, <code>int</code> n);</i></dt>
<dd><p>The function draws surface for function &lsquo;<samp>eqY(x,y)</samp>&rsquo; where &lsquo;<samp>x</samp>&rsquo;, &lsquo;<samp>y</samp>&rsquo; variables are changed in range [<var>Min</var>, <var>Max</var>]. See also <a href="#Surf">Surf</a>.
</p></dd></dl>

<dl>
<dt><a name="index-Surf-5"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Surf</b><i> (<code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>stl=<code>&quot;&quot;</code>, <code>int</code> n=<code>100</code>)</i></dt>
<dt><a name="index-mgl_005ffsurf_005fxyz"></a><u>C function:</u> <code>void</code> <b>mgl_fsurf_xyz</b><i> (<code>HMGL</code> gr, <code>const char *</code>eqX, <code>const char *</code>eqY, <code>const char *</code>eqZ, <code>const char *</code>stl, <code>int</code> n)</i></dt>
<dd><p>The function draws parametrical surface {&lsquo;<samp>eqX(u,v)</samp>&rsquo;, &lsquo;<samp>eqY(u,v)</samp>&rsquo;, &lsquo;<samp>eqZ(u,v)</samp>&rsquo;} where &lsquo;<samp>u</samp>&rsquo;, &lsquo;<samp>v</samp>&rsquo; variables are changed in range [0, 1]. See also <a href="#Surf">Surf</a>.
</p></dd></dl>

<hr size="6">
<a name="SimplePlot"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Plots-by-formula" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Nonlinear-fitting" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Other-plotting" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="SimplePlot-1"></a>
<h3 class="subsection">3.14.10 SimplePlot</h3>
<a name="index-SimplePlot"></a>

<dl>
<dt><a name="index-SimplePlot-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>SimplePlot</b><i> (<code>const mglData &amp;</code>a, <code>int</code> type=<code>0</code>, <code>const char *</code>stl=<code>&quot;&quot;</code>)</i></dt>
<dt><a name="index-mgl_005fsimple_005fplot"></a><u>C function:</u> <code>void</code> <b>mgl_simple_plot</b><i> (<code>HMGL</code> gr, <code>const HMDT</code> a, <code>int</code> type, <code>const char *</code>stl)</i></dt>
<dd><p>Plots the array <var>a</var> depending on it&rsquo;s dimensions and <var>type</var> parameter. String <var>stl</var> specifies the style of plotting. For 1d data: <code>type=0</code> &ndash; <a href="#Plot">Plot</a>, <code>type=1</code> &ndash; <a href="#Area">Area</a>, <code>type=2</code> &ndash; <a href="#Step">Step</a>, <code>type=3</code> &ndash; <a href="#Stem">Stem</a>, <code>type=4</code> &ndash; <a href="#Bars">Bars</a>. For 2d data: <code>type=0</code> &ndash; <a href="#Surf">Surf</a>, <code>type=1</code> &ndash; <a href="#Dens">Dens</a>, <code>type=2</code> &ndash; <a href="#Mesh">Mesh</a>, <code>type=3</code> &ndash; <a href="#Cont">Cont</a>. For 3d data: <code>type=0</code> &ndash; <a href="#Surf3">Surf3</a>, <code>type=1</code> &ndash; <a href="#Dens3">Dens3</a>, <code>type=2</code> &ndash; <a href="#Cont3">Cont3</a>, <code>type=2</code> &ndash; <a href="#Cloud">Cloud</a>.
</p></dd></dl>

<hr size="6">
<a name="Nonlinear-fitting"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#SimplePlot" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Data-distributions" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Nonlinear-fitting-1"></a>
<h2 class="section">3.15 Nonlinear fitting</h2>
<a name="index-Fit"></a>
<a name="index-FitS"></a>
<a name="index-PutsFit"></a>
<a name="index-FitPnts"></a>
<a name="index-Fit2"></a>
<a name="index-Fit3"></a>

<p>These functions fit data to formula. Fitting goal is to find formula parameters for the best fit the data points, i.e. to minimize the sum <em>\sum_i (f(x_i, y_i, z_i) - a_i)^2/s_i^2</em>. At this, approximation function &lsquo;<samp>f</samp>&rsquo; can depend only on one argument &lsquo;<samp>x</samp>&rsquo; (1D case), on two arguments &lsquo;<samp>x,y</samp>&rsquo; (2D case) and on three arguments &lsquo;<samp>x,y,z</samp>&rsquo; (3D case). The function &lsquo;<samp>f</samp>&rsquo; also may depend on parameters. Normally the list of fitted parameters is specified by <var>var</var> string (like, &lsquo;<samp>abcd</samp>&rsquo;). Usually user should supply initial values for fitted parameters by <var>ini</var> variable. But if he/she don&rsquo;t supply it then the zeros are used. Parameter <var>print</var>=<code>true</code> switch on printing the found coefficients to <var>Message</var> (see section <a href="#Error-handling">Error handling</a>).
</p>
<p>Functions Fit() and FitS() do not draw the obtained data themselves. They fill the data <var>fit</var> by formula &lsquo;<samp>f</samp>&rsquo; with found coefficients and return the <em>\chi^2</em> error of approximation. At this, the &lsquo;<samp>x,y,z</samp>&rsquo; coordinates are equidistantly distributed in the interval <var>Min</var>&ndash;<var>Max</var>. Number of points in <var>fit</var> is selected as maximal value of <var>fit</var> size and the value of <var>FitPnts</var>. Note, that this functions use GSL library and do something only if MathGL was compiled with GSL support. See section <a href="mathgl_en_9.html#Fitting-sample">Fitting sample</a>, for sample code and picture.
</p>
<dl>
<dt><a name="index-FitS-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>FitS</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini=<code>NULL</code>, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-FitS-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>FitS</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &amp;</code>ini, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005ffit_005fxyzas"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xyzas</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const HMDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini)</i></dt>
<dt><a name="index-mgl_005ffit_005fxyzas_005fd"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xyzas_d</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const HMDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini)</i></dt>
<dd><p>Fit data along x-, y- and z-directions for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]).
</p></dd></dl>

<dl>
<dt><a name="index-FitS-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>FitS</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini=<code>NULL</code>, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-FitS-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>FitS</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &amp;</code>ini, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005ffit_005fxyzs"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xyzs</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> a, <code>const HMDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini)</i></dt>
<dt><a name="index-mgl_005ffit_005fxyzs_005fd"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xyzs_d</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> a, <code>const HMDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini)</i></dt>
<dd><p>Fit data along x-, and y-directions for 2d array specified parametrically <var>a</var>[i,j](<var>x</var>[i,j], <var>y</var>[i,j]) for each data slice.
</p></dd></dl>

<dl>
<dt><a name="index-FitS-5"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>FitS</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini=<code>NULL</code>, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-FitS-6"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>FitS</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &amp;</code>ini, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005ffit_005fxys"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xys</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> a, <code>const HMDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini)</i></dt>
<dt><a name="index-mgl_005ffit_005fxys_005fd"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xys_d</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> a, <code>const HMDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini)</i></dt>
<dd><p>Fit data along x-direction for 1d array specified parametrically <var>a</var>[i](<var>x</var>[i]) for each data slice.
</p></dd></dl>

<dl>
<dt><a name="index-FitS-7"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>FitS</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini=<code>NULL</code>, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-FitS-8"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>FitS</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>a, <code>const mglData &amp;</code>s, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &amp;</code>ini, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005ffit_005fys"></a><u>C function:</u> <code>float</code> <b>mgl_fit_ys</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> a, <code>const HMDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini)</i></dt>
<dt><a name="index-mgl_005ffit_005fys_005fd"></a><u>C function:</u> <code>float</code> <b>mgl_fit_ys_d</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> a, <code>const HMDT</code> s, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini)</i></dt>
<dd><p>Fit data along x-direction for 1d array with <var>x</var> equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<dl>
<dt><a name="index-Fit-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini=<code>NULL</code>, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-Fit-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &amp;</code>ini, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005ffit_005fxyza"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xyza</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini)</i></dt>
<dt><a name="index-mgl_005ffit_005fxyza_005fd"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xyza_d</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini)</i></dt>
<dd><p>Fit data along x-, y- and z-directions for 3d array specified parametrically <var>a</var>[i,j,k](<var>x</var>[i,j,k], <var>y</var>[i,j,k], <var>z</var>[i,j,k]) with <var>s</var>[i,j,k]=1.
</p></dd></dl>

<dl>
<dt><a name="index-Fit-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini=<code>NULL</code>, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-Fit-4"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &amp;</code>ini, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005ffit_005fxyz"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xyz</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini)</i></dt>
<dt><a name="index-mgl_005ffit_005fxyz_005fd"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xyz_d</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini)</i></dt>
<dd><p>Fit data along x-, and y-directions for 2d array specified parametrically <var>a</var>[i,j](<var>x</var>[i,j], <var>y</var>[i,j]) with <var>s</var>[i,j]=1 for each data slice.
</p></dd></dl>

<dl>
<dt><a name="index-Fit-5"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini=<code>NULL</code>, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-Fit-6"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &amp;</code>ini, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005ffit_005fxy"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xy</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini)</i></dt>
<dt><a name="index-mgl_005ffit_005fxy_005fd"></a><u>C function:</u> <code>float</code> <b>mgl_fit_xy_d</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> x, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini)</i></dt>
<dd><p>Fit data along x-direction for 1d array specified parametrically <var>a</var>[i](<var>x</var>[i]) with <var>s</var>[i]=1 for each data slice.
</p></dd></dl>

<dl>
<dt><a name="index-Fit-7"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini=<code>&quot;&quot;</code>, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-Fit-8"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &amp;</code>ini, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005ffit_005f1"></a><u>C function:</u> <code>float</code> <b>mgl_fit_1</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini)</i></dt>
<dt><a name="index-mgl_005ffit_005f1_005fd"></a><u>C function:</u> <code>float</code> <b>mgl_fit_1_d</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini)</i></dt>
<dd><p>Fit data along x-direction for 1d array <var>a</var> with <var>s</var>=1 and <var>x</var> equidistantly distributed in interval [<var>Min</var>.x, <var>Max</var>.x].
</p></dd></dl>

<dl>
<dt><a name="index-Fit2-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit2</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini=<code>NULL</code>, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-Fit2-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit2</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &amp;</code>ini, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005ffit_005f2"></a><u>C function:</u> <code>float</code> <b>mgl_fit_2</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini)</i></dt>
<dt><a name="index-mgl_005ffit_005f2_005fd"></a><u>C function:</u> <code>float</code> <b>mgl_fit_2_d</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini)</i></dt>
<dd><p>Fit data along x-, and y-directions for 2d array <var>a</var> with <var>s</var>=1 and <var>x</var>, <var>y</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-Fit3-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit3</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini=<code>NULL</code>, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-Fit3-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>float</code> <b>Fit3</b><i> (<code>mglData &amp;</code>fit, <code>const mglData &amp;</code>a, <code>const char *</code>func, <code>const char *</code>var, <code>mglData &amp;</code>ini, <code>bool</code> print=<code>false</code>)</i></dt>
<dt><a name="index-mgl_005ffit_005f3"></a><u>C function:</u> <code>float</code> <b>mgl_fit_3</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>float *</code>ini)</i></dt>
<dt><a name="index-mgl_005ffit_005f3_005fd"></a><u>C function:</u> <code>float</code> <b>mgl_fit_3_d</b><i> (<code>HMGL</code> gr, <code>HMDT</code> fit, <code>const HMDT</code> a, <code>const char *</code>func, <code>const char *</code>var, <code>HMDT</code> ini)</i></dt>
<dd><p>Fit data along x-, y- and z-directions for 3d array <var>a</var> with <var>s</var>=1 and <var>x</var>, <var>y</var>, <var>z</var> equidistantly distributed in interval [<var>Min</var>, <var>Max</var>].
</p></dd></dl>

<dl>
<dt><a name="index-PutsFit-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>PutsFit</b><i> (<code>mglPoint</code> p, <code>const char *</code>prefix=<code>&quot;&quot;</code>, <code>const char *</code>font=<code>NULL</code>, <code>float</code> size=<code>-1</code>)</i></dt>
<dt><a name="index-mgl_005fputs_005ffit"></a><u>C function:</u> <code>void</code> <b>mgl_puts_fit</b><i> (<code>HMGL</code> gr, <code>float</code> x, <code>float</code> y, <code>float</code> z, <code>const char *</code>prefix, <code>const char *</code>font, <code>float</code> size=<code>-1</code>)</i></dt>
<dd><p>Print last fitted formula with found coefficients (as numbers) at position <var>p0</var>. The string <var>prefix</var> will be printed before formula. All other parameters are the same as in <a href="#Text-printing">Text printing</a>.
</p></dd></dl>

<dl>
<dt><a name="index-GetFit"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>const char *</code> <b>GetFit</b><i> ()</i></dt>
<dt><a name="index-mgl_005fget_005ffit"></a><u>C function:</u> <code>const char *</code> <b>mgl_get_fit</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Get last fitted formula with found coefficients (as numbers).
</p></dd></dl>

<dl>
<dt><a name="index-FitPnts-of-mglGraph"></a><u>General option (C++) of mglGraph:</u> <code>int</code> <b>FitPnts</b></dt>
<dd><p>Minimal number of points for output array after nonlinear fitting.
</p></dd></dl>



<hr size="6">
<a name="Data-distributions"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Nonlinear-fitting" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#Frames_002fAnimation" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Data-distributions-1"></a>
<h2 class="section">3.16 Data distributions</h2>
<a name="index-Hist"></a>

<p>These functions make distribution (histogram) of data. They do not draw the obtained data themselves. These functions can be useful if user have data defined for random points (for example, after PIC simulation) and he want to produce a plot which require regular data (defined on grid(s)). The range for grids is always selected as axis range Min...Max. Arrays <var>x</var>, <var>y</var>, <var>z</var> define the positions (coordinates) of random points. Array <var>a</var> define the data value. Number of points in output array <var>res</var> is selected as maximal value of <var>res</var> size and the value of <var>FitPnts</var>.
</p>
<dl>
<dt><a name="index-Hist-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Hist</b><i> (<code>mglData &amp;</code>res, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>a)</i></dt>
<dt><a name="index-mgl_005fhist_005fx"></a><u>C function:</u> <code>int</code> <b>mgl_hist_x</b><i> (<code>HMGL</code> gr, <code>HMDT</code> res, <code>const HMDT</code> x, <code>const HMDT</code> a)</i></dt>
<dd><p>Creates 1D distribution of the data values <var>a</var> in range [Min, Max].
</p></dd></dl>

<dl>
<dt><a name="index-Hist-2"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Hist</b><i> (<code>mglData &amp;</code>res, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>a)</i></dt>
<dt><a name="index-mgl_005fhist_005fxy"></a><u>C function:</u> <code>int</code> <b>mgl_hist_xy</b><i> (<code>HMGL</code> gr, <code>HMDT</code> res, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> a)</i></dt>
<dd><p>Creates 2D distribution of the data values <var>a</var> in range [Min, Max].
</p></dd></dl>

<dl>
<dt><a name="index-Hist-3"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>Hist</b><i> (<code>mglData &amp;</code>res, <code>const mglData &amp;</code>x, <code>const mglData &amp;</code>y, <code>const mglData &amp;</code>z, <code>const mglData &amp;</code>a)</i></dt>
<dt><a name="index-mgl_005fhist_005fxyz"></a><u>C function:</u> <code>int</code> <b>mgl_hist_xyz</b><i> (<code>HMGL</code> gr, <code>HMDT</code> res, <code>const HMDT</code> x, <code>const HMDT</code> y, <code>const HMDT</code> z, <code>const HMDT</code> a)</i></dt>
<dd><p>Creates 3D distribution of the data values <var>a</var> in range [Min, Max].
</p></dd></dl>


<hr size="6">
<a name="Frames_002fAnimation"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Data-distributions" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="#IDTF-functions" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="Frames_002fAnimation-1"></a>
<h2 class="section">3.17 Frames/Animation</h2>
<a name="index-NewFrame"></a>
<a name="index-EndFrame"></a>
<a name="index-GetNumFrame"></a>

<p>These functions provide ability to create several pictures simultaneously. For most of cases it is useless but for widget classes (see section <a href="mathgl_en_5.html#Widget-classes">Widget classes</a>) they can provide a way to show animation. Also you can write several frames into animated GIF file.
</p>
<dl>
<dt><a name="index-NewFrame-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>int</code> <b>NewFrame</b><i> ()</i></dt>
<dt><a name="index-mgl_005fnew_005fframe"></a><u>C function:</u> <code>int</code> <b>mgl_new_frame</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Creates new frame. Function returns current frame id. This is not thread safe function in OpenGL mode! Use direct list creation in multi-threading drawing. The function <code>EndFrame()</code> <strong>must</strong> be call after the finishing of the frame drawing for each call of this function.
</p></dd></dl>

<dl>
<dt><a name="index-EndFrame-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>EndFrame</b><i> ()</i></dt>
<dt><a name="index-mgl_005fend_005fframe"></a><u>C function:</u> <code>void</code> <b>mgl_end_frame</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Finishes the frame drawing.
</p></dd></dl>

<dl>
<dt><a name="index-GetNumFrame-1"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>int</code> <b>GetNumFrame</b><i> ()</i></dt>
<dt><a name="index-mgl_005fget_005fnum_005fframe"></a><u>C function:</u> <code>int</code> <b>mgl_get_num_frame</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Gets the number of created frames.
</p></dd></dl>

<dl>
<dt><a name="index-ResetFrames"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>ResetFrames</b><i> ()</i></dt>
<dt><a name="index-mgl_005freset_005fframes"></a><u>C function:</u> <code>int</code> <b>mgl_reset_frames</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Reset frames counter (start it from zero).
</p></dd></dl>

<dl>
<dt><a name="index-StartGIF"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>void</code> <b>StartGIF</b><i> (<code>const char *</code>fname, <code>int</code> ms=<code>100</code>)</i></dt>
<dt><a name="index-mgl_005fstart_005fgif"></a><u>C function:</u> <code>void</code> <b>mgl_start_gif</b><i> (<code>HMGL</code> gr, <code>const char *</code>fname, <code>int</code> ms)</i></dt>
<dd><p>Start writing frames into animated GIF file <var>fname</var>. Parameter <var>ms</var> set the delay between frames in milliseconds. You <strong>should not</strong> change the picture size during writing the cinema. Use CloseGIF() to finalize writing. Note, that this function is disabled in OpenGL mode.
</p></dd></dl>

<dl>
<dt><a name="index-CloseGIF"></a><u>Method on <code>mglGraph</code> (C++, Python):</u> <code>int</code> <b>CloseGIF</b><i> ()</i></dt>
<dt><a name="index-mgl_005fclose_005fgif"></a><u>C function:</u> <code>void</code> <b>mgl_close_gif</b><i> (<code>HMGL</code> gr)</i></dt>
<dd><p>Finish writing animated GIF and close connected pointers.
</p></dd></dl>

<hr size="6">
<a name="IDTF-functions"></a>
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#Frames_002fAnimation" title="Previous section in reading order"> &lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next section in reading order"> &gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="#MathGL-core" title="Up section"> Up </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<a name="IDTF-functions-1"></a>
<h2 class="section">3.18 IDTF functions</h2>
<a name="index-NewFrame-2"></a>
<a name="index-EndFrame-2"></a>
<a name="index-GetNumFrame-2"></a>

<p>These functions provide IDTF specific features. In all other cases they do nothing.
</p>
<dl>
<dt><a name="index-VertexColor"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>VertexColor</b><i> (<code>bool</code> enable)</i></dt>
<dd><p>Enables smooth color change.
</p></dd></dl>

<dl>
<dt><a name="index-Compression"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>Compression</b><i> (<code>bool</code> enable)</i></dt>
<dd><p>Gives smaller files, but quality degrades.
</p></dd></dl>

<dl>
<dt><a name="index-StartGroup"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>StartGroup</b><i> (const char *name)</i></dt>
<dd><p>Starts group definition. Groups contain objects and other groups, they are used to select a part of a model to zoom to or to make invizible or to make transparent and so on.
</p></dd></dl>

<dl>
<dt><a name="index-EndGroup"></a><u>Method on <code>mglGraph</code> (C++):</u> <code>void</code> <b>EndGroup</b><i> ()</i></dt>
<dd><p>Ends group definition.
</p></dd></dl>


<hr size="6">
<table cellpadding="1" cellspacing="1" border="0">
<tr><td valign="middle" align="left">[<a href="#MathGL-core" title="Beginning of this chapter or previous chapter"> &lt;&lt; </a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_4.html#Plotter-classes" title="Next chapter"> &gt;&gt; </a>]</td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left"> &nbsp; </td>
<td valign="middle" align="left">[<a href="mathgl_en.html#Top" title="Cover (top) of document">Top</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_toc.html#SEC_Contents" title="Table of contents">Contents</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_12.html#Index" title="Index">Index</a>]</td>
<td valign="middle" align="left">[<a href="mathgl_en_abt.html#SEC_About" title="About (help)"> ? </a>]</td>
</tr></table>
<p>
 <font size="-1">
  This document was generated on <i>February 27, 2011</i> using <a href="http://www.nongnu.org/texi2html/"><i>texi2html 1.82</i></a>.
 </font>
 <br>

</p>
</body>
</html>