Gnuplot Easy Lover : Unified IPC Framework for Gnuplot
c_me='bio.pchart.combi.data.map.one';this='Data.Map.pChart ';An_min=1;is_vert=1
c_me_common='bio.pchart.combi.data.map'
#
# Init ######################################
if(!exists('X_DEF')){load '.\Service\Set_00.inc'; if(is_err){ERR_X=$FN_Error(is_err,GPVAL_LINENO);exit status ERR_X}}
if(X_DEF<1){load serv_path.'Set_1_T.inc';if(is_err){ERR_X=$FN_Error(is_err,GPVAL_LINENO);exit status ERR_X}}
#
if(X_DEF<2){
load serv_path.'Set_2_D.inc';if(is_err){ERR_X=$FN_Error(is_err,GPVAL_LINENO);exit status ERR_X}
#
max_lovers=4;array LV_name[max_lovers];array LV_exe[max_lovers];array LV_code[max_lovers]
LV_name[1]='Cscript';LV_exe[1] ='c:\windows\system32\cscript /nologo' #'c:\windows\syswow64\cscript /nologo'
LV_code[1]='rnd_1.vbs'
LV_name[2]='Python';LV_exe[2] = 'C:\..\AppData\Local\Programs\Thonny\python.exe' #'C:\WPy64-3940\python-3.9.4.amd64\python.exe'
LV_code[2]='rnd_1.py'
LV_name[3]='R Lang';LV_exe[3] ='C:\R\R-4.1.3\bin\RScript.exe' #.' --no-init-file' #--no-environ'
LV_code[3]='rnd_1.r'
LV_name[4]='Julia';LV_exe[4] ='C:\Julia\bin\julia.exe'.' --history-file=no --banner=no --color=no --'
LV_code[4]='rnd_1.jl'
}
if (X_DEF<3){load c_me_common.'.prepro.inc'}
#
# Lover's module ############################
#
Translate_To(to,var)=sprintf("%s=value('%s')>=0.5?1:0",to,var) # translate to 0 or 1
#
function $FN_Associate(v) << EOF #associate the proper strings to lover value
if(strlen(v)){if(v eq 'K_F1'){p_s0='light palette';p_s1='dark palette'}else{p_s0='draw points';p_s1='draw lines'}}
return v
EOF
#
function $FN_Set_Lover(l) << EOF
lover_is=LV_name[l]; X_LOVER=LV_exe[l];lover_code=d_quote(my_path.'LoversCode\'.LV_code[l])
return l
EOF
if (!exist('lover')){lover=1; lover=$FN_Set_Lover(lover)}
#
# Plot main module ##########################
load c_me_common.'.core.inc' # standard (gnu) plot code
load serv_path.'Set_Lover_mode_one.inc' # set Lover interface mode
#
# Final module ##############################
if(X_MODE==0){ # interactive mode only
#
set mouse;
# Standard keys
load serv_path.'Set_Bind.inc'
bind "e" sprintf('!start %s %s',serv_path."notepad++.vbs", r_me); # edit me using notepad++
bind "E" sprintf('!start %s %s',serv_path."vscode.vbs", r_me); # edit me using vscode
bind "C" "@Set_Time;undefine X_DEF;load r_me" # restart cleaning all
bind "Home" "@Set_Time;X_DEF=3;load r_me" # redraw with last memory set
bind "F1" "@Set_Time;undefine lover_var;K_F1=K_F1+1;X_DEF=3;load r_me" # F1 set mode (light or dark palette) pressing key
bind "F2" "@Set_Time;undefine lover_var;K_F2=K_F2+1;X_DEF=3;load r_me" # F2 set mode (points or lines) pressing key
#
# Lover's keys
bind "m" sprintf('!start %s %s',serv_path."vlc.vbs",d_quote(serv_path."03_Easy_Lover.wma")) # play
bind "r" "undefine lover_var;@Set_Time;X_DEF=3;load r_me" # redraw me resetting lover_var (if any)
bind "+" "lover=lover+1;if(lover>max_lovers){lover=1};dd=$FN_Set_Lover(lover);pause -1 'Now my lover is '.lover_is.sprintf(' [%.0f]',lover);undefine lover_var;@Set_Time;X_DEF=3;load r_me"
bind "-" "lover=lover-1;if(lover<1){lover=max_lovers};dd=$FN_Set_Lover(lover);pause -1 'Now my lover is '.lover_is.sprintf(' [%.0f]',lover);undefine lover_var;@Set_Time;X_DEF=3;load r_me"
#
bind "1" "to_var=$FN_Associate('K_F1');p_nr=0;eval($FN_Call_Lover(lover_code))" # random F1 set (one step by lover's code)
bind "2" "to_var=$FN_Associate('K_F2');p_nr=0;eval($FN_Call_Lover(lover_code))" # random F2 set (one step by lover's code)
#
# Cycle - One var loop
cycle_wait=0.000
bind "Right" "to_var=$FN_Associate('K_F1');do for[ii=1:100]{p_nr=ii;eval($FN_Call_Lover(lover_code));pause cycle_wait}" # random F1 set
bind "Left" "to_var=$FN_Associate('K_F2');do for[ii=1:100]{p_nr=ii;eval($FN_Call_Lover(lover_code));pause cycle_wait}" # random F2 set
# Cycle - Two vars loop: the first var by Lover's code and the second var by Gnuplot code (see dummy var)
bind "Up" "to_var=$FN_Associate('K_F1');do for[ii=1:100]{p_nr=ii;dummy=rand(0);eval(Translate_To('K_F2','dummy'));eval($FN_Call_Lover(lover_code));pause cycle_wait}"
bind "Down" "to_var=$FN_Associate('K_F2');do for[ii=1:100]{p_nr=ii;dummy=rand(0);eval(Translate_To('K_F1','dummy'));eval($FN_Call_Lover(lover_code));pause cycle_wait}"
}
#######################################################
Basically the same template code for 'bio.plot.summary.pal.one' and 'bio.plot.T.Sign.one' ArrayEXplorerCode examples.
c_me='bio.plot.summary.pal.one';this='Summary.PaletteColor.Plot ';An_min=4
c_me_common='bio.plot.summary.pal'
#
# Init ######################################
if(!exists('X_DEF')){load '.\Service\Set_00.inc'; if(is_err){ERR_X=$FN_Error(is_err,GPVAL_LINENO);exit status ERR_X}}
if(X_DEF<1){load serv_path.'Set_1_T.inc';if(is_err){ERR_X=$FN_Error(is_err,GPVAL_LINENO);exit status ERR_X}}
#
if(X_DEF<2){
load serv_path.'Set_2_D.inc';if(is_err){ERR_X=$FN_Error(is_err,GPVAL_LINENO);exit status ERR_X}
#
max_lovers=4;array LV_name[max_lovers];array LV_exe[max_lovers];array LV_code[max_lovers]
LV_name[1]='Cscript';LV_exe[1] ='c:\windows\system32\cscript /nologo' #'c:\windows\syswow64\cscript /nologo'
LV_code[1]='rnd_1.vbs'
LV_name[2]='Python';LV_exe[2] = 'C:\..\AppData\Local\Programs\Thonny\python.exe' #'C:\WPy64-3940\python-3.9.4.amd64\python.exe'
LV_code[2]='rnd_1.py'
LV_name[3]='R Lang';LV_exe[3] ='C:\R\R-4.1.3\bin\RScript.exe' #.' --no-init-file' #--no-environ'
LV_code[3]='rnd_1.r'
LV_name[4]='Julia';LV_exe[4] ='C:\Julia\bin\julia.exe'.' --history-file=no --banner=no --color=no --'
LV_code[4]='rnd_1.jl'
}
if (X_DEF<3){load c_me_common.'.prepro.inc'}
#
# Lover's module ############################
#
Translate_To(to,var)=sprintf("%s=value('%s')>=0.5?1:0",to,var) # translate to 0 or 1
#
function $FN_Associate(v) << EOF #associate the proper strings to julia value
if(strlen(v)){if(v eq 'K_F1'){p_s0='light palette';p_s1='dark palette'}else{p_s0='min-max rule';p_s1='coef.var rule'}}
return v
EOF
#
function $FN_Set_Lover(l) << EOF
lover_is=LV_name[l]; X_LOVER=LV_exe[l];lover_code=d_quote(my_path.'LoversCode\'.LV_code[l])
return l
EOF
if (!exist('lover')){lover=1; lover=$FN_Set_Lover(lover)}
#
# Plot main module ##########################
load c_me_common.'.core.inc' # standard (gnu) plot code
load serv_path.'Set_Lover_mode_one.inc' # set Lover interface mode
#
# Final module ##############################
if(X_MODE==0){ # interactive mode only
#
#set mouse; # unused
# Standard keys
load serv_path.'Set_Bind.inc'
bind "e" sprintf('!start %s %s',serv_path."notepad++.vbs", r_me); # edit me using notepad++
bind "E" sprintf('!start %s %s',serv_path."vscode.vbs", r_me); # edit me using vscode
bind "C" "@Set_Time;undefine X_DEF;load r_me" # restart cleaning all
bind "Home" "@Set_Time;X_DEF=3;load r_me" # redraw with last memory set
bind "F1" "@Set_Time;undefine lover_var;K_F1=K_F1+1;X_DEF=3;load r_me" # F1 set mode (light or dark palette) pressing key
bind "F2" "@Set_Time;undefine lover_var;K_F2=K_F2+1;X_DEF=3;load r_me" # F2 set mode (min-max or coef.var rule) pressing key
#
# Lover's keys
bind "m" sprintf('!start %s %s',serv_path."vlc.vbs",d_quote(serv_path."03_Easy_Lover.wma")) # play
bind "r" "undefine lover_var;@Set_Time;X_DEF=3;load r_me" # redraw me resetting lover_var (if any)
bind "+" "lover=lover+1;if(lover>max_lovers){lover=1};dd=$FN_Set_Lover(lover);pause -1 'Now my lover is '.lover_is.sprintf(' [%.0f]',lover);undefine lover_var;@Set_Time;X_DEF=3;load r_me"
bind "-" "lover=lover-1;if(lover<1){lover=max_lovers};dd=$FN_Set_Lover(lover);pause -1 'Now my lover is '.lover_is.sprintf(' [%.0f]',lover);undefine lover_var;@Set_Time;X_DEF=3;load r_me"
#
bind "1" "to_var=$FN_Associate('K_F1');p_nr=0;eval($FN_Call_Lover(lover_code))" # random F1 set (one step by lover's code)
bind "2" "to_var=$FN_Associate('K_F2');p_nr=0;eval($FN_Call_Lover(lover_code))" # random F2 set (one step by lover's code)
#
# Cycle - One var loop
cycle_wait=0.000
bind "Right" "to_var=$FN_Associate('K_F1');do for[ii=1:100]{p_nr=ii;eval($FN_Call_Lover(lover_code));pause cycle_wait}" # random F1 set
bind "Left" "to_var=$FN_Associate('K_F2');do for[ii=1:100]{p_nr=ii;eval($FN_Call_Lover(lover_code));pause cycle_wait}" # random F2 set
# Cycle - Two vars loop: the first var by Lover's code and the second var by Gnuplot code (see dummy var)
bind "Up" "to_var=$FN_Associate('K_F1');do for[ii=1:100]{p_nr=ii;dummy=rand(0);eval(Translate_To('K_F2','dummy'));eval($FN_Call_Lover(lover_code));pause cycle_wait}"
bind "Down" "to_var=$FN_Associate('K_F2');do for[ii=1:100]{p_nr=ii;dummy=rand(0);eval(Translate_To('K_F1','dummy'));eval($FN_Call_Lover(lover_code));pause cycle_wait}"
}
#######################################################
The main difference is c_me_common='bio.plot.summary.pal' vs c_me_common='bio.plot.T.Sign' (i.e. your (gnu)plot code).
c_me='bio.plot.T.Sign.one';this='T.Signal.Plot ';An_min=8
c_me_common='bio.plot.T.Sign'
#
# Init ######################################
if(!exists('X_DEF')){load '.\Service\Set_00.inc'; if(is_err){ERR_X=$FN_Error(is_err,GPVAL_LINENO);exit status ERR_X}}
if(X_DEF<1){load serv_path.'Set_1_T.inc';if(is_err){ERR_X=$FN_Error(is_err,GPVAL_LINENO);exit status ERR_X}}
#
if(X_DEF<2){
load serv_path.'Set_2_D.inc';if(is_err){ERR_X=$FN_Error(is_err,GPVAL_LINENO);exit status ERR_X}
#
max_lovers=4;array LV_name[max_lovers];array LV_exe[max_lovers];array LV_code[max_lovers]
LV_name[1]='Cscript';LV_exe[1] ='c:\windows\system32\cscript /nologo' #'c:\windows\syswow64\cscript /nologo'
LV_code[1]='rnd_1.vbs'
LV_name[2]='Python';LV_exe[2] = 'C:\..\AppData\Local\Programs\Thonny\python.exe' #'C:\WPy64-3940\python-3.9.4.amd64\python.exe'
LV_code[2]='rnd_1.py'
LV_name[3]='R Lang';LV_exe[3] ='C:\R\R-4.1.3\bin\RScript.exe' #.' --no-init-file' #--no-environ'
LV_code[3]='rnd_1.r'
LV_name[4]='Julia';LV_exe[4] ='C:\Julia\bin\julia.exe'.' --history-file=no --banner=no --color=no --'
LV_code[4]='rnd_1.jl'
}
if (X_DEF<3){load c_me_common.'.prepro.inc'}
#
# Lover's module ############################
#
Translate_To(to,var)=sprintf("%s=value('%s')>=0.5?1:0",to,var) # translate to 0 or 1
#
function $FN_Associate(v) << EOF #associate the proper strings to julia value
if(strlen(v)){if(v eq 'K_F1'){p_s0='relative to ..';p_s1='absolute'}else{p_s0='';p_s1=''}}
return v
EOF
#
function $FN_Set_Lover(l) << EOF
lover_is=LV_name[l]; X_LOVER=LV_exe[l];lover_code=d_quote(my_path.'LoversCode\'.LV_code[l])
return l
EOF
if (!exist('lover')){lover=1; lover=$FN_Set_Lover(lover)}
#
# Plot main module ##########################
load c_me_common.'.core.inc' # standard (gnu) plot code
load serv_path.'Set_Lover_mode_one.inc' # set Lover interface mode
#
# Final module ##############################
if(X_MODE==0){ # interactive mode only
#
#set mouse; # unused
# Standard keys
load serv_path.'Set_Bind.inc'
bind "e" sprintf('!start %s %s',serv_path."notepad++.vbs", r_me); # edit me using notepad++
bind "E" sprintf('!start %s %s',serv_path."vscode.vbs", r_me); # edit me using vscode
bind "C" "@Set_Time;undefine X_DEF;load r_me" # restart cleaning all
bind "Home" "@Set_Time;X_DEF=3;load r_me" # redraw with last memory set
bind "F1" "@Set_Time;undefine lover_var;K_F1=K_F1+1;X_DEF=3;load r_me" # F1 set mode (relative or absolute) pressing key
#
# Lover's keys
bind "m" sprintf('!start %s %s',serv_path."vlc.vbs",d_quote(serv_path."03_Easy_Lover.wma")) # play
bind "r" "undefine lover_var;@Set_Time;X_DEF=3;load r_me" # redraw me resetting lover_var (if any)
bind "+" "lover=lover+1;if(lover>max_lovers){lover=1};dd=$FN_Set_Lover(lover);pause -1 'Now my lover is '.lover_is.sprintf(' [%.0f]',lover);undefine lover_var;@Set_Time;X_DEF=3;load r_me"
bind "-" "lover=lover-1;if(lover<1){lover=max_lovers};dd=$FN_Set_Lover(lover);pause -1 'Now my lover is '.lover_is.sprintf(' [%.0f]',lover);undefine lover_var;@Set_Time;X_DEF=3;load r_me"
#
bind "1" "to_var=$FN_Associate('K_F1');p_nr=0;eval($FN_Call_Lover(lover_code))" # random F1 set (one step by lover's code)
#
# Cycle - One var loop
cycle_wait=0.000
bind "Right" "to_var=$FN_Associate('K_F1');do for[ii=1:100]{p_nr=ii;eval($FN_Call_Lover(lover_code));pause cycle_wait}" # random F1 set
# Cycle - Two vars loop: the first var by Lover's code and the second var by Gnuplot code (see dummy var)
bind "Up" "to_var=$FN_Associate('K_F1');do for[ii=1:100]{p_nr=ii;dummy=rand(0);eval(Translate_To('K_F2','dummy'));eval($FN_Call_Lover(lover_code));pause cycle_wait}"
}
#######################################################
ArrayEXplorerCode : Get more from every DataLog
Simply, ... 'stay tuned' ...