

Gnuplot.jl can display a 2D matrix as an key="left" linetypes(:Set1_5, dashed=true, ps=2) Where NaN in the xrange keyword means using axis autoscaling. cblabel="." => "set cblabel \".\"" Īll such keywords can be abbreviated to unambiguous names.īy using the above keywords the first lines of the previous example: "set grid" "set key left" "set logscale :- "set title 'Plot title'" "set label 'X label'" "set xrange "Ĭan be replaced with a shorter version: "set grid" k="left" :- tit="Plot title" xlab="X label" xr=.In order to avoid typing long, and very frequently used gnuplot commands, Gnuplot.jl provides a few keywords which can be used in both and calls: This means the plot will be updated at each command, adding one curve at a time. The above example lacks the trailing :- symbol.

The and macros also accepts further arguments, but their use will be discussed in Advanced usage. The above list shows all the fundamental concepts to follow the examples presented below. Its purpose is to allow splitting one long statement into multiple (shorter) ones. The special symbol :-, whose meaning is to avoid starting a new plot (if given as first argument), or to avoid immediately running all commands to create the final plot (if given as last argument). set grid) Ī string occurring immediately after a dataset is interpreted as a plot element for the dataset, by which you can specify using clause, with clause, line styles, etc.

The number of required input arrays depends on the chosen plot style (see gnuplot documentation) Ī string occurring before a dataset is interpreted as a gnuplot command (e.g. The different arrays are accessible as columns 1, 2, etc. One, or a group of consecutive, array(s) build up a dataset. See Display options for further informations.īoth the and macros accept any number of arguments, whose meaning is interpreted as follows: The plots are displayed either in an interactive window (if running in the Julia REPL), as an inline image (if running in Jupyter) or in the plot pane (if running in Juno).
