Page 8 - Demo
P. 8


                                    Planar Truss Examplefor ComrelAdd-onRCPConsult, 2023-2025Page 8This is the list of accessible procedures for plot generation using Gnuplotbool GnuplotInit()Initialize Gnuplot environmentReturns TRUE if success, otherwise FALSEvoid GnuplotWindow(np, x, y, w, h)Setposition and size of plotin direct screen coordinatesnp (long)number of plotx, y (longs)%u2013offset of top left cornerw, h (longs)width and height of plotvoid GnuplotWindowRelative(np, wP, hP, c)Set plot dimensions in relative screen coordinatesnp (long)%u2013number of plotxP, yP (longs)%u2013width and height in percents of screen sizec (bool)%u2013TRUE %u2013centered, FALSE %u2013cascadedvoid GnuplotWindowTitle(np, title)Define a plottitlenp (long)%u2013number of plottitle (char *) %u2013title of plotvoid GnuplotPut(np, command)Put next command in the plot stacknp (long)%u2013number of plotcommand (char *) %u2013command textvoid GnuplotPlot(np, command, data)Put a plot command and text data in the plot stacknp (long)%u2013number of plotcommand (char *) %u2013command textdata (char *)%u2013text datavoid GnuplotPlotData(np, command, data, col, row)Put a plot command and binary data in the plot stacknp (long)%u2013number of plotcommand (char *) %u2013command textdata (double *) %u2013binary data (array)col, row (longs)%u2013dimension of binary data (array)void GnuplotShow(np)Display final stateof plotnp (long)%u2013number of plotvoid GnuplotExport(np,filename)Export final state of plot as PNG-filenp (long)%u2013number of plotfilename (char *)%u2013name of export filevoid GnuplotEnd()Closea Gnuplot sessionchar *GnuplotVersionVersion of Gnuplot as literalThe invoking of plot generation in the source file is very straightforward. First you needto initialize theGnuplotenvironmentboolInit;Init=GnuplotInit();Next, you need to create a plot window, for exampleGnuplotWindowRelative(1,40,40,true);//1 %u2013plot number, 40% of screen size, centeredThen, an arbitrary set of plot creation statements can be used depending on the plot to be producedGnuplotWindowTitle(1,\GnuplotPut(1,\1\...Finally, all collected plot elements can be shown byGnuplotShow(1);and Gnuplotenvironment need to be closed byGnuplotEnd();
                                
   2   3   4   5   6   7   8   9   10   11   12