Plotting in C
Numerische Methoden in der Physik WS 2013/2014
Lilia Boeri
Christoph Heil, Gernot Kapper
Introduction
There are several ways to create plots of the results of a C program. Two of these methods are described in the following sections.
Text files (Recommended for this exercise)
A simple way is to write text files containing the results and to read and plot them with MATLAB or Gnuplot.
Gnuplot_i
In order to create a plot directly out of a C program, the library gnuplot_i can be used. A pre-compiled 64-Bit-version of gnuplot_i.o and the according header file gnuplot_i.h are located in the directory of the description of the exercise (e.g. Exercise 1). For further information about the syntax of this library, and a way to compile it for other architectures, have a look at the gnuplot_i-Website.