The plots can be manipulated using dozens of DPlot macro commands (see DPlot help file and manual, chapter “Programmer’s Reference -> Executing DPlot commands from another application"), for example scaling, labels, colours and line thickness, grid etc. The DPlot macro commands can be sent to DPlot by using the HTBasic library function FNDplot_send_cmd.
Activating a specific DPlot document
Many DPlot macro commands work on the currently active DPlot document, so if you have more than one DPlot document open you may want to activate a specific DPlot document before you send your DPlot macro commands. The document number is the number you get back from the GRAPH-XT library when using the FNDplot_doc_new or FNDplot_doc_open functions.
The following example activates the DPlot document number 3 for subsequent macro commands:
INTEGER Dummy,Doc_num
Doc_num=3
Dummy=FNDplot_doc_activ(Doc_num)
Examples:
We want to define the x and y axis labels.
This can be done using the XAxisLabel macro command like this:
INTEGER Dummy
Dummy=FNDplot_send_cmd("[XAxisLabel(""x Label text"")]")
Dummy=FNDplot_send_cmd("[YAxisLabel(""y Label text"")]")
How one can set the first title line
Dummy=FNDplot_send_cmd("[Title1(""My diagram title"")]")
How to set the grid line types for major and minor grid lines:
Dummy=FNDplot_send_cmd("[GridLineType(1,1)]") ! normal line
Dummy=FNDplot_send_cmd("[GridLineType(2,3)]") ! dotted line
Commands may be issued in sequence or appended to each other.
For example, the following command string opens and prints a DPlot file entitled "TEST.GRF":
Dummy=FNDplot_send_cmd("[FileOpen(""TEST.GRF"")][FilePrint()]")