
So it's better to be careful and respect the rule "anywhere it makes sense to work" while using # comments. > sin(x),\ # I would like to comment here Will plot the same as plot sin(x), cos(x)Ī little note on "commenting out a continued line comments out the entire command". ( Ibidem)įor example, to split plot command on multiple lines, plot\

Therefore, commenting out a continued line comments out the entire command. That is, no white space is implied, nor is a comment terminated. The effect is as if the backslash and newline were not there. The backslash must be the last character on each line. Gnuplot> plot sin(x) # another valid commentĬommands may extend over several input lines by ending each line but the last with a backslash ( \ ). gnuplot> # this is a comment, nothing will happen Just remember the simple "anywhere it makes sense to work" rule. In short, it works anywhere it makes sense to work. It will not have this effect inside quotes, inside numbers (including complex numbers), inside command substitutions, etc. Set title "My First Plot" plot 'data' print "all done!"Ĭomments are supported as follows: a # may appear in most places in a line and gnuplot will ignore the rest of the line. The symbol used to separate commands on a singe line is Where p stands for plot, rep for replot and q for quit. Some commands allows also a more powerful contraction. Anyway the first three letters of any command in gnuplot work always as abbreviations. You can find an almost complete list of abbreviations here. gnuplot> set xlabel "x"Īlso the N variable will be different from the n one. Typing lowercase-defined commands in uppercase will generate an invalid command warning. Kelley - gnuplot 5.0, An Interactive Plotting Program) Any number of commands may appear on a line, separated by semicolons. All command names may be abbreviated as long as the abbreviation is not ambiguous.

commands and function names written in lowercase are not the same as those written in capitals. The command language of gnuplot is case sensitive, i.e. Basic introduction to programming language's rulesįrom the gnuplot 5.0 official online documentation:
