gnuplot 
- Description
- Major-mode and interactive frontend for gnuplot
- Latest
- gnuplot-0.11.0.20250724.153116.tar (.sig), 2025-Jul-24, 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 28 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. Configuration
In order to customize Gnuplot, use M-x gnuplot-customize or set the respective
customizable variables in your user configuration.
It is recommended to configure read-extended-command-predicate in your Emacs
configuration, such that M-x only completes commands relevant for the current
mode. For example gnuplot-* commands are only shown in Gnuplot buffers.
Alternatively press the key M-X instead of M-x if you want relevant commands
only.
(setq read-extended-command-predicate #'command-completion-default-include-p)
3. Usage
gnuplot-mode is enabled automatically for *.gp files. These functions are useful
as entry points:
M-x run-gnuplot- startgnuplot-comint-modeREPL.M-x gnuplot-mode- switch tognuplot-modein the current bufferM-x gnuplot-make-buffer- open a new buffer, which is not visiting a file, and startgnuplot-modein that buffer.
3.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 |
3.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 outdated version of gnuplot it will
make mistakes. Most of gnuplot 4.6's command language is parsed correctly except
for the set terminal commands.
3.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.
3.4. Inline Images
Plots are 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.
4. Common issues
4.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-programandgnuplot-program-argsvariables. For instance the following setting has been reported to work (see here).(setq gnuplot-program "/path/to/cmdproxy.exe" gnuplot-program-args "/C /path/to/gnuplot.exe")- Try the simpler gnuplot-mode package that sends the entire buffer to Gnuplot.
Since no
comintis involved, it should function correctly, but you lose most features of this package.
4.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.
4.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 fixes the issue until this issue is fixed upstream.
5. Maintenance of generated files
The files gnuplot.texi and gnuplot-eldoc.el are generated from the Gnuplot
source, which can be obtained from https://packages.debian.org/unstable/gnuplot.
Run make inside the admin directory to download the source and regenerate the
files.
Old versions
| gnuplot-0.11.0.20250613.122323.tar.lz | 2025-Jun-13 | 392 KiB |
| gnuplot-0.10.0.20250606.192846.tar.lz | 2025-Jun-06 | 392 KiB |
| gnuplot-0.10.0.20250604.85155.tar.lz | 2025-Jun-04 | 392 KiB |
| gnuplot-0.9.0.20250602.171355.tar.lz | 2025-Jun-02 | 392 KiB |
| gnuplot-0.9.0.20250601.170219.tar.lz | 2025-Jun-01 | 392 KiB |
| gnuplot-0.9.0.20250531.170110.tar.lz | 2025-May-31 | 392 KiB |
| gnuplot-0.9.0.20250530.193710.tar.lz | 2025-May-30 | 393 KiB |
| gnuplot-0.8.1.0.20250529.225145.tar.lz | 2025-May-30 | 394 KiB |
| gnuplot-0.8.0.0.20230101.135402.tar.lz | 2023-Jan-01 | 60.2 KiB |
| gnuplot-0.8.0.0.20211229.133354.tar.lz | 2021-Dec-29 | 271 KiB |
News
1. Version 0.11 (2025-06-13)
- Keymap and menu setup simplification.
2. Version 0.10 (2025-06-04)
- Add
interactivemode specifications to commands, such that only relevant commands are shown inM-X. - Require Emacs 28.
- Code cleanup and updates.
- Removed deprecated functions.
3. Version 0.9 (2025-05-30)
- Enable
gnuplot-inline-image-modeby 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-facesince Comint highlights the prompt by default. - Remove
gnuplot-tab-completionoption. Settab-always-indenttocompleteinstead. - Remove
gnuplot-eldoc-modeoption. Toggleeldoc-modelocally instead. - Unbind
C-c C-c. Use the default bindingM-;instead. - Unbind
M-RETfor tab completion. Use the defaultM-TABinstead. - Fix compatibility with Emacs 30 and newer.
4. Version 0.8.1 (2023-02-18)
- Fixed the
completion-at-pointfunction - Improve lazy loading of the gnuplot-gui library
- Remove legacy code
- Lexical scoping and linting
5. Version 0.8.0 (2021-01-03)
- Changed project license to GPLv3.
- Greatly simplify the compilation process.
- Fix deprecated calls to the
cllibrary. - Deprecated XEmacs support. Bump minimal GNU Emacs version to 24.3.
- Add a
gnuplot-program-argsvariable for passing additional arguments to the gnuplot program binary. - The
gnuplot-inline-image-modecan now take three values:nil,
inline, dedicated.
- Add the
gnuplot-use-context-sensitive-completionconfiguration option. - Removed the
gnuplot-bug-reportfunction. - The provided
gnuplot.infomanual file has been updated for gnuplot version 5.2.6. - Add the
gnuplot-program-argscustomization option to pass additional arguments to the gnuplot process. - Use
syntax-proprietize-rulesin gnuplot buffers. gnuplot-context-sensitive-modeis now a normal minor mode.- Enable
completion-at-pointin gnuplotcomintbuffers. - Remove the unused
dotemacs.elfile. comint-process-echoesis now buffer-local.
6. Version 0.7.0 (2021-10-20)
- Contextual completion & help, inline plots, some other stuff.
7. Version 0.6.0 (2011-12-13)
- Changed numbering scheme to accommodate gnuplot packaging requirements.
- Moved to github, updated contact info.
8. Version 0.5.0 (2002-09-16)
- 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-hwith 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-comintandgnuplot-save-and-plot-from-comintand keybindings in the comint buffer. do(process-kill-without-query gnuplot-process nil).gnuplot-negate-optionchecks if set option has a negated form. gnuplot-kill-gnuplot-buffermade 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-highlightvariable 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.cand Win9x install instructions to the distribution. Fixed a defface bug. Addedgnuplot-keywords-whenallowing deferral of parsing the info file. - Fixed font-locking of strings and comments. Figure out
gnuplot-versionnumber from startup message and set
… …