I always create my pdf files of the plots from the postscript files, so I will cover only the postscript terminals in this introduction. The png and svg terminals work very well to produce figures to use on the web as you can see on this page, but for scientific papers or other stuff written in LaTeX we would like to have figures in postscript or pdf format. Since we want to create an output file in both cases we have to specify one. But be aware that not all terminals handle the enhanced notation as mentioned in the gnuplot documentation. The enhanced option tells the terminals that they should interpret something like n_1 for us. If we don’t do this, the default value of 640,480 is used. You may also have noticed that we set the size to a given x,y value. It exists also a png terminal, but it produces uglier output and doesn’t use the UTF-8 encoding the cairo library does. You may have noticed that we use the pngcairo terminal. The png and svg terminals produce more or less the same looking output as the wxt terminal, so you only have to replace the line for the wxt terminal with set terminal pngcairo size 350, 262 enhanced font 'Verdana,10' set output 'introduction.png'įor png and with set terminal svg size 350, 262 fname 'Verdana' fsize 10 set output 'introduction.svg'įor svg to produce the same figures I have posted in the last chapter. We already used the wxt terminal there which displays the result on the screen: set terminal wxt size 350, 262 enhanced font 'Verdana,10' persist Therefore we will use the same code as in the previous plot functions chapter. In this tutorial we will cover the png, svg, postscript and epslatex terminals. Therefore it uses different output terminals that can produce output files or as in the last chapter display the output on your computer screen. Gnuplot gives us the opportunity to produce great looking plots in a lot of different formats.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |