gnuplot_test


gnuplot_test, a Python code which call gnuplot(), which reads, converts, and displays graphics information.

Ordinarily, the code is used interactively; that is, the user invokes the program, and then describes the plot to be created. The data for the plot is created either by a formula, or by reference to some data file created earlier.

It is often extremely important to be able to create graphical images of the results of an executable program. If the user is familiar with GNUPLOT, then the program can be modified to create a suitable data file, and, once the program has completed, the user can run GNUPLOT and use that data file to create a graph.

However, if the program is going to create the data file, it can just as easily create a file containing the appropriate commands to GNUPLOT that will create the desired image. In this way, the user can avoid having to recall the correct commands in the correct order to create the plot.

Thus, the program might create two files, called, perhaps data.txt and commands.txt. The command file would contain GNUPLOT commands, including one that refers to the data file itself. To create the graphics image, the user would simply type

        gnuplot < commands.txt
      

This directory includes some sample programs which carry out numerical calculations, creating data and command files that are used in exactly this way.

Licensing:

The information on this web page is distributed under the MIT license.

Languages:

gnuplot_test is available in a non-language specific version and a C version and a C++ version and a Fortran77 version and a Fortran90 version and a MATLAB version and an Octave version and a Python version.

Related Data and Programs:

Reference:

  1. Philipp Janert,
    Gnuplot in Action: Understanding Data with Graphs,
    Manning, 2010,
    ISBN13: 978-1-933988-39-8,
    LC: QA276.4.J37.
  2. Thomas Williams, Colin Kelley,
    gnuplot 4.4, An Interactive Plotting Program,
    The Free Software Foundation, 2010.
  3. The GNUPLOT Website.

Source Code:


Last revised on 03 April 2025.