|
From: ivana r. <iva...@mf...> - 2017-08-13 09:48:11
|
Hi Theo, I've noticed that 'title "" ' erase the corresponding key item, so the code could be bit easier...much easier if onecould be sure that Index3=1 always exists prior to higher values. > I just thought, I overlooked a very simple, short and efficient method. > Seems not to be the case. well, 1, gnuplot is a "unix" program. As such, it can do something quite well: to plot. It doesn't care about files. It supposes that you know what you want to plot and provide requested files. Under Unix/Linux, It'd be the default solution to generate a plot script for each directory outside gnuplot. So, the primary task is how simple can be this shell/pearl/... script. Secondly, it's nice that you can even do inside script as well now in V5+, although you need to run syscalls. (Personally, I'd appreciate if I can disable all syscalls on startup at all. Otherwise I need to check if there are commands such 'rm -rf /', 'chmod -R a+r ~/.ssh', etc. in other-hands scripts.) 2, gnuplot is currently highly developed. Iteration and arrays will probably continue development. Currently, on my wish-list there is (1) a possibility to index arrays by letters OR get ascii code of chars, and (2) to manipulate the iterating variable. Both would helpful also in your case. And you should install Ethan's patch sourceforge.net/p/gnuplot/bugs/_discuss/thread/fcab9784/ af51/attachment/iteration_bug_v5.patch for correct execution of iterations. 3, As I mentioned, the code can be rewritten to be more "word"-oriented. In my opinion, such a code is more straight. You can found one here: pebble.matfyz.cz/for_Theo.gplot (I previously choose the pure-array version since you seem you like it.) 4, note that the code may be simpler if one would know what you prefer to do if something. E.g., do you prefer make empty plots to keep the Index1-based layout or would it be OK if plots fold? Is there sometimes void in Index3 series? Etc. 5, under Unix/Linux, you can avoid warnings redirecting fd2: - run "gnuplot 2>/dev/null" - and inside code 'set print "/dev/stdout"' - note that this disable warnings as well as errors. To see errors, you can run e.g., ``if (GPVAL_ERRNO) { print "Error ", GPVAL_ERRNO, ": ", GPVAL_ERRMSG; reset error; }'' when ever you except any. (I'm not sure how to convert this for Windows, but I guess it should be possible to work with STDOUT and STDERR there.) Sincerely Iva <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> Virusfritt. www.avast.com <https://www.avast.com/sig-email?utm_medium=email&utm_source=link&utm_campaign=sig-email&utm_content=webmail> <#DAB4FAD8-2DD7-40BB-A1B8-4E2AA1F9FDF2> |