manpagez: man pages & more
info mathgl
Home | html | info | man
[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3. MathGL core

The core of MathGL is mglGraph class defined in #include <mgl/mgl.h>. 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 mglData class) 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 Other classes.

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 – for bitmap picture in file or in memory; mglGraphPS – for vector PostScript picture; mglGraphGL – for drawing using OpenGL, or for GLUT windows interface; and so on, see section Plotter classes. 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 Widget classes.

There is a C++ wrapper class which have the same name mglGraph and defined in mgl/mgl_graph.h. You can use this class even with non-GNU compilers (i.e. in Borland or Microsoft one), but you should not include any mgl/mgl.h or mgl/mgl_parse.h 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 ‘Python’ class for distinguish from original ‘C++’ class defined in mgl/mgl.h .


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]
© manpagez.com 2000-2017
Individual documents may contain additional copyright information.