1## Copyright (C) 1998, 1999, 2000 Joao Cardoso.
2##
3## This program is free software; you can redistribute it and/or modify it
4## under the terms of the GNU General Public License as published by the
5## Free Software Foundation; either version 2 of the License, or (at your
6## option) any later version.
7##
8## This program is distributed in the hope that it will be useful, but
9## WITHOUT ANY WARRANTY; without even the implied warranty of
10## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11## General Public License for more details.
12##
13## This file is part of plplot_octave.
14## It is based on the corresponding demo function of PLplot.
15
16## Displays the entire "plpoin" symbol (font) set.
17
18function x06c
19
20  ## Parse and process command line arguments */
21
22  ## (void) plparseopts(&argc, argv, PL_PARSE_FULL);
23
24  ## Initialize plplot */
25  plinit();
26
27  for kind_font = 0:1
28    plfontld( kind_font );
29    if (kind_font == 0)
30      maxfont = 1;
31    else
32      maxfont = 4;
33    endif
34
35    for font = 1:maxfont
36      plfont( font );
37
38      pladv(0);
39
40      ## Set up viewport and window */
41
42      plcol0(2);
43      plvpor(0.1, 1.0, 0.1, 0.9);
44      plwind(0.0, 1.0, 0.0, 1.3);
45
46      ## Draw the grid using plbox */
47
48      plbox("bcg", 0.1, 0, "bcg", 0.1, 0);
49
50      ## Write the digits below the frame */
51
52      plcol0(15);
53      for i=0:9
54	text=sprintf("%d", i);
55	plmtex("b", 1.5, (0.1 * i + 0.05), 0.5, text);
56      endfor
57
58      k = 0;
59      for i=0:12
60
61	## Write the digits to the left of the frame */
62
63	text=sprintf("%d", 10 * i);
64	plmtex("lv", 1.0, (1.0 - (2 * i + 1) / 26.0), 1.0, text);
65	for j=0:9
66	  x = 0.1 * j + 0.05;
67	  y = 1.25 - 0.1 * i;
68
69	  ## Display the symbols
70
71	  if (k < 128)
72	    plpoin(x, y, k);
73	  endif
74	  k = k + 1;
75	endfor
76      endfor
77
78      if (kind_font == 0)
79	plmtex("t", 1.5, 0.5, 0.5, "PLplot Example 6 - plpoin symbols (compact)");
80      else
81	plmtex("t", 1.5, 0.5, 0.5, "PLplot Example 6 - plpoin symbols (extended)");
82      endif
83    endfor
84  endfor
85  plend1();
86endfunction
87