>> << Ndx Usr Pri Phr Dic Rel Voc !: wd Help User

# Plot Class

Plot is defined in class `jzplot`.

Public verbs are `pd` and `plot`.

Public nouns specify the Windows form and isigraph control id, where these differ from the default plot.

Name | Description | Default
`PForm` | form handle | `plot`
`PFormhwnd` | form handle | defined when the form is created
`PId` | isigraph control id | `gs`

Example: create two plots

The following draws two independent plots:

    load 'jzplot'          NB. load plot class

    a=: conew 'jzplot'     NB. create plot object a
    b=. conew 'jzplot'     NB. create plot object b
    plot__a */~ i.20       NB. draw plot in a

    plot__b +./~ i.20      NB. draw plot in b

Example: add plot to a form

In this case, you need to define the public nouns `PForm`, `PFormhwnd` and `PId`. These override the default values.

    load 'jzplot'

    MYPLOT=: 0 : 0
    pc myplot closeok;
    xywh 2 2 125 100;cc g0 isigraph ws_border rightscale bottommove;
    xywh 131 3 34 11;cc close button leftmove rightmove;cn "Close";
    pas 2 2;pcenter;
    rem form end;
    )

    myplot_close_button=: wd bind 'pclose'

    wd MYPLOT

    a=: conew 'jzplot'             NB. create plot object
    PForm__a=: 'myplot'            NB. define PForm in a
    PFormhwnd__a=: wd 'qhwndp'     NB. define PFormhwnd in a
    PId__a=: 'g0'                  NB. define PId in a

    'density' plot__a 7|i.25 25    NB. draw plot on the form

>> << Ndx Usr Pri Phr Dic Rel Voc !: wd Help User