oh, i forgot the 'index 0' in the dummy plot:
plot "OUT.txt" using \
0:(my_title="m = ".stringcolumn(2)." C = ".stringcolumn(3)." b =
".stringcolumn(4) , 0/0) \
every ::0::0 index 0 notitle, \
"" index 0 using 1:5:7 title my_title with yerrorbars
yes, 'every ::0::0' means the 1st line of a data set.
'0/0' means 'undefined', and undefined points are not plotted.
AceStrider1 wrote:
>
> Thomas,
>
> Thank you very much for the prompt reply and suggestion. Your method
> seems to work at concatenating. It is correctly reading the values from
> the columns. The only strange thing now is that gnuplot in now using the
> first line of my last group (index 79) instead of (index 0).
>
> For Instance my datafile out.txt looks like:
>
> #NPARTICLES m C b A B STDEV_A
> 100000 1 0.1 0 0.020280 0.232320 4.457500E-04
> 1000000 1 0.1 0 0.020740 0.232260 1.425000E-04
> 10000000 1 0.1 0 0.020800 0.231650 4.512800E-05
> 100000000 1 0.1 0 0.020740 0.231890 1.425300E-05
>
>
> 100000 5 0.1 0 0.021760 0.001920 4.613800E-04
> 1000000 5 0.1 0 0.021780 0.002020 1.459800E-04
> 10000000 5 0.1 0 0.021670 0.002070 4.604500E-05
> 100000000 5 0.1 0 0.021690 0.002050 1.456700E-05
>
>
> 100000 10 0.1 0 0.021710 0.000020 4.608600E-04
> 1000000 10 0.1 0 0.021570 0.000010 1.452900E-04
> 10000000 10 0.1 0 0.021710 0.000010 4.608800E-05
> 100000000 10 0.1 0 0.021680 0.000010 1.456300E-05
>
>
> 100000 20 0.99 4 0.767610 0.013350 1.335600E-03
> 1000000 20 0.99 4 0.770680 0.013310 4.204000E-04
> 10000000 20 0.99 4 0.769150 0.013460 1.332500E-04
> 100000000 20 0.99 4 0.769360 0.013440 4.212400E-05
>
> So I am plotting the correct data, except the labels are off. I confirmed
> it was the first line of my
> last index group by changing 0.99 to 0.79 and plotting.
>
> This is what my gnuplot file looks like now:
>
> reset
>
> set terminal svg
> set output "CASE0.svg"
> set xlabel 'Particles'
> set ylabel 'Fraction'
> set grid
> set log x
> set xrange [ 10000 : 1000000000]
> set title "Albedo"
>
> plot "OUT.txt" using 0:(my_title="Analog m = ".stringcolumn(2)." C =
> ".stringcolumn(3)." b = ".stringcolumn(4) , 0/0) \
> every ::0::0 notitle, "" index 0 using 1:5:7 title my_title with
> yerrorbars 3
>
> set terminal wxt
> replot
>
>
>
> I believe every ::0::0 means to use the first line only.
> I am not so sure about 0/0 <-- it did not seem to make a difference if I
> had it in there or not.
>
> Thanks Again,
>
> Adan
>
>
> AceStrider1 wrote:
>>
>> Hi All,
>>
>> I am trying to set a title on the legend based on data from multiple
>> columns.
>>
>> for instance the file name is out.txt:
>>
>> #N m C b A B STDEV_A STDEV_B
>> 100000 1 0.1 0 0.020280 0.232320 4.457500E-04 1.335500E-03
>> 1000000 1 0.1 0 0.020740 0.232260 1.425000E-04 4.222800E-04
>> 10000000 1 0.1 0 0.020800 0.231650 4.512800E-05 1.334100E-04
>> 100000000 1 0.1 0 0.020740 0.231890 1.425300E-05 4.220400E-05
>>
>> I am plotting using the following:
>>
>> set log x
>> set xrange [ 10000 : 1000000000]
>> set title "Albedo"
>> plot "OUT.txt" index 0 using 1:5:7 title column(2) with yerrorbars 3
>>
>>
>>
>> This works, but I am having a difficult time combining say column 2, 3,
>> and 4 as in
>> "m = ".column(2)." C = ".column(3)." b = ".column(4)
>>
>> Does anyone have any idea?
>>
>> Thank,
>> Adan
>>
>>
>>
>
>
--
View this message in context: http://old.nabble.com/Multiple-string-concatenation-after-title-using-column%28n%29-function-tp29962624p29974706.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|