Example of popular color schemes.
MGL code:
new x 100 100 'x':new y 100 100 'y' call 'sch' 0 'kw' call 'sch' 1 '%gbrw' call 'sch' 2 'kHCcw' call 'sch' 3 'kBbcw' call 'sch' 4 'kRryw' call 'sch' 5 'kGgew' call 'sch' 6 'BbwrR' call 'sch' 7 'BbwgG' call 'sch' 8 'GgwmM' call 'sch' 9 'UuwqR' call 'sch' 10 'QqwcC' call 'sch' 11 'CcwyY' call 'sch' 12 'bcwyr' call 'sch' 13 'bwr' call 'sch' 14 'wUrqy' call 'sch' 15 'UbcyqR' call 'sch' 16 'BbcyrR' call 'sch' 17 'bgr' call 'sch' 18 'BbcyrR|' call 'sch' 19 'b{g,0.3}r' stop func 'sch' 2 subplot 2 10 $1 '<>_^' 0.2 0:surfa x y $2 text 0.07+0.5*mod($1,2) 0.92-0.1*int($1/2) $2 'A' return
C++ code:
void smgl_schemes(mglGraph *gr) // Color table { mglData a(256,2), b(256,2); a.Fill(-1,1); b.Fill(-1,1,'y'); gr->SubPlot(2,10,0,NULL,0.2); gr->Dens(a,"kw"); gr->Puts(0.07, 0.92, "kw", "A"); gr->SubPlot(2,10,1,NULL,0.2); gr->SurfA(a,b,"%gbrw"); gr->Puts(0.57, 0.92, "%gbrw", "A"); gr->SubPlot(2,10,2,NULL,0.2); gr->Dens(a,"kHCcw"); gr->Puts(0.07, 0.82, "kHCcw", "A"); gr->SubPlot(2,10,3,NULL,0.2); gr->Dens(a,"kBbcw"); gr->Puts(0.57, 0.82, "kBbcw", "A"); gr->SubPlot(2,10,4,NULL,0.2); gr->Dens(a,"kRryw"); gr->Puts(0.07, 0.72, "kRryw", "A"); gr->SubPlot(2,10,5,NULL,0.2); gr->Dens(a,"kGgew"); gr->Puts(0.57, 0.72, "kGgew", "A"); gr->SubPlot(2,10,6,NULL,0.2); gr->Dens(a,"BbwrR"); gr->Puts(0.07, 0.62, "BbwrR", "A"); gr->SubPlot(2,10,7,NULL,0.2); gr->Dens(a,"BbwgG"); gr->Puts(0.57, 0.62, "BbwgG", "A"); gr->SubPlot(2,10,8,NULL,0.2); gr->Dens(a,"GgwmM"); gr->Puts(0.07, 0.52, "GgwmM", "A"); gr->SubPlot(2,10,9,NULL,0.2); gr->Dens(a,"UuwqR"); gr->Puts(0.57, 0.52, "UuwqR", "A"); gr->SubPlot(2,10,10,NULL,0.2); gr->Dens(a,"QqwcC"); gr->Puts(0.07, 0.42, "QqwcC", "A"); gr->SubPlot(2,10,11,NULL,0.2); gr->Dens(a,"CcwyY"); gr->Puts(0.57, 0.42, "CcwyY", "A"); gr->SubPlot(2,10,12,NULL,0.2); gr->Dens(a,"bcwyr"); gr->Puts(0.07, 0.32, "bcwyr", "A"); gr->SubPlot(2,10,13,NULL,0.2); gr->Dens(a,"bwr"); gr->Puts(0.57, 0.32, "bwr", "A"); gr->SubPlot(2,10,14,NULL,0.2); gr->Dens(a,"wUrqy"); gr->Puts(0.07, 0.22, "wUrqy", "A"); gr->SubPlot(2,10,15,NULL,0.2); gr->Dens(a,"UbcyqR"); gr->Puts(0.57, 0.22, "UbcyqR", "A"); gr->SubPlot(2,10,16,NULL,0.2); gr->Dens(a,"BbcyrR"); gr->Puts(0.07, 0.12, "BbcyrR", "A"); gr->SubPlot(2,10,17,NULL,0.2); gr->Dens(a,"bgr"); gr->Puts(0.57, 0.12, "bgr", "A"); gr->SubPlot(2,10,18,NULL,0.2); gr->Dens(a,"BbcyrR|"); gr->Puts(0.07, 0.02, "BbcyrR|", "A"); gr->SubPlot(2,10,19,NULL,0.2); gr->Dens(a,"b{g,0.3}r"); gr->Puts(0.57, 0.02, "b\\{g,0.3\\}r", "A"); }