From help-octave-request at bevo dot che dot wisc dot edu Thu Jan 22 18:54:34 1998 Subject: Re: problem passing variable to gnuplot From: Dirk Eddelbuettel To: Ray Anderson Cc: help-octave at bevo dot che dot wisc dot edu Date: Thu, 22 Jan 1998 19:53:42 -0500 (EST) Ray> If I just put the number in the gnuplot command everything works as I Ray> expect with no error: Ray> Ray> octave:24> gset xrange [1:2] Ray> octave:25> Ray> Ray> What is the proper way to accomplish the passing of variable Ray> arguments to gnuplot? You can use eval on the return from sprintf as in octave:1> eval(sprintf("gset xrange [%d:%d]", 2, 3)) octave:2> plot((1:10)) (creates window with a straight line between 2 and 3 as selected by gset) Regards, Dirk -- edd at rosebud dot ml dot org According to the latest official figures, http://rosebud.ml.org/~edd 43% of all statistics are totally worthless.