Page 14 - Demo
P. 14


                                    Planar Truss Examplefor ComrelAdd-onRCPConsult, 2023-2025Page 14This is thelist of accessible functions/subroutines for plot generation using Gnuplotlogical function GnuplotInit()Initialize Gnuplot environmentReturns .TRUE. if success, otherwise .FALSE.subroutine GnuplotWindow(np, x, y, w, h)Set position and size of plot in direct screen coordinatesnp (integer)number of plotx, y (integers)offset of top left cornerw, h (integers)%u2013width and height of plotsubroutine GnuplotWindowRelative(np, wP, hP, c)Set plot dimensions in relative screen coordinatesnp (integer)%u2013number of plotxP, yP (integers)%u2013width and height in percents of screen sizec (logical)%u2013.TRUE. %u2013centered, .FALSE. %u2013cascadedsubroutine GnuplotWindowTitle(np, title)Define a plot titlenp (integer)%u2013number of plottitle (character) title of plotsubroutine GnuplotPut(np, command)Put next command in the plot stacknp (integer)number of plotcommand (character) %u2013command textsubroutine GnuplotPlot(np, command, data)Put a plot command and text data in the plot stacknp (integer)%u2013number of plotcommand (character) %u2013command textdata (character) %u2013text datasubroutine GnuplotPlotS(np, command, data)Put a plot command and text 3D data in the plot stacknp (long)%u2013number of plotcommand (char *) command textdata (char *)text datasubroutine GnuplotPlotData(np, command, data, col, row)Put a plot command and binary data in the plot stacknp (integer)number of plotcommand (character) %u2013command textdata (real*8) %u2013binary data (array)col, row (integer)%u2013dimension of binary data (array)subroutine GnuplotPlotDataS(np, command, data, col, row, step)Put a plot command and binary 3D data in the plot stacknp (long)%u2013number of plotcommand (char *) command textdata (double *) binary data (array)col, row (longs)%u2013dimension of binary data (array)step (long)%u2013number of rows separated by empty linesubroutine GnuplotShow(np)Display final state of plotnp (integer)%u2013number of plotsubroutine GnuplotExport(np, filename)Export final state of plot as PNG-filenp (integer)%u2013number of plotfilename (character)%u2013name of export filesubroutine GnuplotEnd()Close a Gnuplot sessioncharacter*128 GnuplotVersionVersion of Gnuplot as literalThe invoking of plot generation in the source file is very straightforward. First you needto initialize an GnuplotenvironmentlogicalInitInit=GnuplotInit()Having preset np, next you need to create a plot window, for examplecallGnuplotWindowRelative(1,40,40,.TRUE.)! 1plot number, 40% of screen size, centeredThen an arbitrary set of plot creation statements can be used depending on the plot aimcallGnuplotWindowTitle(1,\! string must be null terminatedcallGnuplotPut(1,\! string must be null terminated...Finally, all collected plot elements can be shown bycallGnuplotShow(1)and Gnuplotenvironment need to be closed bycallGnuplotEnd()
                                
   8   9   10   11   12   13   14   15   16   17   18