[BACK]Return to gnuplot.sm1 CVS log [TXT][DIR] Up to [local] / OpenXM / src / kan96xx / Doc

Diff for /OpenXM/src/kan96xx/Doc/gnuplot.sm1 between version 1.1 and 1.8

version 1.1, 1999/10/08 02:12:02 version 1.8, 2005/02/04 11:25:45
Line 1 
Line 1 
   %$OpenXM: OpenXM/src/kan96xx/Doc/gnuplot.sm1,v 1.7 2004/12/21 03:25:04 takayama Exp $
 %%% 1999, 6/7 Mon.  %%% 1999, 6/7 Mon.
 [(parse) (ox.sm1) pushfile] extension  [(parse) (ox.sm1) pushfile] extension
 %%/plot.gnuplotexec (/home/nobuki/openXM/src/gnuplot-3.5beta6.347.orig/gnuplot)  
 %% def  
 [(getenv) (OpenXM_HOME)] extension /OpenXM_HOME set  [(getenv) (OpenXM_HOME)] extension /OpenXM_HOME set
   
 %% [(gnuplot_forox)] getPathNameSm1 /plot.gnuplotexec set  [OpenXM_HOME (/bin/gnuplot)] cat /plot.gnuplotexec set
 [OpenXM_HOME (/bin/gnuplot_forox)] cat /plot.gnuplotexec set  %(gnuplot) /plot.gnuplotexec set
   
 (SSkan/lib/plot.sm1 for ox_sm1_gnuplot.  1999/09/03. ) message  (SSkan/lib/plot.sm1 for ox_sm1_gnuplot.  1999/09/03. ) message
   
   /gnuplot.callingMethod 1 def  % 0 : old, 1 : pipe, 2: file
   % If your gnuplot is version 3, then set the callingMethod to 0.
   
 /plotstart {  /plotstart {
   sm1connectr    sm1connectr
   ox.ccc 1 copy /gnuplot.ccc set    ox.ccc 1 copy /gnuplot.ccc set
Line 19 
Line 21 
 } def  } def
   
 /plotstart.aux {  /plotstart.aux {
     {
       gnuplot.callingMethod 0 eq {
         plotstart.aux.0
       } { } ifelse
       gnuplot.callingMethod 1 eq {
         plotstart.aux.1
       } { } ifelse
       gnuplot.callingMethod 2 eq {
         (Not yet implemented.) error
       } { } ifelse
       exit
     } loop
   } def
   /plotstart.aux.0 {
   /peer [(oxGetPort) (localhost)] extension def    /peer [(oxGetPort) (localhost)] extension def
   [(sm1.socket) (close) [peer 2 get]] extension  %% close the second.    [(sm1.socket) (close) [peer 2 get]] extension  %% close the second.
   /myport peer 1 get def    /myport peer 1 get def
Line 40 
Line 56 
   gnuplot.ff2 message    gnuplot.ff2 message
 } def  } def
   
   /plotstart.aux.1 {
       [(getUniqueFileName) (/tmp/gnuplot.fifo.tmp)] extension /gnuplot.fifo set
       [(fp2mkfifo) gnuplot.fifo]  extension /gnuplot.status set
   
       gnuplot.status -1 eq {
          (Warning: mkfifo failed.) message
       } { } ifelse
   
       gnuplot.fifo message
       [(fp2popen) plot.gnuplotexec (w)] extension /gnuplot.pfp set
       (Started gnuplot) message
   
       [(fp2fputs) [(set print ") gnuplot.fifo (" ; ) nl ] cat
        gnuplot.pfp ] extension message
       [(fp2fflush) gnuplot.pfp] extension message
       [(fp2fputs) [(set mouse ; ) nl ] cat gnuplot.pfp ] extension message
       [(fp2fflush) gnuplot.pfp] extension message
   
       [(fp2fopen) gnuplot.fifo (r)] extension /gnuplot.fifoFp set
       % This must be the last. Otherwise, fopen is blocked.
       % When mkfifo fails, then gnuplot.fifoFp will be null. (old cygwin)
       /gnuplot.pid -2 def  % dummy.
       gnuplot.pid message
   } def
   
   /plotstop {
     gnuplot.ccc $ plotstop.aux $ oxsubmit
   } def
   
   /plotstop.aux {
     {
       gnuplot.callingMethod 0 eq {
         plotstop.aux.0
       } { } ifelse
       gnuplot.callingMethod 1 eq {
         plotstop.aux.1
       } { } ifelse
       gnuplot.callingMethod 2 eq {
         (Not yet implemented.) error
       } { } ifelse
       exit
     } loop
   } def
   
   /plotstop.aux.0 { } def
   /plotstop.aux.1 {
     [(fp2fclose) gnuplot.pfp] extension pop
     gnuplot.fifoFp tag 0 eq { }
     {
       [(fp2fclose) gnuplot.fifoFp] extension pop
     } ifelse
     % [(rm) gnuplot.fifo] oxshell pop % It  is OS dependent.
     [(unlink) gnuplot.fifo] extension
   } def
   
   
 /gnuplot {  /gnuplot {
     {
       gnuplot.callingMethod 0 eq {
         gnuplot.0
       } { } ifelse
       gnuplot.callingMethod 1 eq {
         gnuplot.1
       } { } ifelse
       gnuplot.callingMethod 2 eq {
         (Not yet implemented.) error
       } { } ifelse
       exit
     } loop
   } def
   
   /gnuplot.0 {
   /cccc set    /cccc set
   /fd gnuplot.ff2 0 get def    /fd gnuplot.ff2 0 get def
   [(sm1.socket) (write) [fd    [(sm1.socket) (write) [fd
     [cccc 10 (string) dc] cat]] extension      [cccc 10 (string) dc] cat]] extension
 } def  } def
   
   /gnuplot.1 {
     /cccc set
     gnuplot.read.1
     [(fp2fputs) [cccc nl] cat gnuplot.pfp] extension pop
     [(fp2fflush) gnuplot.pfp] extension pop
     gnuplot.read.1
   } def
   
 %% (plot sin(x);) gnuplot  %% (plot sin(x);) gnuplot
   
   
   /gnuplot.read.1 {
    [
     gnuplot.fifoFp tag 0 eq { }
     {
      {
       [(fp2select) gnuplot.fifoFp 0] extension 1 eq {
         [(fp2fgetc) gnuplot.fifoFp] extension
       } {  exit } ifelse
      } loop
     } ifelse
    ] { (string) dc } map cat
   } def
   
 /isAlive {  /isAlive {
     {
       gnuplot.callingMethod 0 eq {
         isAlive.0
       } { } ifelse
       gnuplot.callingMethod 1 eq {
         isAlive.1
       } { } ifelse
       gnuplot.callingMethod 2 eq {
         (Not yet implemented.) error
       } { } ifelse
       exit
     } loop
   } def
   
   /isAlive.0 {
  [/in-isAlive /ans /i /nn] pushVariables   [/in-isAlive /ans /i /nn] pushVariables
  [ [ gnuplot.ccc ([(getchild)] extension ) oxsubmit ] pop   [ [ gnuplot.ccc ([(getchild)] extension ) oxsubmit ] pop
     gnuplot.ccc oxpopcmo /gnuplot.pidList set      gnuplot.ccc oxpopcmo /gnuplot.pidList set
Line 85 
Line 208 
   arg1    arg1
 } def  } def
   
   /isAlive.1 {
     1
   } def
   
 /demo0 {  /demo0 {
   (/u/nobuki/Trash/gnuplot-3.5beta6.347.orig/demo/airfoil.dem) pushfile /ff set    (/u/nobuki/Trash/gnuplot-3.5beta6.347.orig/demo/airfoil.dem) pushfile /ff set
   ff gnuplot    ff gnuplot
Line 116 
Line 243 
   
   
 $plotstart ;   (plot sin(x);) rplot$ message  $plotstart ;   (plot sin(x);) rplot$ message
   $plotstart.aux ; (splot x**2-y**2;) gnuplot $ message

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.8

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>