Page 1 of 1
SharpPlot, Formatting numbers, Arrangement of the labels
Posted: Wed Dec 16, 2020 4:09 pm
by Leo
[The extension dws has been deactivated and can no longer be displayed.]
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
Re: SharpPlot, Formatting numbers, Arrangement of the labels
Posted: Tue Dec 22, 2020 8:11 am
by Michael|Dyalog
Hi Leo,
#1: I'm not sure how to do that - I asked an expert to come and help...
#2:
should do that.
Viele Grüße! ;)
Michael
Re: SharpPlot, Formatting numbers, Arrangement of the labels
Posted: Tue Dec 22, 2020 3:19 pm
by Leo
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
Re: SharpPlot, Formatting numbers, Arrangement of the labels
Posted: Tue Dec 22, 2020 3:37 pm
by Michael|Dyalog
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 ;)
Re: SharpPlot, Formatting numbers, Arrangement of the labels
Posted: Wed Dec 23, 2020 2:12 pm
by Leo
Hi Michael,
the command did not work and there was no error message.
Greetings Leo
Re: SharpPlot, Formatting numbers, Arrangement of the labels
Posted: Mon Jan 04, 2021 3:36 pm
by Nicolas|Dyalog
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.
Re: SharpPlot, Formatting numbers, Arrangement of the labels
Posted: Thu Jan 07, 2021 10:29 am
by Leo
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
Re: SharpPlot, Formatting numbers, Arrangement of the labels
Posted: Thu Jan 07, 2021 10:53 am
by Michael|Dyalog
Hi Leo,
2) there is a small problem in your code: KeyStyles.(something
Good luck!
Michael
Re: SharpPlot, Formatting numbers, Arrangement of the labels
Posted: Thu Jan 07, 2021 1:50 pm
by Leo
Hello Nic and Michael,
now everything is OK.
Thank you and best regards
Leo