Skip to content
A major mode for Emacs for interacting with Gnuplot
Emacs Lisp Shell TeX
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.gitignore
COPYING
INSTALL
Makefile.dst
Makefile.in
README.org
aclocal.m4
configure
configure.in
dot.el
dotemacs
gnuplot-gui.el
gnuplot.el
gnuplot.info
gpelcard.tex
info-look.20.2.el
info-look.20.3.el
install-sh
mkinstalldirs

README.org

This directory contains files for running Gnuplot from within emacs. This package was assembled by Bruce Ravel <bruceravel1@gmail.com>. See the homepage at http://xafs.org/BruceRavel/GnuplotMode

Contents

FileDescription
README.orgthis file
INSTALLthorough installation instructions
ChangeLoga log of changes by version number
gnuplot.elgnuplot mode for emacs
gnuplot-gui.ela GUI for setting command arguments interactively
info-look.20.2.elprogrammer’s interface to info files, old version
info-look.20.3.elprogrammer’s interface to info files, new version
dot.ela short lisp file used by the Makefile
gnuplot.infoinfo version of gnuplot 3.6 help
gpelcard.texquick reference card for gnuplot mode (latex)
dotemacsexample .emacs lines for enabling gnuplot mode

files inherited from the gnuplot distribution for making gnuplot-mode

  • Makefile.in
  • Makefile.dst
  • aclocal.m4
  • configure
  • configure.in
  • install-sh
  • mkinstalldirs

Installation

Gnuplot-mode has been included with Gnuplot since the 3.7 distribution. The installation instructions for the free-standing distribution have been modified to be consistent with that.

  1. Unpack the gnuplot.tar.gz and cd to the gnuplot directory.
  2. Type configure. If configure doesn’t work for you, see note 7 below.
  3. Run make. If you use XEmacs, run make EMACS=xemacs (or change the EMACS variable to xemacs in the Makefile, the run make).
  4. Move the lisp files to the system site_lisp directory if you are installing as root. If you are installing as a normal user move the .elc files to a place where emacs, i.e. your personal emacs directory.
  5. Insert the contents of the dotemacs file into your .emacs file or into the system’s emacs start-up file to enable gnuplot mode.
  6. The function gnuplot-info-lookup-symbol looks at the Gnuplot info file that comes with this package or that can be made from the Gnuplot distribution. For that function to work, the file gnuplot.info must be placed somewhere where info can find it, for example /usr/info A line like this in your .emacs allows you to put gnuplot.info any place convenient: (add-to-list 'Info-default-directory-list "/path/to/file")
  7. To make the reference card, do pdflatex gpelcard.tex

NOTES

  1. gnuplot-mode is designed for use with version 3.7 of gnuplot. It should work very well with any of the 3.6 beta versions. Only some of the specialized features will not work with version 3.5 – the GUI interface to setting command arguments is an example.
  2. To use gnuplot-mode with Emacs on Windows 95 or 98 see the instructions in the directory Win9x.
  3. The installation materials used by gnuplot-mode come from the gnuplot distribution.
  4. If “configure” doesn’t work for you, the file “Makefile.dst” can be used. In that case do, “make -f Makefile.dst” and carry on from there.
  5. If you do not have the custom library installed, you will get several harmless warnings when compiling gnuplot.el. Most of gnuplot-mode will work even without the custom library installed.
  6. The file info-look.el provides the on-line help functionality. Without it, things like on-line help and keyword completion will not work. Using a tool that is a standard part of Emacs is a good idea, but this one gets complicated. This file became part of Emacs with version 20. It changed between 20.2 and 20.3. And it does not come with XEmacs. What’s more, the version from 20.2 has a bug and the newer version does not work with Emacs 19. So, this distribution comes with two versions of info-look.el, the version from Emacs 20.2 patched to work correctly and the version from Emacs 20.3. Here’s what happens when you run make:
    1. If you use Emacs 19 or XEmacs 19, then the Makefile will compile the 20.2 version.
    2. If you use Emacs 20.2 or lower, the Makefile will compile the 20.2 version.
    3. If you use XEmacs 20 or higher, the Makefile will compile the 20.3 version.
    4. If you use Emacs 20.3 or higher, the Makefile won’t compile any version.
  7. The gnuplot-mode distribution comes with the version of the gnuplot info file that gets made by gnuplot 3.7. Use it rather than the old one. If you really must use the older info file, see the document string for the variable `gnuplot-info-hook’. If you already have the info file installed on your computer, you will not need the one that comes with gnuplot-mode.
  8. The interactive graphical graphical interface to setting command arguments contained in gnuplot-gui.el is experimental. It is incomplete and may make mistakes. Hopefully, you will find it useful. It requires that you are using a version of emacs with the widget library installed or that you have installed it yourself. Version numbers in the 20’s of Emacs and XEmacs ship with the widget library. For version numbers in the 19’s, it can be obtained at http://www.dina.kvl.dk/~abraham/custom/

The todo list

  1. Use ELPA
  2. New functionality for gnuplot 4?
  3. Update info interface
  4. Using gnuplot-mode on windows is problematic. John Handy says:

    You probably get nagged quite a bit about this. Some have been running into issues with gnuplot-mode and Windows and I’m wondering if you have any comments. I use it just fine on Linux, but it seems that Windows users are not able to send data to gnuplot successfully.

    Org-mode also uses gnuplot-mode and this org-plot and org-mode babel+gnuplot are not working correctly on Windows.

    Any thoughts? I’m hoping to include any results in the Org-mode wiki for gnuplot use: http://orgmode.org/worg/org-contrib/babel/languages/ob-doc-gnuplot.php

    If you’re interested, here are some of the threads I’m referring to: http://newsgroups.derkeiler.com/Archive/Comp/comp.emacs/2007-07/msg00159.html http://www.mail-archive.com/emacs-orgmode@gnu.org/msg14544.html http://groups.google.com/group/gnu.emacs.help/browse_thread/thread/53489131c79f62b3

    If you’d like to see my summary of the issues to the org-mode mailing list, it’s here: http://thread.gmane.org/gmane.emacs.orgmode/30235

  1. Evans Winner points out that: ”make-local-hook seems to have been removed from Emacs 24. I found that it was a show-stopper until I commented the call out – this was line 1866 in my copy of the source.”
  2. Jim Mehl says: “I usually put pause -1 lines in my gnuplot scripts. I have to be careful to comment these out if I execute the script within emacs. It just hangs. Is there a way out?”

    When run in a terminal the pauses let me review the screen, then proceed (like many gnuplot demo scripts). When I run this script within emacs 23.1.1 with gnuplot-mode (gnuplot 4.5), emacs becomes unresponsive. I cannot switch buffers. I can switch to another window and kill emacs (usually undesirable).

    lot [-5:5] sin(x)/x
    pause -1
    plot [-5:5] (sin(x)/x)**2
    pause -1
        
Something went wrong with that request. Please try again.