Skip to content
Advertisement

Script to plot multiple graphs in gnuplot

I try to write a script which will be executed by the shell to use several txt-files in a directory to plot multiple lines in a graph with gnuplot. So if I type in the command for one picture, the results are as imagined. Here you can see the command:

JavaScript

Now my Script looks like this:

JavaScript

The script edits every txt-file and creates a jpg but only with the first graph, the “Red Channel”. I also tried it alternativly with a seperation like , between the different lines but it didn’t work. Also tried to use just '' instead of “/dev/stdin” but nothing happend then at all.

Advertisement

Answer

What you are trying to do won’t work because your first plot will consume the entire stdin. There are also other problems. I am not at a computer to test, but I think you’ll be closer with:

JavaScript
User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement