Skip to content

Instantly share code, notes, and snippets.

@littlemind
Created October 3, 2013 06:16
Show Gist options
  • Save littlemind/6805766 to your computer and use it in GitHub Desktop.
Save littlemind/6805766 to your computer and use it in GitHub Desktop.
A list of the syntax for all gnuplot commands as extracted from the manual delivered with gnuplot-4.6.3. Grabed via Sublime Text 2 and the RegEx `\sSyntax.*:(\s{7,}.*\n){1,30}`
Syntax:
... {linecolor | lc} {<colorspec> | <n>}
... {textcolor | tc} {<colorspec> | {linetype | lt} <n>}
Syntax:
bind {allwindows} [<key-sequence>] ["<gnuplot commands>"]
bind <key-sequence> ""
reset bind
Syntax:
plot ... with filledcurves [option]
Syntax:
newhistogram {"<title>"} {lt <linetype>} {fs <fillstyle>} {at <x-coord>}
Syntax:
cd '<directory-name>'
Syntax:
call "<input-file>" <parameter-0> <parm-1> ... <parm-9>
Syntax:
do for <iteration-spec> {
<commands>
<commands>
}
Syntax:
eval <string expression>
Syntax:
fit {<ranges>} <expression>
'<datafile>' {datafile-modifiers}
via '<parameter file>' | <var1>{,<var2>,...}
Syntax:
load "<input-file>"
Syntax:
lower {plot_window_nb}
Syntax:
pause <time> {"<string>"}
pause mouse {<endcondition>}{, <endcondition>} {"<string>"}
Syntax:
plot {<ranges>}
{<iteration>}
{<function> | {"<datafile>" {datafile-modifiers}}}
{axes <axes>} {<title-spec>} {with <style>}
{, {definitions{,}} <function> ...}
Syntax:
plot '<file_name>' {binary <binary list>} ...
splot '<file_name>' {binary <binary list>} ...
Syntax:
plot '<file_name>' {binary <binary list>}
{{nonuniform} matrix}
{index <index list> | index "<name>"}
{every <every list>}
{thru <thru expression>}
{using <using list>}
{smooth <option>}
{volatile} {noautoscale}
Syntax:
plot 'file' every {<point_incr>}
{:{<block_incr>}
{:{<start_point>}
{:{<start_block>}
{:{<end_point>}
{:<end_block>}}}}}
Syntax:
plot 'file' index { <m>{:<n>{:<p>}} | "<name>" }
Syntax:
smooth {unique | frequency | cumulative | cnormal | kdensity
| csplines | acsplines | bezier | sbezier}
Syntax:
plot 'file' thru f(x)
Syntax:
plot 'file' using <entry> {:<entry> {:<entry> ...}} {'format'}
Syntax:
[{<dummy-var>=}{{<min>}:{<max>}}]
[{{<min>}:{<max>}}]
Syntax:
plot for [<variable> = <start> : <end> {:<increment>}]
plot for [<variable> in "string of words"]
Syntax:
title <text> | notitle [<ignored text>]
title columnheader | title columnheader(N)
Syntax:
with <style> { {linestyle | ls <line_style>}
| {{linetype | lt <line_type>}
{linewidth | lw <line_width>}
{linecolor | lc <colorspec>}
{pointtype | pt <point_type>}
{pointsize | ps <point_size>}
{fill | fs <fillstyle>}
{nohidden3d} {nocontours} {nosurface}
{palette}}
}
Syntax:
print <expression> {, <expression>, ...}
Syntax:
raise {plot_window_nb}
Syntax:
save {<option>} '<filename>'
Syntax:
set angles {degrees | radians}
show angles
Syntax:
set arrow {<tag>} {from <position>} {to|rto <position>}
{ {arrowstyle | as <arrow_style>}
| { {nohead | head | backhead | heads}
{size <length>,<angle>{,<backangle>}}
{filled | empty | nofilled}
{front | back}
{ {linestyle | ls <line_style>}
| {linetype | lt <line_type>}
{linewidth | lw <line_width} } } }
unset arrow {<tag>}
show arrow {<tag>}
Syntax:
set autoscale {<axes>{|min|max|fixmin|fixmax|fix} | fix | keepfix}
unset autoscale {<axes>}
show autoscale
Syntax:
set bars {small | large | fullwidth | <size>} {front | back}
unset bars
show bars
Syntax:
set border {<integer>} {front | back} {linewidth | lw <line_width>}
{{linestyle | ls <line_style>} | {linetype | lt <line_type>}}
unset border
show border
Syntax:
set boxwidth {<width>} {absolute|relative}
show boxwidth
Syntax:
set clabel {'<format>'}
unset clabel
show clabel
Syntax:
set clip <clip-type>
unset clip <clip-type>
show clip
Syntax:
set cntrparam { { linear
| cubicspline
| bspline
| points <n>
| order <n>
| levels { auto {<n>} | <n>
| discrete <z1> {,<z2>{,<z3>...}}
| incremental <start>, <incr> {,<end>}
}
}
}
show contour
Syntax:
set contour {base | surface | both}
unset contour
show contour
Syntax:
set datafile missing {"<string>"}
show datafile missing
unset datafile
Syntax:
set datafile separator {"<char>" | whitespace}
Syntax:
set datafile commentschars {"<string>"}
show datafile commentschars
unset commentschars
Syntax:
set datafile binary <binary list>
show datafile binary
show datafile
unset datafile
Syntax:
set decimalsign {<value> | locale {"<locale>"}}
unset decimalsign
show decimalsign
Syntax:
set dgrid3d {<rows>} {,{<cols>}}
{ splines |
qnorm {<norm>} |
(gauss | cauchy | exp | box | hann)
{kdensity} {<dx>} {,<dy>} }
unset dgrid3d
show dgrid3d
Syntax:
set dummy {<dummy-var>} {,<dummy-var>}
show dummy
Syntax:
set encoding {<value>}
set encoding locale
show encoding
Syntax:
set fit {logfile {"<filename>"}} {{no}errorvariables} {{no}quiet}
unset fit
show fit
Syntax:
set fontpath {"pathlist1" {"pathlist2"...}}
show fontpath
Syntax:
set format {<axes>} {"<format-string>"}
set format {<axes>} {'<format-string>'}
show format
Syntax:
show functions
Syntax:
set grid {{no}{m}xtics} {{no}{m}ytics} {{no}{m}ztics}
{{no}{m}x2tics} {{no}{m}y2tics}
{{no}{m}cbtics}
{polar {<angle>}}
{layerdefault | front | back}
{ {linestyle <major_linestyle>}
| {linetype | lt <major_linetype>}
{linewidth | lw <major_linewidth>}
{ , {linestyle | ls <minor_linestyle>}
| {linetype | lt <minor_linetype>}
{linewidth | lw <minor_linewidth>} } }
unset grid
show grid
Syntax:
set hidden3d {defaults} |
{ {front|back}
{{offset <offset>} | {nooffset}}
{trianglepattern <bitpattern>}
{{undefined <level>} | {noundefined}}
{{no}altdiagonal}
{{no}bentover} }
unset hidden3d
show hidden3d
Syntax:
set historysize <int>
unset historysize
Syntax:
set isosamples <iso_1> {,<iso_2>}
show isosamples
Syntax:
set key {on|off} {default}
{{inside | outside} | {lmargin | rmargin | tmargin | bmargin}
| {at <position>}}
{left | right | center} {top | bottom | center}
{vertical | horizontal} {Left | Right}
{{no}opaque}
{{no}reverse} {{no}invert}
{samplen <sample_length>} {spacing <vertical_spacing>}
{width <width_increment>}
{height <height_increment>}
{{no}autotitle {columnheader}}
{title "<text>"} {{no}enhanced}
{font "<face>,<size>"} {textcolor <colorspec>}
{{no}box { {linestyle | ls <line_style>}
| {linetype | lt <line_type>}
{linewidth | lw <line_width>}}}
{maxcols {<max no. of columns> | auto}}
{maxrows {<max no. of rows> | auto}}
unset key
show key
Syntax:
set label {<tag>} {"<label text>"} {at <position>}
{left | center | right}
{norotate | rotate {by <degrees>}}
{font "<name>{,<size>}"}
{noenhanced}
{front | back}
{textcolor <colorspec>}
{point <pointstyle> | nopoint}
{offset <offset>}
unset label {<tag>}
show label
Syntax:
set loadpath {"pathlist1" {"pathlist2"...}}
show loadpath
Syntax:
set locale {"<locale>"}
Syntax:
set logscale <axes> {<base>}
unset logscale <axes>
show logscale
Syntax:
set macros
Syntax:
set mapping {cartesian | spherical | cylindrical}
Syntax:
set bmargin {{at screen} <margin>}
set lmargin {{at screen} <margin>}
set rmargin {{at screen} <margin>}
set tmargin {{at screen} <margin>}
show margin
Syntax:
set mouse {doubleclick <ms>} {nodoubleclick} \
{{no}zoomcoordinates} \
{noruler | ruler {at x,y}} \
{polardistance{deg|tan} | nopolardistance} \
{format <string>} \
{clipboardformat <int>/<string>} \
{mouseformat <int>/<string>} \
{{no}labels {"labeloptions"}} \
{{no}zoomjump} {{no}verbose}
unset mouse
Syntax:
set multiplot
{ title <page title> {font <fontspec>} {enhanced|noenhanced} }
{ layout <rows>,<cols>
{rowsfirst|columnsfirst} {downwards|upwards}
{scale <xscale>{,<yscale>}} {offset <xoff>{,<yoff>}}
}
unset multiplot
Syntax:
set mxtics {<freq> | default}
unset mxtics
show mxtics
Syntax:
set offsets <left>, <right>, <top>, <bottom>
unset offsets
show offsets
Syntax:
set origin <x-origin>,<y-origin>
Syntax:
set output {"<filename>"}
show output
Syntax:
set parametric
unset parametric
show parametric
Syntax (the options can be given in any order):
set pm3d {
{ at <position> }
{ interpolate <steps/points in scan, between scans> }
{ scansautomatic | scansforward | scansbackward | depthorder }
{ flush { begin | center | end } }
{ ftriangles | noftriangles }
{ clip1in | clip4in }
{ corners2color { mean|geomean|median|min|max|c1|c2|c3|c4 } }
{ hidden3d {<linestyle>} | nohidden3d }
{ implicit | explicit }
{ map }
}
show pm3d
unset pm3d
Syntax:
set palette
set palette {
{ gray | color }
{ gamma <gamma> }
{ rgbformulae <r>,<g>,<b>
| defined { ( <gray1> <color1> {, <grayN> <colorN>}... ) }
| file '<filename>' {datafile-modifiers}
| functions <R>,<G>,<B>
}
{ cubehelix {start <val>} {cycles <val>} {saturation <val>} }
{ model { RGB | HSV | CMY | YIQ | XYZ } }
{ positive | negative }
{ nops_allcF | ps_allcF }
{ maxcolors <maxcolors> }
}
show palette
show palette palette <n> {{float | int}}
show palette gradient
show palette fit2rgbformulae
show palette rgbformulae
show colornames
Syntax:
set palette defined { ( <gray1> <color1> {, <grayN> <colorN>}... ) }
Syntax:
set pointsize <multiplier>
show pointsize
Syntax:
set polar
unset polar
show polar
Syntax:
set print
set print "-"
set print "<filename>"
set print "<filename>" append
set print "|<shell_command>"
Syntax:
set samples <samples_1> {,<samples_2>}
show samples
Syntax:
set size {{no}square | ratio <r> | noratio} {<xscale>,<yscale>}
show size
Syntax:
set style function <style>
set style data <style>
show style function
show style data
Syntax:
set style arrow <n> <arrowstyle>
set style fill <fillstyle>
set style histogram <histogram style options>
set style line <n> <linestyle>
Syntax:
set style rectangle <object options> <linestyle> <fillstyle>
set style circle radius <size>
set style ellipse size <size> units {xy|xx|yy}
Syntax:
set style arrow <index> default
set style arrow <index> {nohead | head | heads}
{size <length>,<angle>{,<backangle>}}
{filled | empty | nofilled}
{front | back}
{ {linestyle | ls <line_style>}
| {linetype | lt <line_type>}
{linewidth | lw <line_width} }
unset style arrow
show style arrow
Syntax:
set style boxplot {range <r> | fraction <f>}
{{no}outliers} {pointtype <p>}
{candlesticks | financebars}
{separation <x>}
{labels off | auto | x | x2}
{sorted | unsorted}
Syntax:
set style data <plotting-style>
show style data
Syntax:
set style fill {empty
| {transparent} solid {<density>}
| {transparent} pattern {<n>}}
{border {lt} {lc <colorspec>} | noborder}
Syntax:
set style function <plotting-style>
show style function
Syntax:
set style increment {default|userstyles}
show style increment
Syntax:
set style line <index> default
set style line <index> {{linetype | lt} <line_type> | <colorspec>}
{{linecolor | lc} <colorspec>}
{{linewidth | lw} <line_width>}
{{pointtype | pt} <point_type>}
{{pointsize | ps} <point_size>}
{{pointinterval | pi} <interval>}
{palette}
unset style line
show style line
Syntax:
set style circle {radius {graph|screen} <R>}
Syntax:
set style ellipse {units xx|xy|yy}
{size {graph|screen} <a>, {{graph|screen} <b>}}
{angle <angle>}
Syntax:
set surface
unset surface
show surface
Syntax:
set table {"outfile"}
plot <whatever>
unset table
Syntax:
set terminal {<terminal-type> | push | pop}
show terminal
Syntax:
set tics {axis | border} {{no}mirror}
{in | out} {scale {default | <major> {,<minor>}}}
{{no}rotate {by <ang>}} {offset <offset> | nooffset}
{left | right | center | autojustify}
{ format "formatstring" } { font "name{,<size>}" }
{ textcolor <colorspec> }
set tics {front | back}
unset tics
show tics
Syntax:
set timestamp {"<format>"} {top|bottom} {{no}rotate}
{offset <xoff>{,<yoff>}} {font "<fontspec>"}
unset timestamp
show timestamp
Syntax:
set timefmt "<format string>"
show timefmt
Syntax:
set title {"<title-text>"} {offset <offset>} {font "<font>{,<size>}"}
{{textcolor | tc} {<colorspec> | default}} {{no}enhanced}
show title
Syntax:
show variables # show variables that do not begin with GPVAL_
show variables all # show all variables including those beginning GPVAL_
show variables NAME # show only variables beginning with NAME
Syntax:
show version {long}
Syntax:
set view <rot_x>{,{<rot_z>}{,{<scale>}{,<scale_z>}}}
set view map
set view {no}equal {xy|xyz}
show view
Syntax:
set xdata {time}
show xdata
Syntax:
set xdtics
unset xdtics
show xdtics
Syntax:
set xlabel {"<label>"} {offset <offset>} {font "<font>{,<size>}"}
{textcolor <colorspec>} {{no}enhanced}
{rotate by <degrees> | rotate parallel | norotate}
show xlabel
Syntax:
set xmtics
unset xmtics
show xmtics
Syntax:
set xrange { [{{<min>}:{<max>}}] {{no}reverse} {{no}writeback} }
| restore
show xrange
Syntax:
set xtics {axis | border} {{no}mirror}
{in | out} {scale {default | <major> {,<minor>}}}
{{no}rotate {by <ang>}} {offset <offset> | nooffset}
{left | right | center | autojustify}
{add}
{ autofreq
| <incr>
| <start>, <incr> {,<end>}
| ({"<label>"} <pos> {<level>} {,{"<label>"}...) }
{ format "formatstring" } { font "name{,<size>}" }
{ rangelimited }
{ textcolor <colorspec> }
unset xtics
show xtics
Syntax:
set xyplane at <zvalue>
set xyplane relative <frac>
set ticslevel <frac> # equivalent to set xyplane relative
show xyplane
Syntax:
set zero <expression>
show zero
Syntax:
set {x|x2|y|y2|z}zeroaxis { {linestyle | ls <line_style>}
| { linetype | lt <line_type>}
{ linewidth | lw <line_width>}}
unset {x|x2|y|y2|z}zeroaxis
show {x|y|z}zeroaxis
Syntax:
splot {<ranges>}
{<iteration>}
<function> | "<datafile>" {datafile-modifiers}}
{<title-spec>} {with <style>}
{, {definitions{,}} <function> ...}
Syntax:
splot '<file_name>' {binary <binary list>}
{{nonuniform} matrix}
{index <index list>}
{every <every list>}
{using <using list>}
Syntax:
stats 'filename' [using N[:M]] [name 'prefix'] [[no]output]]
Syntax:
test {terminal | palette [rgb|rbg|grb|gbr|brg|bgr]}
Syntax:
update <filename> {<filename>}
Syntax:
while (<expr>) {
<commands>
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment