Unfortunately, the only solution I'd know for that would be "Ktype" from RainPro - and that is not supported with SharpPlot, so I'm at the end of my rope. Hopefully someone else can jump in...!
BTW, I've edited your fn just a little bit to make it a bit more compact etc:
Code: Select all
stu;⎕IO;n;h;v;mat
v←(32?32)÷32 ⍝ Fake data for testing
h←(32?32)÷32 ⍝ Fake data for testing
⎕IO←1
⍝ diff←(⍴v)-⍴h
⍝ :If diff=0 ⍝ v and h are of the same length
⍝ n←⍴v
⍝ :ElseIf diff>0 ⍝ v is longer
⍝ n←⍴v
⍝ h←n↑h
⍝ :Else ⍝ h is longer
⍝ n←⍴h
⍝ v←n↑v
⍝ :EndIf
n←⍴v ⋄ diff←n-⍴h
:If n>⍴h
h←n↑h
:Elseif n<⍴h ⍝ h is longer
n←⍴h
v←n↑v
:EndIf
mat←(⍳n)⍪v,[0.5]h
ch.DefineFont'GA' 'Garamond'
ch.New 0 0 432 300
ch.Set'DStyle' 'Rows'
ch.Set('style' 'XYPLOT,BOXED,NOMARK,SURFACE,GRID')('Mleft' 25)('Mright' 24)('HMAR' 50 24)
ch.Set'Ystyle' 'LEFT'
ch.Set('Hfont' 'GABI,12')('Lfont' 'GA')
ch.Set('XRANGE' 0(⌈/mat[1;]))('YRANGE' 0((⌈/mat[2;])⌈(⌈/mat[3;])))
ch.Set('PATTERN' 0)
ch.Set'HEAD' 'Correlation'
ch.Set'KeyText' 'Vertical,Horizontal'
ch.Set'Ktype' 'Line,Line' ⍝ not supported
ch.Plot mat
PG←ch.Close
View PG