Quote:
Originally Posted by Meson
Say I have the file testplot.p:
...
What tends to happen is that I get an error if I try to plot from this data more than once. This will work:
|
'-' is a special character that denotes standard in. This is to say that when you use '-' as a data source, your script will expect input from standard in which usually either user input or redirected script. In interactive gnuplot, it will give you a prompt asking for stdin.
The problem with the above example is that you're reading two instances of stdin which means that after you give it an "end" to signal the end of stdin, there's a second '-' that expects another stdin.
The solution then would be either to send the dataset to your script twice, i.e.:
Code:
plot '-' using ..., '-' using ...
data
data
data
end
data
data
data
end
or, better yet, is to use a file in place of '-', i.e.
Code:
plot 'some_file' using ..., 'some_file' using...
and then keep the data in a file. If the data is in a file, there's no need to use the keyword "end" as EOF signals the end of input.