Current Page: NeXtMidas Training Macros - Part 2 (Graphics) Plotting and Listing Plotting
- - - | Plotting: While a `PLOT` is up, it is possible to interact with individual layers to change their attributes. The layers are accessible via `reg.<plot_id>.layers.<layer_name>`. Some people like to do this every time:
          set reg.<plot_id>.layers.<layer_name>.color "red"
      Others like to pre-define a handle for the set of layers (usually just after `PLOT` is started) and then use that:
          set mylayers reg.<plot_id>.layers
            ...
          set mylayers.<layer_name>.color "red"
  - `PLOT` has a significant number of messages that it sends out. Inside a macro it is usually useful to filter them out by `FID` (the from ID) and then by name.
        procedure processMessage m:msg
          say "Got message name=^msg.name info=msg^info data=^msg.data"

          if msg.fid eqs "MYPLOT" then
            if msg.name eqs "MARK" then
              ...
See the `PLOT` explain file and the API for `nxm.sys.libg.MPlot` for more details. See the `%test_plot` macro in the `test` area of SYS for examples.