graphics_gnuplot_test, a C++ code which illustrates how various kinds of data can be displayed and analyzed graphically, using the gnuplot() graphics program.

Some common plot types include:


The computer code and data files described and made available on this web page are distributed under the MIT license


graphics_gnuplot_test is available in a C/dislin() version and a C/gnuplot() version and a C++/dislin() version and a C++/gnuplot() version and a FORTRAN90/dislin() version and a FORTRAN90/gnuplot() version and a MATLAB version and an Octave version and a Python version and an R version.

Related Data and Programs:

dislin_test, C++ codes which use dislin(), which is a scientific graphics package, by Helmut Michels.

gnuplot_test, C++ codes which write data and command files so that the gnuplot() program can create plots of the results.


  1. Philipp Janert,
    Gnuplot in Action: Understanding Data with Graphs,
    Manning, 2010,
    ISBN13: 978-1-933988-39-8,
    LC: QA276.4.J37.
  2. Helmut Michels,
    The Data Plotting Software DISLIN - version 10.4,
    Shaker Media GmbH, January 2010,
    ISBN13: 978-3-86858-517-9.

Source code:

album_bar lists the year, and total number of music albums (LP's, cassettes, CD's and dowloads) sold each year from 2007 to 2017. This data is plotted as a bar graph. The gnuplot() program is used.

corkscrew_plot3d generates (X,Y,Z) points that lie along a 3D curve looking something like a corkscrew. The gnuplot() program is used.

mario_fill makes a simple image of Mario, by constructing a grid of squares filled with color. The gnuplot() program is used.

predator_plot3d models the populations of predators (foxes) and prey (rabbits) over time. A 3D plot of (time, rabbits, foxes) is created. The gnuplot() program is used.

Last modified on 28 July 2020.