I would like to graph functions and datasets from calc-mode. (That's a reasonable thing to do in 2021, right?)

Following the directions at Basic Graphics and Vectors as Lists, I started calc-mode, created two vectors, and typed g f:

--- Emacs Calculator Mode ---
2: [0, 1, 2, 3]
1: [0, 1, 3, 9]
g f

No graph is produced. In the *Gnuplot Trail* buffer that is created, I can see that I've got gnuplot v5.4 installed.

(BTW, TIL that the 'gnu' in 'gnuplot' has nothing to do with 'GNU', How did it come about and why is it called gnuplot?)

Also in the trail buffer, there are these error messages:

Terminal type is now 'qt'
Terminal type is now 'unknown'
         unknown or ambiguous terminal type; type just 'set terminal' for a list

gnuplot> gnuplot> 
gnuplot> set notime
         "/var/folders/cj/hmr0n_q91kd7lg4jsqb8w9100000gn/T/calcAkJV7MZ" line 23: Unrecognized option.  See 'help unset'.

This makes me think I am using too new a version of gnuplot for the version of Calc I have installed. I am running vanilla Emacs 27.1. I couldn't figure out how to get Calc to tell me what version of calc-mode I have installed (including reading the source).

Searching site:emacs.stackexchange.com calc-mode gnuplot produced nothing of relevance.

I have once gotten the contents of various buffers like *Gnuplot Temp*, *Gnuplot Temp-2*, and *Gnuplot Commands*, saved them into independent local files, and run gnuplot from the command line and gotten a chart created, but I would like to figure out how to get things to work the normal way.

What should I do next?

  • Try g D default and g f again.
    – NickD
    Mar 5, 2021 at 21:12
  • That didn't seem to result in any difference. (Hi again NickD!)
    – Greg C
    Mar 5, 2021 at 22:04
  • But then I tried g D qt, and THAT got g f to work. Now I will try to figure out how to set that terminal type as my default, to see if that results in calc graphing without further twiddling
    – Greg C
    Mar 5, 2021 at 22:18
  • C-u g D qt should set it permanently according to the doc.
    – NickD
    Mar 5, 2021 at 22:28
  • The other thing I needed to do was edit the source code to replace 'set notime' with 'unset timestamp'. I can't figure any way around needing to do that. I guess I will try to figure out how to ask if I should submit a PR for that?
    – Greg C
    Mar 5, 2021 at 22:49

1 Answer 1


I've got the same issue here (emacs 27.1 and gnuplot 5.4).
Calc is issuing an option which is unknown to gnuplot: set notime. This seems to be a bug in calc. Calc is also issuing multiple deprecated commands (it should use unset instead of set no...), but these only trigger warnings.

To work around the unknown option, locate file calc-graph.el and edit it. In this file search for the string set notime\n and replace it with set notimestamp\n.

It is at line 354:

         "set notime\nset border\nset ztics\nset zeroaxis\n"

this line needs to state:

         "set notimestamp\nset border\nset ztics\nset zeroaxis\n"

Save the file (maybe compile it) and restart Emacs.

Afterwards plotting is working again.

Edit. this is already fixed in recent version at github.com/emacs-mirror.
Edit2: NickD posted the link to the fixing commit


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.