Font demo

Image obtained by using color PostScript driver (psc) and then converted to animated gif using ImageMagick convert tool.

 1 
 2 #ifdef MSDOS
 3 #pragma optimize("",off)
 4 #endif
 5 
 6 #pragma _ipath "./"
 7 #include "plcdemos.h"
 8 
 9 static int base[17] =
10 {0, 200, 500, 600, 700, 800, 900,
11  2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900};
12 
13 
14 int
15 main(int argc, char *argv[])
16 {
17     char text[10];
18     int i, j, k, l;
19     PLFLT x, y;
20 
21 
22     (void) plParseOpts(&argc, argv, PL_PARSE_FULL);
23 
24 
25     plinit();
26 
27     plfontld(1);
28     for (l = 0; l < 17; l++) {
29 	pladv(0);
30 
31 
32 	plcol0(2);
33 	plvpor(0.15, 0.95, 0.1, 0.9);
34 	plwind(0.0, 1.0, 0.0, 1.0);
35 
36 
37 	plbox("bcgt", 0.1, 0, "bcgt", 0.1, 0);
38 
39 
40 	plcol0(15);
41 	for (i = 0; i <= 9; i++) {
42 	    sprintf(text, "%d", i);
43 	    plmtex("b", 1.5, (0.1 * i + 0.05), 0.5, text);
44 	}
45 
46 	k = 0;
47 	for (i = 0; i <= 9; i++) {
48 
49 	
50 	    sprintf(text, "%d", base[l] + 10 * i);
51 	    plmtex("lv", 1.0, (0.95 - 0.1 * i), 1.0, text);
52 	    for (j = 0; j <= 9; j++) {
53 		x = 0.1 * j + 0.05;
54 		y = 0.95 - 0.1 * i;
55 
56 	
57 		plsym(1, &x, &y, base[l] + k);
58 		k = k + 1;
59 	    }
60 	}
61 
62 	plmtex("t", 1.5, 0.5, 0.5, "PLplot Example 7 - PLSYM symbols");
63     }
64     plend();
65     exit(0);
66 }

Copyright 2006 Roman Putanowicz

Email: putanowr at twins.pk.edu.pl

Last Modified: Thu, 13 Jul 2006 15:36:46 CEST

Made with PubTal 3.1.3