Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm new to gnuplot. I am reading the manual but am having a hard time finding explanations for some of the abbreviations people use in their scripts. For example, I am working with an script that says:

f(x)=invnorm(x)
g(x)=norm(x)

plot \
    "file.curve" u (f($3)):(f($2)) ti "Curve 1" ls 1 lw 3, \
    "file.curve" u (f($3)):(f($2)) ti "Curve 2" ls 2 lw 3, \
    "file.curve" u (f($3)):(f($2)) ti "Curve 3" ls 3 lw 3, \
    f(1-g(x)) noti lt rgb "#FF0000" lw 0.75, \
    f(12.5*g(x)) noti lt rgb "#808080" lw 0.75

I think I understand that ti stands for title, ls for line style, and lw for line width, but what about lt and noti? (where can I look this up)?

With this, what do these last two lines do?

share|improve this question

migrated from stackoverflow.com Nov 21 '12 at 11:08

This question came from our site for professional and enthusiast programmers.

add comment

1 Answer

up vote 4 down vote accepted

gnuplot has a set of commands and a set of options for each command. The name of each command and option can be abbreviated to the shortest unique string that describes it, e.g. p for the plot command, sp for the splot command, t for the title option to plot. Note that you can't, for example, use s for splot because it conflicts with set.

The two-letter abbreviations in gnuplot starting with l are usually for a line characteristic, like lt for linetype, lw for linewidth. These are actually unique flags which can be used interchangeably with the long form: lw, linew and linewidth specify the same option. You can see this in the command-line documentation for the set style line command:

help set style line

This gives

 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

and you can see that the options separated by a pipe ('|') are equivalent.

To be safe when starting with gnuplot, I recommend typing out the full commands, and when you get more experienced/lazy you can start abbreviating more.

[EDIT] to finish answering your questions:

1) lt stands for linetype. You can see what the line types are for the current terminal with the test command.

2) noti stands for notitle, which does what you think.

3) The last two lines draw f(1-g(x)) with no title and a 0.75pt wide red line; and f(12.5*g(x)) with no title and a 0.75pt gray line.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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