MF_xyzAutoDensityMap MD_xyzAutoDensityMap ME_xyzAutoDensityMap
Functiondraw an X-Y coordinate system and plot a color-density map for z = f( x, y ) into it
Syntax C/C++#include <Mgraph.h>
void MF_xyzAutoDensityMap( fVector X, fVector Y, fMatrix Z, ui ht, ui len, COLORREF mincolor, COLORREF maxcolor );
C++ MatObj#include <OptiVec.h>
void matrix<T>::xyzAutoDensityMap( const vector<T>& X, const vector<T>& Y, COLORREF mincolor, COLORREF maxcolor );
Pascal/Delphiuses Mgraph;
procedure MF_xyzAutoDensityMap( X, Y:fVector; MZ:fMatrix; ht, len:UIntSize; mincolor, maxcolor: COLORREF );
DescriptionA Cartesian coordinate system is drawn with automatic scaling of the axes and the matrix MZ is plotted as a color-density map against the vectors X and Y. Prior to calling MF_xyzAutoDensityMap, the plotting routines have to be initialized by V_initGraph (for DOS programs) or V_initPlot (DOS or Windows programs).

The font of the axis tick labels is the actual text font. In DOS programs (Borland C++ or Pascal), it may be changed by calling settextstyle before calling MF_xyzAutoDensityMap. In Windows programs (both 16-bit and 32-bit), the font of the current device context is used.

All MZ values will be translated into colors by linear interpolation between the parameters mincolor and maxcolor.
DOS:   The data type COLORREF is unsigned. See the Borland C++ or TurboPascal function setcolor for a description of the colors available in the various graphics modes.
Windows: The data type COLORREF is unsigned long. The colors BLACK, BLUE, GREEN, CYAN, RED, MAGENTA, BROWN, LIGHTGRAY, DARKGRAY, LIGHTBLUE, LIGHTGREEN, LIGHTCYAN, LIGHTRED, LIGHTMAGENTA, YELLOW, and WHITE are defined in <Vgraph.h> (or the unit Vgraph) by analogy with the COLORS defined for DOS in <graphics.h> (or the unit Graph) for the BGI routines. Thereby, portability between DOS and Windows programs is improved. For programs designed to run exclusively under Windows, it is nevertheless recommended to use fine-tuned colors defined by the RGB macro, instead of the predefined colors.

If you wish to define the boudaries of the coordinate system differently, instead of relying on the automatic range detection and scaling, you may call first M_setDensityMapBounds or (for preserved automatic scaling, but with arbitrary x and y ranges) MF_findDensityMapBounds. Subsequently, call MF_xyzDataDensityMap instead of MF_xyzAutoDensityMap.

See alsoMF_zAutoDensityMap,   MF_xyzDataDensityMap,   VF_xyAutoPlot,   chapter 15

MatrixLib Table of Contents  OptiVec home