|
From: Ethan A M. <eam...@gm...> - 2013-03-10 00:21:26
|
On Saturday, 09 March 2013, Ludovic GIRAUD wrote:
> Hi fellow gnuplot users,
>
> >
> > I made a C++ program that uses gnuplot as an interface, everything
> > works fine
> > unless the command given to gnuplot exceeds a limited size (20 I think):
> >
> > This is how the command is constructed:
> >
> > string command="plot \"wallet.txt\" using 1 w l";
> > for (int i=2;i<vectwalletvect.size();i++)
> > {
> > command.append(", \"wallet.txt\" using "+inttostring(i)+" w l");
> > }
> > g11.cmd(command);
> >
> > Works well except when i is above 20...
> >
> > Please help!
I can't help you with the C++ aspect, but placing such a command
in a file and then feeding it to gnuplot
gnuplot < longcommand.gp
or cat longcommand.gp | gnuplot
works fine here. I tried up to 80 copies in the above format
before I got bored, for a total line length of >2K characters.
Perhaps the limitation you run into has to do with the pipe
implementation in g11.cmd (which you don't show)?
For what it's worth, the same effect could be produced by
a single very short gnuplot command:
plot for [i=1:20] "wallet.txt" using i w l
Ethan
|