user1535776
user1535776

Reputation: 607

Naming the legend entry in Gnuplot, while plotting from a data file

I am plotting a data file with six columns in gnuplot. If the plot of column 2 against column 1 is x(t), I want that line in the legend something like x(t), NOT what I currently get for column two against column one, "trial.dat" u 1:2.

How would I name the legend line, then?

Upvotes: 24

Views: 48065

Answers (1)

mgilson
mgilson

Reputation: 309929

You use the title keyword in the plot line:

plot 'trial.dat' u 1:2 title "x(t)"

You can also get rid of the legend entry all together by using notitle.

Upvotes: 41

Related Questions