You set an output format and gnuplot refuses:
gnuplot> set terminal pngcairo size 1000,700
unknown or ambiguous terminal type; type just 'set terminal' for a list
(Your command will differ — the message underneath is the part that matters.) The terminal name you asked for is not one this particular gnuplot binary knows.
What this message means
Gnuplot’s output drivers are called terminals, and the set of available terminals is decided when gnuplot is compiled. A name can fail for two very different reasons: it is misspelled, so it matches nothing (or matches several names ambiguously); or it is spelled perfectly but this build was compiled without that driver.
Causes, most likely first
- A typo or a terminal name from a different tool.
pngcairois one word; names likepostscript,epslatexandpdfcairohave their own exact spellings. - The terminal is not compiled into your build. The
tikzterminal is the classic case: it is driven by a Lua script and only exists in builds compiled with Lua support. Some minimal or older builds also lack specific drivers. - The supporting files are missing. A few terminals are implemented partly as external files (the Lua tikz driver loads
gnuplot-tikz.lua); a broken or partial installation can lose them.
Fixes, step by step
1. List the terminals your build actually has
Do exactly what the message says — type set terminal with nothing after it:
gnuplot> set terminal
Available terminal types:
canvas cgm context corel dumb dxf emf epslatex ...
pdfcairo pngcairo postscript qt svg tikz wxt ...
(Your list will differ — that is the point.) If the name you want is in the list, the problem was spelling: copy it exactly, character for character. Also run show version long if you need to see which libraries your build was compiled with.
2. If the name is missing, pick the closest available terminal
Most goals have a near-equivalent: pngcairo or pdfcairo for raster/vector output, postscript eps enhanced color or epslatex for LaTeX documents, svg for the web. For PNG vs PDF specifically, see our pngcairo vs pdfcairo comparison.
3. If you specifically need tikz, get a Lua-enabled build
There is no script-level workaround: the tikz terminal requires a gnuplot build with Lua support, where set terminal tikz becomes available. Install gnuplot through your platform’s standard package route (see the install guides) rather than a stripped-down binary, then confirm tikz appears in the set terminal list. Our guide to the tikz terminal covers what it produces and how the driver files fit together.
A minimal script that works
reset
set terminal pngcairo size 800,600
set output "check.png"
plot x**2 with lines title "parabola"
set output
print "terminal ok"
pngcairo is present in standard builds on every platform, which makes this script a good smoke test: if even this fails with the unknown-terminal message, the installation itself is broken or extremely minimal, and reinstalling beats debugging it. Before reinstalling, skim the full set terminal list once — sometimes the driver you need is there under a spelling you did not expect.
Still stuck?
The official documentation at gnuplot.info includes the full command reference, and the gnuplot-info mailing list linked there is the best place to ask when a script misbehaves in a way this page does not cover — include the exact error message and a small sample of your data when you post.
