SharpPlot-Command sp.Heading

General APL language issues

SharpPlot-Command sp.Heading

Postby Leo on Wed Jul 11, 2018 12:33 pm

Hello Dyalog APL specialists

The SharpPlot command
      sp.Heading ← 'This is the Heading'
is working.
My Question: What should the sp.Heading command look like if the text heading is stored as a vector in the script as in the following example?
      text ← 'This is the Heading'
sp.Heading ...... text ......... ???

Thanks for the help in advance!

Greeting Leo
Leo
 
Posts: 38
Joined: Mon Sep 18, 2017 12:10 pm

Re: SharpPlot-Command sp.Heading

Postby Vince|Dyalog on Thu Jul 12, 2018 8:59 am

Hi Leo,

I think it is just this:

sp.Heading ← text

Regards,

Vince
Vince|Dyalog
 
Posts: 408
Joined: Wed Oct 01, 2008 9:39 am

Re: SharpPlot-Command sp.Heading

Postby Leo on Thu Jul 12, 2018 1:06 pm

Hello Vince,
this command leads to a domain error
      DOMAIN ERROR
ProfDunPlot[38] sp.Heading←Text

Regards
Leo
Leo
 
Posts: 38
Joined: Mon Sep 18, 2017 12:10 pm

Re: SharpPlot-Command sp.Heading

Postby Leo on Fri Jul 13, 2018 12:33 pm

Hello Vince,
if you add the statement with the format symbol, then it works
      [4]    tex0←DPXYY[1;1]       ⍝ Nested Martix

[38] sp.Heading←⍕tex0

Best regards and thanks
Leo
Leo
 
Posts: 38
Joined: Mon Sep 18, 2017 12:10 pm

Re: SharpPlot-Command sp.Heading

Postby AndyS|Dyalog on Tue Jul 17, 2018 1:33 pm

Hi Leo

How about
      tex0←⊃DPXYY[1;1]     ⍝ or txt0←(⊂1 1)⊃DPXYY  or even tex0←⊃DPXX

If the heading is the first element of the array DPXYY then it's not a simple character vector, which is what sp.Heading should be .. DPXYY[1;1] is enclose of a simple character vector ..

Regards
Andy
User avatar
AndyS|Dyalog
 
Posts: 257
Joined: Tue May 12, 2009 6:06 pm

Re: SharpPlot-Command sp.Heading

Postby Leo on Wed Jul 18, 2018 3:33 pm

Hello Andy,
I have tried your three suggestions. They all all worked in the ScharpPlot function for sp.Heading
      tex0 ← ⊃DPXYY [1;1]  	⍝ Tipp 1
txt0 ← (⊂1 1) ⊃DPXYY ⍝ Tipp 2
tex0 ← ⊃DPXYY ⍝ Tipp 3

sp.Heading←tex1

Thanks for the tips and best regards
Leo
Leo
 
Posts: 38
Joined: Mon Sep 18, 2017 12:10 pm


Return to Language

Who is online

Users browsing this forum: No registered users and 1 guest