Function:Colours

From S2PLOT

(Difference between revisions)
Jump to: navigation, search
Revision as of 04:34, 26 October 2007
S2plot admin (Talk | contribs)

← Previous diff
Current revision
S2plot admin (Talk | contribs)

Line 26: Line 26:
== See Also == == See Also ==
<table> <table>
-<tr><td>[[Function:s2icm | s2icm ]]]</td><td>Install various colour maps. </td></tr>+<tr><td>[[Function:s2icm | s2icm ]]</td><td>Install various colour maps. </td></tr>
-<tr><td>[[Function:struct_COLOUR | struct_COLOUR ]]]</td><td>Data structure for (r,g,b) colour indices. </td></tr>+<tr><td>[[Function:struct COLOUR | struct COLOUR ]]</td><td>Data structure for (r,g,b) colour indices. </td></tr>
</table> </table>

Current revision

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