gnuplot 
- Description
- Major-mode and interactive frontend for gnuplot
- Latest
- gnuplot-0.9.0.20250530.193710.tar (.sig), 2025-May-30, 2.30 MiB
- Maintainer
- Maxime Tréca <maxime@gmail.com>, Daniel Mendler <mail@daniel-mendler.de>
- Website
- https://github.com/emacs-gnuplot/gnuplot
- Browse ELPA's repository
- CGit or Gitweb
- Badge
- Manual
- gnuplot
To install this package from Emacs, use package-install
or list-packages
.
Full description
This package allows running Gnuplot files from within the GNU Emacs editor. It features:
- Syntax highlighting and indentation for Gnuplot scripts.
- Pull-down menus for common Gnuplot-related tasks.
- Interactive Gnuplot sessions using
comint
. - Context-sensitive completion.
- Inline display of Gnuplot plots.
It is recommended to use GNU Emacs 25 or above, and Gnuplot version 5.0 or above.
1. Installation
The easiest way to install gnuplot
is to directly get it from NonGNU ELPA or
MELPA. After configuring Emacs to use MELPA, you should be able to install
gnuplot
by typing
M-x install-package RET gnuplot RET
or do M-x list-packages
and search for gnuplot
in the list. Note that there is a
different gnuplot-mode package on MELPA which is less featureful.
2. Usage
gnuplot-mode
is enabled automatically for *.gp
files. These functions are useful
as entry points:
M-x run-gnuplot
- startgnuplot-comint-mode
REPL.M-x gnuplot-mode
- switch tognuplot-mode
in the current bufferM-x gnuplot-make-buffer
- open a new buffer, which is not visiting a file, and startgnuplot-mode
in that buffer.
2.1. Bindings
When gnuplot-mode
is on, the following keybindings are available:
C-c C-l | send current line to gnuplot |
C-c C-v | send current line to gnuplot and move forward 1 line |
C-c C-r | send current region to gnuplot |
C-c C-b | send entire buffer to gnuplot |
C-c C-f | send a file to gnuplot |
C-c C-i | insert filename at point |
C-c C-n | negate set option on current line |
C-c C-c | comment region |
C-c C-o | set arguments for command at point |
S-mouse-2 | set arguments for command under mouse cursor |
C-c C-d | read the gnuplot info manual |
C-c C-e | show gnuplot buffer |
C-c C-k | kill gnuplot process |
C-c C-z | customize gnuplot-mode |
M-tab | complete keyword before point |
tab | indent current line |
With the exception of the commands for sending commands to Gnuplot, most of the above commands also work in the Gnuplot comint buffer, in addition to the following:
M-C-p | plot the most recent script buffer line-by-line |
M-C-f | save the current script buffer and load that file |
C-c C-e | pop back to most recent script buffer |
2.2. Context-sensitive keyword completion
By default gnuplot-mode
will try to parse your commands as you type and suggest
only relevant completion candidates on typing M-TAB
or TAB
. For example, with
point after the with
of a plot
command, tab completion will suggest only
plotting styles. This also enables more specific help topic lookup in the
Gnuplot info manual.
If the context-sensitivity annoys you, you can get simple non-context-sensitive
completion back by toggling gnuplot-context-sensitive-mode
.
By its nature, the completion code has to know a fair bit about the structure of
the gnuplot language. If you use it with an old version of gnuplot (pre
version 4) it will make mistakes. Most of gnuplot 4.6's command language is
parsed correctly except for the set terminal
commands.
2.3. Eldoc mode
gnuplot-mode
shows syntax hints in the modeline when eldoc-mode
is turned on and
context sensitivity is enabled. Both are enabled by default.
2.4. Inline Images
You can have plots displayed inline in the Gnuplot Comint process buffer. This
is handy for trying things out without having to switch between Emacs and the
Gnuplot display. It requires Gnuplot and Emacs to have png
support. Call
gnuplot-external-display-mode
in a gnuplot-mode buffer to disable the feature.
3. Common issues
3.1. Usage on Windows
Multiple users have reported issues when trying to work with gnuplot.el
on
Windows. Most notably, the Gnuplot process hangs after sending a first line of
input (this is a common Emacs issue on Windows, see here). More information on
gnuplot.el
and Windows can be found on these threads 1 and 2. You currently have
two solutions:
Experiment using the
gnuplot-program
andgnuplot-program-args
variables. For instance the following setting has been reported to work (see here).(setq gnuplot-program "/path/to/cmdproxy.exe") (setq gnuplot-program-args "/C /path/to/gnuplot.exe")
- Try the simpler gnuplot-mode package that sends the entire buffer to Gnuplot.
Since no
comint
is involved, it should function correctly, but you lose most features of this package.
3.2. Pause Command
Gnuplot's pause -1
command, which waits for the user to press a key, is
problematic when running under Emacs. Sending pause -1
to the running Gnuplot
process will make Emacs appear to freeze. (It isn't really crashed: typing C-g
will unlock it and let you continue). The workaround for now is to make Gnuplot
output a string before pausing, by doing pause -1 "Hit return"
or similar.
3.3. Issue with Unicode Character Display
Some users have reported issues when trying to display unicode characters. This issue is likely due to your distribution bundling Gnuplot with editline instead of readline. Recompiling the source with support for Unicode should fix the issue until this issue is fixed upstream. Thanks to rolandog for discovering this fix.
4. Maintenance
Regenerate gnuplot.texi
and gnuplot-eldoc.el
from the Gnuplot source.
- Run
emacs -batch -l doc2texi.el -f d2t-doc-to-texi
inside thegnuplot-*/docs/
source directory. - Run
makeinfo --no-split gnuplot.texi
and ensure that it compiles cleanly. - Copy
gnuplot-eldoc.el
andgnuplot.texi
to the package source directory.
Old versions
gnuplot-0.8.1.0.20250529.225145.tar.lz | 2025-May-30 | 394 KiB |
gnuplot-0.8.1.0.20250529.101625.tar.lz | 2025-May-29 | 54.3 KiB |
gnuplot-0.8.1.0.20250528.114141.tar.lz | 2025-May-28 | 54.1 KiB |
gnuplot-0.8.1.0.20250526.221136.tar.lz | 2025-May-27 | 60.2 KiB |
gnuplot-0.8.1.0.20240914.153054.tar.lz | 2024-Sep-14 | 60.2 KiB |
gnuplot-0.8.1.0.20230727.75810.tar.lz | 2024-Mar-31 | 60.3 KiB |
gnuplot-0.8.0.0.20230101.135402.tar.lz | 2023-Jan-01 | 60.2 KiB |
gnuplot-0.8.0.0.20221112.204939.tar.lz | 2022-Nov-12 | 60.3 KiB |
gnuplot-0.8.0.0.20220913.115439.tar.lz | 2022-Sep-13 | 60.7 KiB |
gnuplot-0.8.0.0.20211229.133354.tar.lz | 2021-Dec-29 | 271 KiB |
News
1. Version 0.9 (2025-05-30)
- Enable
gnuplot-inline-image-mode
by default. - Enable Eldoc messages by default and provide
gnuplot-eldoc.el
. - Made many functions and variables private to ease refactoring in the future.
- Remove
gnuplot-prompt-face
since Comint highlights the prompt by default. - Remove
gnuplot-tab-completion
option. Settab-always-indent
tocomplete
instead. - Remove
gnuplot-eldoc-mode
option. Toggleeldoc-mode
locally instead. - Unbind
C-c C-c
. Use the default bindingM-;
instead. - Unbind
M-RET
for tab completion. Use the defaultM-TAB
instead. - Fix compatibility with Emacs 30 and newer.
2. Version 0.8.1 (Feb 18th 2023)
List of changes for gnuplot.el
version 0.8.0 ranging from January 2021
to February 2023.
- Fixed the
completion-at-point
function - Improve lazy loading of the gnuplot-gui library
- Remove legacy code
- Lexical scoping and linting
3. Version 0.8.0 (Jan 3rd 2021)
List of changes for gnuplot.el
version 0.8.0 ranging from March 2014
to January 2021.
- Changed project license to GPLv3.
- Greatly simplify the compilation process.
- Fix deprecated calls to the
cl
library. - Deprecated XEmacs support. Bump minimal GNU Emacs version to 24.3.
- Add a
gnuplot-program-args
variable for passing additional arguments to the gnuplot program binary. - The
gnuplot-inline-image-mode
can now take three values:nil
,
inline
, dedicated
.
- Add the
gnuplot-use-context-sensitive-completion
configuration option. - Removed the
gnuplot-bug-report
function. - The provided
gnuplot.info
manual file has been updated for gnuplot version 5.2.6. - Add the
gnuplot-program-args
customization option to pass additional arguments to the gnuplot process. - Use
syntax-proprietize-rules
in gnuplot buffers. gnuplot-context-sensitive-mode
is now a normal minor mode.- Enable
completion-at-point
in gnuplotcomint
buffers. - Remove the unused
dotemacs.el
file. comint-process-echoes
is now buffer-local.
4. Version 0.7.0 (Oct 20th 2012)
- Contextual completion & help, inline plots, some other stuff.
5. Version 0.6.0 (Dec 13th 2011)
- Changed numbering scheme to accommodate gnuplot packaging requirements.
- Moved to github, updated contact info.
6. Version 0.5.0 (Sep 16th 2002)
- Wrote initial draft of gnuplot-gui.el, included it in insertions
menu and in
gnuplot-insert
. Negate option function, bound toC-c C-n
. C-c C-h
with no response goes to Commands menu. Transparent toolbar icons. Replace kw-compl with a simple completion function. Put gnuplot-toolbar code in gnuplot.el.- Send file uses the load command. add
gnuplot-plot-from-comint
andgnuplot-save-and-plot-from-comint
and keybindings in the comint buffer. do(process-kill-without-query gnuplot-process nil)
.gnuplot-negate-option
checks if set option has a negated form. gnuplot-kill-gnuplot-buffer
made more robust. fixed a bug ingnuplot-plot-from-comint
. fixed description of gnuplot-faces group.- Update copyright information, update gpelcard
- Change installation materials. Add some support for hidden3d. Use constants in types alists in gui. Various other minor improvements to the types alists.
- Removed
gnuplot-which-highlight
variable and revamped how colorization gets turned on. This is a bit tricky since I want it to work with font-lock under emacs and xemacs and with hilit19. - Insert space at end of unique completion. add a few GUI types, rewrite some stuff in the GUI interface. primitive support for plot, splot, and fit. Fixed completion in file widget.
- Add
pgnuplot.c
and Win9x install instructions to the distribution. Fixed a defface bug. Addedgnuplot-keywords-when
allowing deferral of parsing the info file. - Fixed font-locking of strings and comments. Figure out
gnuplot-version
number from startup message and setgnuplot-echo-command-line-flag
accordingly. Added
… …