You are here: Symbol Reference > MtxVecTee Namespace > Classes > TColorPalette Class > public > TColorPalette.CreateDefaultPalette Method
MtxVec VCL
ContentsIndex
PreviousUpNext
TColorPalette.CreateDefaultPalette Method

Create default palette entries/levels.

Pascal
procedure CreateDefaultPalette(aMax: double; aMin: double);

Create default palette entries/levels by using BottomColor,TopColor and PaletteSteps properties.

Plot matrix values by identifying minium value with clBlack and maximum value with clWhite: 

 

procedure TForm1.FormCreate(Sender: TObject); var A: Matrix; GridSeries: TMtxGridSeries; begin GridSeries := TMtxGridSeries.Create(Chart1); GridSeries.ColorPalette.PaletteScale := ppsNone; GridSeries.ColorPalette.PaletteStyle := palCustom; GridSeries.ColorPalette.Clear; GridSeries.ColorPalette.ColorBalance := 0; GridSeries.ColorPalette.UseMidColor := false; GridSeries.ColorPalette.CreateDefaultPalette(400, 0); GridSeries.UpdateColor; 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->PaletteScale = ppsNone; GridSeries->ColorPalette->PaletteStyle = palCustom; GridSeries->ColorPalette->Clear(); GridSeries->ColorPalette->ColorBalance = 0; GridSeries->ColorPalette->UseMidColor = false; GridSeries->ColorPalette->CreateDefaultPalette(400, 0); GridSeries->UpdateColor(); 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!