Multiple window and color map 0 demo

Image obtained by using pbm driver and then converted to png.

 1 #pragma package "../"
 2 #include <chplplot.h>
 3 
 4 
 5 int
 6 main(int argc, char *argv[])
 7 {
 8     int i, j;
 9     PLFLT vmin, vmax;
10     char text[3];
11 
12 
13     plssub(4, 4);
14 
15 
16     (void) plParseOpts(&argc, argv, PL_PARSE_FULL);
17 
18 
19     plinit();
20 
21     plschr(0.0, 3.5);
22     plfont(4);
23 
24     for (i = 0; i <= 15; i++) {
25 	plcol0(i);
26 	sprintf(text, "%d", i);
27 	pladv(0);
28 	vmin = 0.1;
29 	vmax = 0.9;
30 	for (j = 0; j <= 2; j++) {
31 	    plwid(j + 1);
32 	    plvpor(vmin, vmax, vmin, vmax);
33 	    plwind(0.0, 1.0, 0.0, 1.0);
34 	    plbox("bc", 0.0, 0, "bc", 0.0, 0);
35 	    vmin = vmin + 0.1;
36 	    vmax = vmax - 0.1;
37 	}
38 	plwid(1);
39 	plptex(0.5, 0.5, 1.0, 0.0, 0.5, text);
40     }
41 
42     plend();
43     exit(0);
44 }

Copyright 2006 Roman Putanowicz

Email: putanowr at twins.pk.edu.pl

Last Modified: Thu, 13 Jul 2006 15:35:26 CEST

Made with PubTal 3.1.3