>> << 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 that specify the Windows form and isigraph control id:

Name | Description | Default
`PForm` | form id | `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:15       NB. draw plot in a
    plot__b +./~ i:15      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 0 0 225 200;cc g0 isigraph ws_border rightscale bottommove;
    xywh 231 3 40 12;cc close button leftmove rightmove;cn "Close";
    pas 2 0;pcenter;
    rem form end;
    )

    myplot_close_button=: wd bind 'pclose'

    wd MYPLOT

    loc=: conew 'jzplot'             NB. create plot object
    PForm__loc=: 'myplot'            NB. define PForm in loc
    PFormhwnd__loc=: wd 'qhwndp'     NB. define PFormhwnd in loc
    PId__loc=: 'g0'                  NB. define PId in loc

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

    wd 'pshow'

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