You are here: Symbol Reference > MtxVecTee Namespace > Classes > TMtxGridSeries Class
MtxVec VCL
ContentsIndex
PreviousUpNext
TMtxGridSeries Class

2D grid series used for drawing matrix values.

MtxVecTee_TMtxGridSeries
Pascal
TMtxGridSeries = class(TChartSeries);

2D grid series used for drawing matrix values. The series is derived from TColorGridSeries (copyright David Berneda). 

TMtxGridSeries supports two different ways to represent matrix values: 

 

  • Define color for minimum value, color for maximum value and number of levels in between. The algorithm will then automatically create palette entries with correcponding color for each level. In this case you have to set BottomColor, TopColor and PaletteSteps properties and set PaletteStyle to palAuto. The number of steps in the palette will not affect the fill-in speed of the bitmap and you can be very generous, if needed by specifying large PaletteSteps count.
  • Define each level and it's color manually. Using this approach you can easily plot values using nonlinear color scale. In this case use function to add new palette entries/levels. This method has the slowest fill-in speed of the bitmap and its speed linearly depends upon the number of palette entries.

 

The series supports many different color scales and combinations.

Generates a continuous color scale with simple color transition between blue and green and rainbow color transition between green and red. 

 

uses MtxExpr, Math387, MtxVec, MtxVecEdit; procedure TForm1.FormCreate(Sender: TObject); var A: Matrix; GridSeries: TMtxGridSeries; begin GridSeries := TMtxGridSeries.Create(Chart1); GridSeries.ColorPalette.PaletteStyle := palAuto; GridSeries.ColorPalette.ColorBalance := 0; GridSeries.ColorPalette.UseMidColor := True; GridSeries.ColorPalette.Rainbow.MidToTop := True; A.Size(20,20); Vector(A).Ramp; DrawValues(A,GridSeries); end;

 

#include "MtxExpr.hpp" #include "MtxVecEdit.hpp" #include "MtxVecTee.hpp" __fastcall TForm1::TForm1(TComponent* Owner): TForm(Owner) { sMatrix A; TMtxGridSeries *GridSeries; GridSeries = new TMtxGridSeries(Chart1); GridSeries->ColorPalette->PaletteStyle = palAuto; GridSeries->ColorPalette->Clear(); GridSeries->ColorPalette->ColorBalance = 0; GridSeries->ColorPalette->UseMidColor = true; GridSeries->ColorPalette->Rainbow->MidToTop = true; A.Size(20,20); A()->Ramp(); //view A as a Vector DrawValues(A,GridSeries); }
Examples on GitHub
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!