up [pdf]
from rsf.proj import *

Flow('data1',None,'spike n1=30 k1=15 label1=" " ')
Flow('data2','data1','causint')
Flow('data3','data1','causint adj=y')

Flow('data4',None,'spike n1=30 nsp=2 k1=10,15 mag=1,-1 label1=" " ')
Flow('data5','data4','causint')
Flow('data6','data4','causint adj=y')
Flow('data7','data5','causint')

data = []
for i in range(1,8):
    data.append('data%d' % i)

Result('causint',data,
       '''cat axis=2 ${SOURCES[1:%d]} |
       dots labels="in1:C in1:C\` in1:in2:C in2:C\` in2:CC in2"
       labelsz=10 yreverse=1 overlap=.8 constsep=1 connect=0
       ''' % len(data))

Flow('tdata1',None,'spike n1=31 k1=6,16,26 nsp=3 mag=-1,2,-1 label1=" "')
Flow('tdata2','tdata1','causint')
Flow('tdata3','tdata2','causint adj=y')

tdata = []
for i in range(1,4):
    tdata.append('tdata%d' % i)

Result('triangle',tdata,
       '''cat axis=2 ${SOURCES[1:%d]} |
       dots labels="in:C in:C\`C in"
       labelsz=10 yreverse=1 overlap=.8 connect=0
       screenratio=0.5 screenht=5
       ''' % len(tdata))

###########################################################################
End()

sfspike
sfcausint
sfcat
sfdots