

If we plot more than one function, we would need to write a title for each plot). This title is the one that will be shown in the key. We need to add the option title at the end of the splot command.
#Gnuplot contour code
We will reuse the code from the previous example and then we will use replot: Although we will use a 3D example, all the options apply for 2D plots.įirst of all, we will change the formula in the key by sinc (which is the function we are plotting). We will explain some of the options of the key and we will "fix" the figure above. In the example above, the key is on top of the level curves. Note: we can look for help about other commands in the same way. If in the subtopic option we write png and hit return we obtain the corresponding information for the png output terminal. Terminals available on a particular gnuplot installation, type 'set terminal'Įpslatex epson_180dpi epson_60dpi epson_lx800 This document may describe terminal types that are not available to youīecause they were not configured or installed on your system. These are selected byĬhoosing an appropriate terminal type, possibly with additional modifying

Gnuplot supports a large number of output formats. To obtain information about all possible output terminals and their corresponding configurations, one can refer to the built-in Gnuplot help with the command As you may imagine, the output options are highly configurable. In the previous example we have exported our plot to a png file using the default options. Some of the fonts or symbols may not display as desired (as the X11 terminal is quite simple), but they would in a different format as we explain below. The figures in the following papers were also generated using GNUplot:īefore we start, and to improve the speed of the rendering and avoid possible crashes with big data files, we recommend using the X11 term: (check the tables near the end of the page) The frames of the following movies were generated using GNUplot (25fps) To see how powerful GNUplot can be check the following links: At the end of the tutorial you should be able to produce high quality plots. With this tutorial we will try to show you the basics of plotting with GNUplot and we will show you some more advanced commands with examples.

All the features that you learn for functions also apply to data files.
#Gnuplot contour how to
The best way to learn GNUplot is by plotting simple functions and learning how to plot them nicely.
