On Mon, 5 Dec 2011, Sven Schreiber wrote: > On 12/05/2011 12:45 PM, Riccardo (Jack) Lucchetti wrote: >> On Mon, 5 Dec 2011, Sven Schreiber wrote: >> >>> sprintf strColindices "%d", seq(1,cols(mymatrix)) >>> gnuplot @strColindices --with-lines <etc> >> >> A technical note to Sven's idea: the problem is not the space (or lack >> thereof): a print format like "%3d" would have solved the problem; the >> problem is that when you "printf" a matrix, a newline is automtically >> appended, which confuses the gnuplot command. >> > > Hm, I see. I seem to remember a special backspace character \b -- would > it work to add that to the string, in the hope of deleting the appended > newline character \n?
I don't think we support \b. > Alternatively, would it work to process strColindices further with: > strsub(strColindices,"\n","") Seems like it probably should, but in fact the \n escape is not recognized as a single character to be replaced. > (BTW: I don't understand the help text for strsplit().) <hansl> string s = "Three blind mice" printf "The Trinity is %s in One.\n", strsplit(s, 1) printf "I dig %s Lemon Jefferson.\n", strsplit(s, 2) printf "The cat chased the %s.\n", strsplit(s, 3) </hansl> Allin