gnuplot - Histogram Using 1st Row as Labels and Columns as Bins -
i trying make histogram plot uses first row xlabels , counts entries in each column, starting 3rd entry down, each distinct bin (total entries in 1st column dictates size of 1st bin, , on). after doing digging online , trying few methods, have not been able come code produces anywhere near need, appreciated. thank you!
you can import text in first row of file directly gnuplot using bash command within backquotes. imagine have following file:
cat >file<<eof text1 text2 text3 text4 eof then, in gnuplot, can import, text1 variable a , text4 variable b using awk:
a="`awk 'fnr==1 {print $1}' file`" b="`awk 'fnr==2 {print $2}' file`" now can use them wish, instance set xlabel a print text1 xlabel.
Comments
Post a Comment