Hi,
as far as I know, problems 1 and 3 cannot be done with gnuplot as it is.
but I would suggest you to write a shell script to write/rewrite the
gnuplot script and then start gnuplot. therefore you still only have one
script to execute.
for problem 1 you might write a shell script which does:
- check for number of columns in your datafile
- insert as many plot commands as there are columns at the end of the
gnuplot script template (you can do that with the 'cat' command; you
might control the inserted plot commands with command-line parameters as
well)
- run gnuplot
as for problem 1, I would suggest to do something similar for problem 3:
you can use the 'sed' command to substitute strings in files. when you
write a shell script then you can use the parameter $1 and substitute a
given string in your gnuplot script (can be everything) with the string
$1. after that just let gnuplot do its stuff.
I don't know about your second problem, and I haven't checked it, but
maybe you can 'trick' gnuplot in that case: switch off everything
visible for the plot (border, grid, key, axes, tics etc.) and plot an
'empty' file as your third plot. after that set your plot preferences
again the way you want it. in theory that should result in a 'blank' plot.
hope it will help,
bernhard
On 28.04.2010, at 11:30, bai...@eu... wrote:
>
>
>
> Hi,
>
> I have some question, on which i did not find any help elsewhere.
>
> 1. I would like to plot data from a file arranged in one block but
> unknown number of coloums (always at least 2), each coloum (except the
> first) is supposed to be plotted with the first coloumn being the x's.
> How can that be done and with what version of gnuplot?
>
> 2. assuming i have a multiplot layout 3,3 can i control somehow, that
> i only have 2 plots in the first row, and 3 in the remaining two?
>
> 3. When i write a gnuplot script with #!/usr/local/bin/gnuplot in the
> top line, can i hand over commandline parameters (ie like in bash with
> %1) ?
>
> Thanks a lot for your help!
>
> Greetings
|