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 "plsym" symbol (font) set. 17 18function x07c 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 base=[0, 100, 0, 100, 200, 500, 600, 700, 800, 900, 2000, 2100, 2200, 2300, 2400, 2500, 2600, 2700, 2800, 2900]; 28 29 plfontld(0); 30 for l=0:19 31 if ( l == 2 ) 32 plfontld( 1 ); 33 endif 34 pladv(0); 35 36 ## Set up viewport and window */ 37 38 plcol0(2); 39 plvpor(0.15, 0.95, 0.1, 0.9); 40 plwind(0.0, 1.0, 0.0, 1.0); 41 42 ## Draw the grid using plbox */ 43 44 plbox("bcg", 0.1, 0, "bcg", 0.1, 0); 45 46 ## Write the digits below the frame */ 47 48 plcol0(15); 49 for i=0:9 50 text=sprintf("%d", i); 51 plmtex("b", 1.5, (0.1 * i + 0.05), 0.5, text); 52 endfor 53 54 k = 0; 55 for i=0:9 56 57 ## Write the digits to the left of the frame */ 58 59 text=sprintf("%d", base(l+1) + 10 * i); 60 plmtex("lv", 1.0, (0.95 - 0.1 * i), 1.0, text); 61 for j=0:9 62 x = 0.1 * j + 0.05; 63 y = 0.95 - 0.1 * i; 64 65 ## Display the symbols */ 66 67 plsym(x, y, base(l+1) + k); 68 k = k + 1; 69 endfor 70 endfor 71 72 if ( l < 2 ) 73 plmtex("t", 1.5, 0.5, 0.5, "PLplot Example 7 - PLSYM symbols (compact)"); 74 else 75 plmtex("t", 1.5, 0.5, 0.5, "PLplot Example 7 - PLSYM symbols (extended)"); 76 endif 77 endfor 78 plend1(); 79endfunction 80