Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #2083
| From | Ingo Thies <ingo.thies@gmx.de> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Re: how to access external variables ? |
| Date | 2011-01-30 13:08 +0100 |
| Message-ID | <8ql2lnF6unU1@mid.individual.net> (permalink) |
| References | <276f4205-ebd2-4178-89ea-a5e53191dfcb@m16g2000prc.googlegroups.com> |
Am 2011-01-30 12:45, schrieb gvdmoort: > But the title of the plot should be dependant of external variables, > so it can't be specified in the .dem file. It could be for instance > the time at this moment. Depending on what you particularly want, you could create an auxiliary file "aux.gp" containing statements like titlestring="yourtitle" (and also define, of course, numerical variables uses in the plot, accordingly) and load it into gnuplot by load "aux.gp" You can also convert numbers into strings via the sprintf function (it actually uses a C printf statement to create a string; please see the gnuplot help or gnuplot.pdf for more information) and concatenate strings with string3=string1.string2 or string3="something"."somethingelse".sprintf(...) etc. > And it could be interessant to save the plots in files with differents > names, dependant of such variables. You can define the output file name (which is set by set output <name>) using the strings created like shown above. Maybe there is another method I am not aware of, but passing variables via a helper file gives you a high degree of freedom. HTH, Ingo
Back to comp.graphics.apps.gnuplot | Previous | Next — Previous in thread | Find similar | Unroll thread
how to access external variables ? gvdmoort <gvdmoort@skynet.be> - 2011-01-30 03:45 -0800 Re: how to access external variables ? Ingo Thies <ingo.thies@gmx.de> - 2011-01-30 13:08 +0100
csiph-web