plots.ijs

Script: ~addons/finance/finexec/toolbox/plots.ijs
Contrinutor: William Szuch
Updated: 2022 6 26
Depend: ~addons/graphics/plot.ijs
Definitions: loaded to locale base
Status: done
Script source: plot.ijs

Definitions for using the plot in Jqt and JHS.
Further details about plot see: JWiki Plot

Definitions

P plotfn, plotjhsshow, plotkeys, plotlink, plotm, plotnone, plotshow, plotsize, plotsizedefault

plotfn (adverb)

Form explicit

Plot the results from a function/defiition.

Syntax

(f)plotfn(X)
f = function/definition
X = values inputed to f

Example

  f =: %:
  f plotfn i. 10
  f plotfn 10 + i. 10
   sin plotfn i. 100
  fz =: (*: @: (+/\ @: sin))
  fz plotfn i. 100
  (sin,:cos) plotfn(0.1*i.100)

plotjhsshow (monad)

Form explicit
Only for JHS.
Show plot in window plot ie: ~temp/plot.html.

Syntax

plotjhsshow(P) y

Example

   plotjhsshow(~temp/plot.html)

plotkeys (monad)

Form tacit
Set up the keys for a plot.

Syntax

plotkeys(L)
L = list of boxed labels for the plot

Example

   plotkeys('ABC')
  (plotkeys('ABC'))  plot i. 10
   plotkeys('ABC';'EFG')
   plotkeys('ABC';'DEF';'EFGAA')
   plotkeys('QxM';'ALT_2010_12_F')
Form explicit
Only for JHS.
Show the plot in a link.

Syntax

plotlink(W,H)
W = width in pixcels
H = height in piscels

Example

   plotlink(300 300)
The try:
   plot(i. 10)

plotm (verb)

Form explicit
Allow for multiple plots in Qt.
Move plot window as required to show multiple plots.

Syntax

 plotm - as for plot

Example

  plotm i. 123
  plotm *: i. 123
  'title ASD' plotm *: i. 123
  plotm each (i.10);(i.100);(%: i. 100)    NB. 3 plots
  ('title P1'plotm i. 10); ('title P2'plotm %: i. 100)  NB. 2 plots

plotnone (monad)

Form explicit
Only for JHS.
Create plot in ~temp/plot.html.

Syntax

plotnone(W,H)
W = width in pixcels
H = height in piscels

Example

   plotnone(300 300)
The try:
   plot(i. 10)

plotshow (monad)

Form explicit
Only for JHS.
Show the plot in a new tab plot.

Syntax

plotshow(W,H)
W = width in pixcels
H = height in piscels

Example

   plotshow(300 300)
The try:
   plot(i. 10)

plotsize (monad)

Form explicit
Only for JHS.
Change the size of the plot in the Execution Window
for subsequent plots.
Default setting in pixcels: W =500,H = 400

Syntax

plotsize(W,H)
W = width in pixcels
H = height in piscels

Example

   plotsize(300 300)
The try:
   plot(i. 10)

plotsizedefault (monad)

Form explicit
Only for JHS
set default plot size
size attributes for subsequent plots

Syntax

plotsizedefault ''