How do I modify gnuplot, and apply patches?
For this, you will need to recompile gnuplot. Modifications people make are either done by replacing files, such as terminal drivers, or by ‘patching’. If a file is a replacement, it will probably tell you in its README or in the lines at the beginning. To patch a file, you need Larry Wall’s patch utility. On many UNIX systems, it is already installed; do a man patch to check. If it isn’t, you’ll have to get it; it can be found wherever GNU software is archived.