home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / misc / volume8 / gnuplot1.10A / part05 / unixplot.trm < prev    next >
Text File  |  1989-09-09  |  998b  |  80 lines

  1. #define UP_XMAX 4096
  2. #define UP_YMAX 4096
  3.  
  4. #define UP_XLAST (UP_XMAX - 1)
  5. #define UP_YLAST (UP_YMAX - 1)
  6.  
  7. #define UP_VCHAR (UP_YMAX/30)
  8. #define UP_HCHAR (UP_XMAX/72)    /* just a guess--no way to know this! */
  9. #define UP_VTIC (UP_YMAX/80)
  10. #define UP_HTIC (UP_XMAX/80)
  11.  
  12. UP_init()
  13. {
  14.     openpl();
  15.     space(0, 0, UP_XMAX, UP_YMAX);
  16. }
  17.  
  18.  
  19. UP_graphics()
  20. {
  21.     erase();
  22. }
  23.  
  24.  
  25. UP_text()
  26. {
  27. }
  28.  
  29.  
  30. UP_linetype(linetype)
  31. int linetype;
  32. {
  33. static char *lt[2+5] = {"solid", "longdashed", "solid", "dotted","shortdashed",
  34.     "dotdashed", "longdashed"};
  35.  
  36.     if (linetype >= 5)
  37.         linetype %= 5;
  38.     linemod(lt[linetype+2]);
  39. }
  40.  
  41.  
  42. UP_move(x,y)
  43. unsigned int x,y;
  44. {
  45.     move(x,y);
  46. }
  47.  
  48.  
  49. UP_vector(x,y)
  50. unsigned int x,y;
  51. {
  52.     cont(x,y);
  53. }
  54.  
  55.  
  56. UP_lrput_text(row,str)
  57. unsigned int row;
  58. char str[];
  59. {
  60.     move(UP_XMAX - UP_HTIC - UP_HCHAR*(strlen(str)+1),
  61.         UP_VTIC + UP_VCHAR*(row+1));
  62.     label(str);
  63. }
  64.  
  65.  
  66. UP_ulput_text(row,str)
  67. unsigned int row;
  68. char str[];
  69. {
  70.     UP_move(UP_HTIC, UP_YMAX - UP_VTIC - UP_VCHAR*(row+1));
  71.     label(str);
  72. }
  73.  
  74. UP_reset()
  75. {
  76.     closepl();
  77. }
  78.  
  79.  
  80.