Next: , Previous: , Up: Graphics setup   [Contents][Index]


5.2.7 Palette and colors

MGL command: palette 'colors'
Method on mglGraph: void SetPalette (const char *colors)
C function: void mgl_set_palette (HMGL gr, const char *colors)

Sets the palette as selected colors. Default value is "Hbgrcmyhlnqeup" that corresponds to colors: dark gray ‘H’, blue ‘b’, green ‘g’, red ‘r’, cyan ‘c’, magenta ‘m’, yellow ‘y’, gray ‘h’, blue-green ‘l’, sky-blue ‘n’, orange ‘q’, yellow-green ‘e’, blue-violet ‘u’, purple ‘p’. The palette is used mostly in 1D plots (see 1D plotting) for curves which styles are not specified. Internal color counter will be nullified by any change of palette. This includes even hidden change (for example, by box or axis functions).

Method on mglGraph: void SetDefScheme (const char *sch)
C function: void mgl_set_def_sch (HMGL gr, const char *sch)

Sets the sch as default color scheme. Default value is "BbcyrR".

Method on mglGraph: void SetColor (char id, mreal r, mreal g, mreal b) static
C function: void mgl_set_color (char id, mreal r, mreal g, mreal b)

Sets RGB values for color with given id. This is global setting which influence on any later usage of symbol id.

MGL command: gray val
Method on mglGraph: void Gray (bool enable)
C function: void mgl_set_gray (HMGL gr, int enable)

Sets the gray-scale mode on/off.





Next: , Previous: , Up: Graphics setup   [Contents][Index]