|
From: Thomas S. <t.s...@fz...> - 2009-04-24 12:57:57
|
with version >=4.2 a textstring can be read from a file using commands your operating system provides, have a look at the 1st and 2nd example in: http://gnuplot.sourceforge.net/demo/stringvar.html Alice5785 wrote: > > Hi! > I searched for a possibilty to plot textstrings from a file (e.g. the > slope out of fit.log) in gnuplot as a label and so I got this answer to a > similar problem > Did I get it right, that there is no way to "call" a text string from a > file and put it in a gnuplot-label? > > > > Tammo Heeren-2 wrote: >> >>> Hi, >>> I have a problem with labelling my plots at an arbitrary position (set >>> label >>> "... %f" '???filename and column/line???' at ....) using values from a >>> file. >> >> I don't think that this is possible. >> You might be able to somehow do it with variables that you set to contain >> your text. But I >> don't know how you would set those variables. I don't think you can set >> variables using a >> datafile (like the plot command). Would be nice though. You could have an >> external >> program write a file 'setvariables.gp' containing: >> >> set <variable> = <text> >> >> and execute 'setvariables.gp' in your script, like: >> >> load setvariables.gp >> >> Then you could use <variable> in your label command instead of the text. >> That might work. >> >>> Searching in the gnuplot manual did not help unfortunately. A >>> google-search >>> did not do the job either. Perhaps I have to use the awk(?) or sed (?) >>> command? Anyway, as the value I would like to be as label is not the >>> only >>> one in the line of my data file, perhaps awk will not work? >>> Right now, my data file consists of two columns, from where I am >>> plotting >>> all except the last line (with the every command). The interesting >>> number in >>> the last line is the one in the second column which should be the label >>> of >>> the graph. >>> I am pretty new to the unix/gnuplot area. >>> That's why the online helping tools/manuals for awk/sed ... are a bit >>> too >>> short for me to understand without lots of examples. >>> >>> Additionally I would like to implement underneith the plot a few lines >>> of >>> text from another textfile like a caption, is this possible with >>> gnuplot? >>> Thanks a lot for your help and sorry if I am posting an already answered >>> question, I could not find any related answer while searching in the >>> forums >>> archive. >>> Cheers >>> Fusselpelusa >> >> >> >> >> -- >> Tammo Heeren, Ph.D >> mailto: Tam...@ie... >> >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share >> your >> opinions on IT & business topics through brief surveys -- and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Gnuplot-info mailing list >> Gnu...@li... >> https://lists.sourceforge.net/lists/listinfo/gnuplot-info >> >> > > -- View this message in context: http://www.nabble.com/Label-value-from-file-and-caption-under-the-graph-tp5680184p23215950.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |