SharpPlot, Formatting numbers, Arrangement of the labels

General APL language issues

SharpPlot, Formatting numbers, Arrangement of the labels

Postby Leo on Wed Dec 16, 2020 4:09 pm

FORUM.dws
(70.84 KiB) Downloaded 98 times
Hello Dyalog APL Forum,
the attachment shows the list of an executable SharpPlot diagram.
Two questions about this:
1. Line [100] (sp.ValueTagFormat ← '## 0.000') shows the formatting of the numerical values for a table in which the numbers of all six columns are formatted the same with 3 decimal places.
My question on this: How must the line command for sp.ValueTagFormat look in APL so that the number formats in the individual columns are executed differently
(e.g. 1st column: ## 0, 2nd column: ## 0.000, 3rd column ## 0.0 etc.)?

2. With the command sp.SetKeyText⊂ ('p_pt') ('⍴_⍴t') ('T_Tt') ('As_A') ('Ma [-]') the associated labels are in a line at the bottom of the page .
Question: How must the command sequence look so that the labels are stacked in a box below the table?

Many thanks in advance for the help!

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

Re: SharpPlot, Formatting numbers, Arrangement of the labels

Postby Michael|Dyalog on Tue Dec 22, 2020 8:11 am

Hi Leo,

#1: I'm not sure how to do that - I asked an expert to come and help...

#2:
Code: Select all
sp.KeyStyle = KeyStyles.Vertical;
should do that.

Viele Grüße! ;)

Michael
Michael|Dyalog
 
Posts: 16
Joined: Thu Mar 02, 2017 4:29 pm

Re: SharpPlot, Formatting numbers, Arrangement of the labels

Postby Leo on Tue Dec 22, 2020 3:19 pm

Thanks Michael,
I have your proposal with the order
      sp.KeyStyle ← KeyStyles.Vertical

added to the program list, but unfortunately it didn't work.
Nevertheless, I thank you for your effort!
and wish you a merry and blessed Christmas.
Leo
Leo
 
Posts: 38
Joined: Mon Sep 18, 2017 12:10 pm

Re: SharpPlot, Formatting numbers, Arrangement of the labels

Postby Michael|Dyalog on Tue Dec 22, 2020 3:37 pm

Hallo Leo,
was heisst denn "didn't work"? Gab's ne Fehlermeldung - oder wurde das im Plot nicht berücksichtigt? Noch ist ja Zeit bis Weihnachten, daher jetzt noch keine Weihnachtswünsche von mir ;)
Michael

Ergänzung: ich hatte einige Probleme mit dem DWS, aber nun konnte ich die Sache nachvollziehen. Mit dem Hinweis auf Keystyle lag ich völlig daneben, sorry - ich hab zu schnell gelesen und es trotzdem missverstanden ;) Hab aber leider auch keine Idee, wie die Dinge zu lösen sind - ich habes Nic eingeladen, mal vorbeizuschauen...;)

Apologies to the english readers - I thought it might be easier to discuss that in german. I'll be sure to post a english summary once we reached a conclusion ;)
Michael|Dyalog
 
Posts: 16
Joined: Thu Mar 02, 2017 4:29 pm

Re: SharpPlot, Formatting numbers, Arrangement of the labels

Postby Leo on Wed Dec 23, 2020 2:12 pm

Hi Michael,
the command did not work and there was no error message.
Greetings Leo
Leo
 
Posts: 38
Joined: Mon Sep 18, 2017 12:10 pm

Re: SharpPlot, Formatting numbers, Arrangement of the labels

Postby Nicolas|Dyalog on Mon Jan 04, 2021 3:36 pm

1. For advanced formatting, you should do it directly in APL, turning each scalar number into a single string.
For example replace
      sp.DrawTable⊂Nr p_pt r_rt T_Tt As_A Ma

with
      sp.DrawTable⊂2 3 4 5 6 7⍕¨¨Nr p_pt r_rt T_Tt As_A Ma


2. Replace
      sp.KeyStyle←KeyStyles.Boxed

with
      sp.KeyStyle←KeyStyles.(Boxed+Vertical+RightAlign+BottomAlign)


Happy new year !
Nic.
Nicolas|Dyalog
 
Posts: 14
Joined: Wed Sep 10, 2008 9:39 am

Re: SharpPlot, Formatting numbers, Arrangement of the labels

Postby Leo on Thu Jan 07, 2021 10:29 am

Hello Nic,
Point 1: Your solution for formatting the values in the table works.
Is a brilliant solution! Many Thanks!

Point 2: The program does not recognize the commands in the footnote (Boxed + Vertical + RightAlign + BottomAlign). I get the following error message:

      VALUE ERROR: Undefined name: BottomAlign
P2A [104] sp.KeyStyle ← KeyStyles (Boxed + Vertical + RightAlign + BottomAlign)

I suspect that my program installation for SharpPlot is faulty.
At this point I have to ask for help again.
Many Greetings!
Leo
Leo
 
Posts: 38
Joined: Mon Sep 18, 2017 12:10 pm

Re: SharpPlot, Formatting numbers, Arrangement of the labels

Postby Michael|Dyalog on Thu Jan 07, 2021 10:53 am

Hi Leo,

2) there is a small problem in your code: KeyStyles.(something

Good luck!

Michael
Michael|Dyalog
 
Posts: 16
Joined: Thu Mar 02, 2017 4:29 pm

Re: SharpPlot, Formatting numbers, Arrangement of the labels

Postby Leo on Thu Jan 07, 2021 1:50 pm

Hello Nic and Michael,
now everything is OK.
Thank you 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