|
From: Jan N. <jnn...@go...> - 2010-05-27 17:07:34
|
Hi all, i have to plot a lot of datafiles in which the position of the columns could change. A change of the datafiles is not possible. So VarOne could be e.g on Pos 1 in one file, then on Pos. 17. So i wrote a script that writes the Variable Positions in a file like VarOne=17 VarTwo=12 and load the file at the beginnning. That works fine, but now i have to change some values by a factor. Something like plot filename using 1:($2*1.1) of course works. But it does not work with the User Variables, e.g. plot filename using VarOne:($VarTwo*1.1) Does anyone knows a solution? With best regards Jan |
|
From: Xiao-Yong J. <xj...@co...> - 2010-06-03 17:27:06
|
On Thu, 27 May 2010 19:07:06 +0200, Jan Nowack wrote: > Hi all, > i have to plot a lot of datafiles in which the position of the columns > could change. A change of the datafiles is not possible. So VarOne > could be e.g on Pos 1 in one file, then on Pos. 17. So i wrote a > script that writes the Variable Positions in a file like > VarOne=17 > VarTwo=12 > and load the file at the beginnning. That works fine, but now i have > to change some values by a factor. Something like > plot filename using 1:($2*1.1) > of course works. But it does not work with the User Variables, e.g. > plot filename using VarOne:($VarTwo*1.1) > Does anyone knows a solution? Hi, I don't know what is the best way to achieve this, but I found myself sometimes using a combination of 'sprintf' and 'eval'. In your case, I believe 'eval' would be suffice eval 'plot filename using '.VarOne.':($'.VarTow.'*1.1)' Best, Xiao-Yong > With best regards > Jan -- J c/* __o/* X <\ * (__ Y */\ < |
|
From: Thomas S. <t.s...@fz...> - 2010-06-03 18:57:23
|
plot filename using VarOne:(column(VarTwo)*1.1) Jan Nowack-2 wrote: > > Hi all, > i have to plot a lot of datafiles in which the position of the columns > could change. A change of the datafiles is not possible. So VarOne > could be e.g on Pos 1 in one file, then on Pos. 17. So i wrote a > script that writes the Variable Positions in a file like > VarOne=17 > VarTwo=12 > and load the file at the beginnning. That works fine, but now i have > to change some values by a factor. Something like > > plot filename using 1:($2*1.1) > > of course works. But it does not work with the User Variables, e.g. > > plot filename using VarOne:($VarTwo*1.1) > > Does anyone knows a solution? > > With best regards > > Jan > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > > -- View this message in context: http://old.nabble.com/something-like-plot-filename-using-VarOne%3A%28%24VarTwo*1.1%29-possible--tp28767804p28771588.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: Jan N. <jnn...@go...> - 2010-06-06 12:43:22
|
Thanks! 2010/6/3 Thomas Sefzick <t.s...@fz...>: > > plot filename using VarOne:(column(VarTwo)*1.1) > > > Jan Nowack-2 wrote: >> >> Hi all, >> i have to plot a lot of datafiles in which the position of the columns >> could change. A change of the datafiles is not possible. So VarOne >> could be e.g on Pos 1 in one file, then on Pos. 17. So i wrote a >> script that writes the Variable Positions in a file like >> VarOne=17 >> VarTwo=12 >> and load the file at the beginnning. That works fine, but now i have >> to change some values by a factor. Something like >> >> plot filename using 1:($2*1.1) >> >> of course works. But it does not work with the User Variables, e.g. >> >> plot filename using VarOne:($VarTwo*1.1) >> >> Does anyone knows a solution? >> >> With best regards >> >> Jan >> >> ------------------------------------------------------------------------------ >> ThinkGeek and WIRED's GeekDad team up for the Ultimate >> GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the >> lucky parental unit. See the prize list and enter to win: >> http://p.sf.net/sfu/thinkgeek-promo >> _______________________________________________ >> gnuplot-info mailing list >> gnu...@li... >> https://lists.sourceforge.net/lists/listinfo/gnuplot-info >> >> > > -- > View this message in context: http://old.nabble.com/something-like-plot-filename-using-VarOne%3A%28%24VarTwo*1.1%29-possible--tp28767804p28771588.html > Sent from the Gnuplot - User mailing list archive at Nabble.com. > > > ------------------------------------------------------------------------------ > ThinkGeek and WIRED's GeekDad team up for the Ultimate > GeekDad Father's Day Giveaway. ONE MASSIVE PRIZE to the > lucky parental unit. See the prize list and enter to win: > http://p.sf.net/sfu/thinkgeek-promo > _______________________________________________ > gnuplot-info mailing list > gnu...@li... > https://lists.sourceforge.net/lists/listinfo/gnuplot-info > -- Tittardsfeld 104 52072 Aachen Fon: 0241/4016496 |