contributed scripts and other files for gnuplot
Table of contents:
PostScript prolog files
-
The PostScript terminal driver in gnuplot version 4.2 loads prolog information
from external files into each PostScript file output by gnuplot. This allows
local customization of the default page settings, encodings, color usage, and so
on. Here are contributed prolog files.
- cp1252.ps
- Encoding vector approximating code page 1252 (ISO-LATIN1 + a few special symbols).
See discussion of
Patchset #1734995. Contributed by Thomas Henlich.
- prologue_newpointtypes.ps
- Replacement for the default prologue.ps file that redefines point types 16-24.
See discussion of
Feature Request #1958517. Output of 'test' command showing the new types
test_newpointtypes.ps
Post-processing PostScript files
Helpful gnuplot scripts hosted here
-
gpsavediff:
Script to strip default set values from a given gnuplot input
file; usually used to shorten a file created by gnuplot's save
command. Usage:
gpsavediff [gnuplot_save_file]
If no file given, then take standard input. Result is printed on standard output.
Examples:
~/work$ gpsavediff sinc.gp >new_sinc.gp
gnuplot> save "|gpsavediff >sinc.gp"
-
colorpts:
The enclosed script colorpts.awk draws list of 3D points (3D
coordinates) as colour rectangles in set pm3d map with colour
according to the point z-coordinate and any specified lateral size. Try the
enclosed colorpts-demo.gp. You may find this script useful, even though
gnuplot supports something similar by splot 'a.dat' with points palette
(using predefined point shapes).
-
label_contours.awk:
The enclosed script label_contours.awk generates gnuplot script
containing text labels to label contours found in a file generated by
a gnuplot splot command with output to the table terminal. The output should be
redirected to another file and then be loaded into gnuplot; this results in a
contour plot.
Example of use (from gnuplot):
set contour base; set cntrparam levels 15; unset surface
set table "contour.dat"
splot x*x+y*y
unset table
!awk -f label_contours.awk -v nth=10 textcolor=-1 inclt=1 contour.dat >tmp.gp
reset; set key outside left; load "tmp.gp"
Helpful gnuplot scripts hosted on the web
- The Qplot
package to plot quarterly time data
- A perl script
to create filled boxes with the postscript terminal, by Andreas Widmann. The
script draws boxed keys, and fills (and outlines) boxes by post-processing
gnuplot postscript output. This is new in comparison to the patches of Steve
Cumming and Bernhard Reiter since it works for postscript output (Steve
Cummings patch only works well only on non-vector oriented terminals) and
you don't have to go through fig which implies some heavy restrictions.
Note: gnuplot 4.0 has native support for filled boxes.
- dat2latex.pl:
a script that converts columns of a data file into LaTeX table(s).
(Note: script formerly called gp2tex.gpl.)
Contributed patches for specific platforms
- ultrix-sprintf.patch: Needed in order to compile mousing support under Ultrix or SunOS 4, or any other system with an oddball sprintf() that does not return the number of characters written.
Fun scripts
Color palettes for compatibility with other applications
- The cpt-city
site is an archive of colour gradients for cartography,
technical illustration and design.
Palettes are loaded into gnuplot using the "set palette file" command.
Go back to gnuplot homepage.
Version: July 2009.