Gnuplot Question:

How to generate plots in GIF format?

Tweet Share WhatsApp

Answer:

GIF support is provided by an external library, libgd (http://www.libgd.org). Old versions of gd (versions 1.2 to 1.4) produce only GIF output. Versions 1.6 to 2.0.27 did not support GIF output because of patent concerns. However versions 1.6 and newer support PNG outputs, and 1.7 and newer support JPEG outputs. Version 2.0.28 of the Boutell gd library restored GIF functionality, and 2.0.29 added support for GIF animation. If your installation of gnuplot is linked to the gd library, you will get support for whatever formats (GIF, PNG, JPEG) are in that version of gd.

In any case, it is easy to convert from one format to another. To convert a PNG output into GIF, you can either use the command line (e.g. convert f.png f.gif or nconvert -out gif f.png) or any GUI program. Another possibility is to output the image as (encapsulated) postscript and convert (export) it into GIF or PNG by ghostscript, e.g. convert -density 150 f.eps f.gif or by any ghostscript-based GUI like gsview, gv or kghostview.

Download Gnuplot Programming PDF Read All 11 Gnuplot Programming Questions
Previous QuestionNext Question
How to print out graphs in Gnuplot?How to include Gnuplot graphs in word processor?