[ Bruce's Homepage
| Bruce's Software Page
| Bruce's Emacs lisp
programs ]
Gnuplot Mode for Emacs
Gnuplot
is my utility of choice for quick 'n' dirty plotting chores. I
don't love Gnuplot's command line interface but I find
mouse-driven, GUI oriented plotting tools to be even slower and
more unwieldy to use. My solution is to run Gnuplot from within
Emacs or XEmacs where I can edit an
entire script then send that script to a running Gnuplot
process. Because this is done in Emacs, I have access to a
large number of useful tools to help create good scripts.
To this end, I have created a Gnuplot mode for Emacs. This is
inspired by the Gnuplot mode originally written by Gershon Elber
and initial versions were written in collaboration with Phil
Type. All of the code in the current version is new and shares
only some concepts with the original mode by Elber.
Gnuplot mode was last updated on 9 September, 1999. The current
version number is 0.5j.
Features of Gnuplot-Mode
Gnuplot mode has the following features:
- Functions for plotting lines, regions, entire scripts, or
entire files
- Graphical interface to setting command arguments
- Syntax colorization using font-lock or hilit19
- Automated completion of common words in Gnuplot and
automatic indentation
- On-line help using Info for Gnuplot functions and
features
- Interaction with Gnuplot using comint
- Convenient key bindings and pull down menus plus a
toolbar for use with XEmacs
- Customizable using the custom package
- Provides several hooks for additional customization
- Tested with Emacs 19.34 and 20.2 and XEmacs 20.4. Also
works with NTEmacs 20.3.
- Works with any version of Gnuplot 3.5, 3.6, or 3.7
- Distributed with a quick reference sheet in postscript which
describes the features of Gnuplot mode
Download Files
Here are the files:
-
gnuplot-mode.tar.gz
-
This is a tarred and gzipped file containing most of the
files listed below as well as a few others. (219 kb) There
are various installation related files which are used to
incorporate gnuplot-mode into the gnuplot distribution
itself or to make gnuplot-mode by itself for use with
Emacs and an already installed gnuplot.
A couple of people have reported difficulties downloading
then untarring this file. This does not happen for me, so I
am unsure what to do. If this happens to you, either
download zip file, download the individual files, or try the
link to my anonymous ftp site near the end of the page.
-
gnuplot-mode.zip
- This has the same contents as the tarred and gzipped file,
but is in the zip format. (224 kb)
- gnuplot.el
- The emacs lisp source file for gnuplot mode. Installation
instructions can be found among the comments near the
beginning of the file. (95 kb)
- gnuplot-gui.el
- The emacs lisp source code for a graphical interface to
setting arguments to gnuplot commands. This must be installed
alongside gnuplot.el in order for the XEmacs
toolbar to work. (68 kb)
- info-look.20.2.el
info-look.20.3.el
- The emacs lisp source code for the generic info file
interface used to provide keyword help. These are the
versions from Emacs 20.2 and 20.3. The version from 20.2 is
slightly altered. Check the value of the EMACS variable in
the Makefile or read this for
information about which one to use. This must be installed
alongside gnuplot.el in order for keyword help
and keyword completion to work. (19/26 kb)
- gnuplot.info
- The gnuplot info file. In case the installation of gnuplot
on your computer does not include the document in this form,
you can download it from here and install it in the info
directory on your computer. (161 kb)
- gpelcard.tex
- gpelcard.ps
- A one page quick reference to the features of gnuplot mode,
including a list of key bindings and a list of user
customizable variables. These are the latex source and the
PostScript. (15/81 kb)
- Other files
-
- Makefile: compile
the lisp and latex files
- dot.el:
a short lisp file used by the Makefile to suppress
compilation warnings
- dotemacs: sample
lines for your .emacs file
- README: general
information
- INSTALL: installation
instructions
- ChangeLog: version
log
- Files needed to use gnuplot-mode with
NTEmacs
-
-
INSTALL.Win9x:
installation instructions on Windows 95/98
-
pgnuplot.c: a
short C program allowing gnuplot to be run as a subprocess
of NTEmacs.
Useful Information About Gnuplot-Mode
Here's some miscellaneous reading material about gnuplot-mode.
Screenshots
|
Here is a screen shots of gnuplot mode. This is XEmacs
20.4. Shown on the screen is the Gnuplot script window and
the comint window displaying the running Gnuplot process
along with the plot of the function defined in the script.
|
|
This is an example of the new graphical interface to setting
command arguments. Placing the screen cursor over a command
and hitting C-c C-c or placing the mouse over a
command and hitting shift-mouse-2 causes a
small frame to open which contains widgets for setting
arguments. The green button are pull-down menus with
selectable options. The grey spaces are entry fields.
|
|
Here is another example of the graphical argument setting
interface. In this example, the arguments to the postscript
terminal type are set.
|
Other Gnuplot resources on the web
Gnuplot mode has been announced on Usenet on the following
groups: comp.graphics.apps.gnuplot
and gnu.emacs.sources.
[ Bruce's Homepage | Bruce's Software Page |
Bruce's Emacs
lisp programs ]
Bruce Ravel
Modified: 9-Sep-1999