Function:Colours

From S2PLOT

Jump to: navigation, search

Colours

Useful colour definitions based on PGPlot default settings.

Values

#define S2_PG_BLACK 0
#define S2_PG_WHITE 1
#define S2_PG_RED 2 
#define S2_PG_GREEN 3
#define S2_PG_BLUE 4
#define S2_PG_CYAN 5
#define S2_PG_MAGENTA 6
#define S2_PG_YELLOW 7
#define S2_PG_ORANGE 8
#define S2_PG_DKGRAY 14
#define S2_PG_DKGREY 14
#define S2_PG_LTGRAY 15
#define S2_PG_LTGREY 15

Description

Some useful colour definitions based on PGPlot default settings.

See Also

s2icm Install various colour maps.
struct COLOUR Data structure for (r,g,b) colour indices.


Code Example

#include <stdio.h>
#include <stdlib.h>
#include "s2plot.h"

int main(int argc, char *argv[])
{
   s2opend("/?",argc, argv);			/* Open the display */
   s2swin(-1.,1., -1.,1., -1.,1.);		/* Set the window coordinates */
   s2box("BCDET",0,0,"BCDET",0,0,"BCDET",0,0);	/* Draw coordinate box */

   s2slw(4);					/* Set line width */

   s2sci(S2_PG_YELLOW);
   s2pt1(0.0, 0.0, 0.0, 1);			/* Draw a yellow point */

   s2sci(S2_PG_RED);
   s2pt1(0.3, 0.5, 0.8, 1);			/* Draw a red point */

   s2sci(S2_PG_ORANGE);
   s2pt1(-0.7, -0.6, -0.2, 1);			/* Draw an orange point */

   s2show(1);					/* Open the s2plot window */
   
   return 1;
}

Back to S2PLOT function list.


Personal tools