Go to the first, previous, next, last section, table of contents.


Printing graph using gnuplot as auxiliary tool.

Author(s): David Trallero Mena.

This library uses gnuplot for printing graphs.

User-friendly predicates to generate data plots are provided, as well as predicates to set the general options which govern the generation of such plots. If no options is specified, global ones are used for data plots generation.

Several files can be generated as temporary files. A BaseName is required for generating the temporaries files. Data files name will be created from BaseName + number + .dat. The BaseName + ".plot" will be the name used for gnuplot tool.

A list of pairs of list of pairs of the from (X,Y) and Local Option value is provided to the main predicate as data. In other words DataList = [(CurveDataList,LocalOptions), (CurveDataList1,LocalOptions1) ...]. Additionaly (function( String ) , LocalOptions) can be used for adding a curve to the plot (imagine you want to compare your result with 'x=y').

LocalOptions of the DataList are options that are applied to the curve, as for example, if we print the curve with lines, or the title in the legend, etc. GlobalOptions are referred to the plot options, like title in x or y axis, etc.

Usage and interface (gnuplot)

Documentation on exports (gnuplot)

PREDICATE: get_general_options/1:

Usage: get_general_options(X)

PREDICATE: set_general_options/1:

Usage: set_general_options(X)

PREDICATE: generate_plot/2:

Usage: generate_plot(BaseName, DataList)

PREDICATE: generate_plot/3:

Usage: generate_plot(BaseName, DataList, GeneralOptions)


Go to the first, previous, next, last section, table of contents.