You are here: Symbol Reference > Dew Namespace > Dew.Math Namespace > Dew.Math.Tee Namespace > Classes > ColorPalette Class > ColorPalette Methods > ColorPalette.CreateDefaultPalette Method
Dew Math for .NET
ContentsIndexHome
PreviousUpNext
ColorPalette.CreateDefaultPalette Method

Create default palette entries/levels.

Syntax
C#
Visual Basic
public void CreateDefaultPalette(double aMax, double aMin);
Parameters 
Description 
double aMax 
Minimum palette value. 
double aMin 
Maximum palette value. 

Create 20 equidistant palette entries starting with red color for values bellow -0 and ending with Blue color for values above 400. Keep in mind that when palCustom is used, the speed of bitmap fill-in equals (bitmap size in pixels) x (paletteSteps) and it is therefore meaningfull to use a smaller number of steps or use palRange setting. When setting up custom range palettes they also depend on all parameters of the ColorPalette. This includes the rainbow settings.

using Dew.Math; using Dew.Math.Tee; MtxGridSeries gridseries; tChart1.Series.Clear(); tChart1.Series.Add(gridseries = new MtxGridSeries()); tChart1.ColorPalette.Clear(); tChart1.ColorPalette.MidColor = Color.Blue; tChart1.ColorPalette.ColorBalance = 0.0; tChart1.ColorPalette.CreateDefaultPalette(400,0); Matrix A = new Matrix(20,20); A.RandGauss(); MtxVecTee.DrawValues(A,gridseries);
Copyright (c) 1999-2024 by Dew Research. All rights reserved.
What do you think about this topic? Send feedback!