home *** CD-ROM | disk | FTP | other *** search
/ The Pier Shareware 6 / The_Pier_Shareware_Number_6_(The_Pier_Exchange)_(1995).iso / 035 / splot122.zip / DEMO / SYMBOL.SPT < prev    next >
Text File  |  1994-07-07  |  915b  |  35 lines

  1. /* This demo file shows the available symbols */  
  2. /* which can be used for data points. Symbols names */
  3. /* equating to the numerical constants are defined */
  4. /* in splot.h */
  5.  
  6. #include <splot.h>
  7. main()
  8.    {
  9.    int i;
  10.    /* make the symbols large. Since they are just a special font */
  11.    /* make the fontwidth large. */
  12.    set(FONTWIDTH,4);
  13.    /* change the symbol orientation just for fun */
  14.    set(FONTDIR,30);
  15.    moveto(1,1);
  16.    /* show all 17 symbols in a diagonal line */
  17.    for (i = 0;i < 17;i++)
  18.       {
  19.       /* use a relative move here */ 
  20.       rmoveto(1,1);   
  21.       symbol(i);
  22.       }
  23.    /* try other form of symbol */
  24.    set(SYMMULT,2);
  25.    symbol(4,12,OSTAR);
  26.    set(SYMMULT,0.5);
  27.    /* add some extra arrows to illustrate the */
  28.    /* arrowto() function */
  29.    moveto(3.82,17.19);
  30.    arrowto(7.96,15.68);
  31.    arrowto(10.21,19.72);
  32.    rarrowto(3,0);
  33.    stroke();
  34.    }
  35.