2

I have file with many columns that I'd like to plot as follows:

plot for [i=1:30] 'test' using 1:i w lp

This gives the plot I want, but when I do set key, then the key I see has all lines labeled as 1:i:

enter image description here

How can I make this output more meaningful, by actually displayin the value of i?

1 Answer 1

3

If you don't set an explicit title, gnuplot selects an automatic title based on the plain plot command call. If you want a meaningful title, you must give it explicitly, like

plot for [i=1:30] 'test' using 1:i w lp title sprintf("column %d", i)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.