From bug-request at octave dot org Thu Jan 5 08:30:14 2006 Subject: Re: gnuplot gset From: "John W. Eaton" To: "Sean O'Rourke" Cc: bug at octave dot org Date: Thu, 5 Jan 2006 09:29:58 -0500 On 5-Jan-2006, Sean O'Rourke wrote: | Thanks. Can we keep it as a function that takes a single string | as argument and lexes that instead of implicitly quoting the | entire command line? e.g. | | gnuset("term post eps font \"Palatino\" ... "); | gnuplot("x as linesp, y as points pt 3"); Yes, I think you can define your own functions that do this. I don't think gnuset is a good name though (seems to imply some connection to GNU, when there is none). | It seems like it should be easy to shove the string through the | existing lexer, but I'm not at all familiar with that part of | Octave. I think the following will work function xgset (s) evalin ("base", sprintf ("__gnuplot_set__ %s", s)); endfunction function xgplot (s) evalin ("base", sprintf ("__gnuplot_plot__ %s", s)); endfunction | One way to get back the original functionality from this would be | to have a "mark_as_,A|(Bbercommand" that would pass the entire | unevaluated line to the command function (possibly after joining | continuation lines). Please see the mark_as_rawcommand function that is in 2.9.x, specifically to support the implementation of the current __gnuplot_set__, __gnuplot_plot__, etc. functions. | I don't really care if this feature is left | out, but at least having the single-string versions would be | worthwhile. I have no plans to add functions like this to Octave. jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------