The core of MathGL is mglGraph class defined in #include <mgl2/mgl.h>
. It contains a lot of plotting functions for 1D, 2D and 3D data. It also encapsulates parameters for axes drawing. Moreover an arbitrary coordinate transformation can be used for each axis. All plotting functions use data encapsulated in mglData class (see Data processing) that allows one 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 General concepts and Other classes.
Some of MathGL features will appear only in novel versions. To test used MathGL version you can use following function.
'ver'
¶mglGraph
: bool
CheckVersion (const char *
ver) static
¶int
mgl_check_version (const char *
ver)
¶Return zero if MathGL version is appropriate for required by ver, i.e. if major version is the same and minor version is greater or equal to one in ver.