gnuplot, pull X data from file, specify Y data at cmd line?
Hey all,
I was wondering if its possible with gnuplot, for me to pull the X axis points from a file while plotting, but on the gnuplot command line specify Y for all points. Something like this: Code:
plot "data/flood" Y 3 with linespoints title "degree_in" |
I have seen no indications that this is possible, and so when I want to do something similar to this, I use python and have it do whatever processing I want, and then use gnuplot just for plotting.
|
I have had a similar/almost same problem many times. But in the end, i ended creating a file or a stream by sed, awk or any other program and then piping it to gnuplot, e.g. this one is from 2 days ago:
cat ../../input/gnuplot-att2d.in | sed -e "s*OUTPUT*atts_$FUN.eps*g" < gnuplot-att2d.in \ gnuplot Here i was only changing the EPS output file name, but I am sure that you can understand my approach. Btw. if you perhaps need to concatenate columns within input file, use "paste" unix command. |
Quote:
scrunch script: Code:
[[ "$1x" == "x" ]] && exit |
Hello!
If I understand your problem right, following approach may be useful: Code:
gnuplot> plot "<(awk '{print $4,$3}' u-log-10)" w l Code:
plot "< source-of-data" So you can plot all points from "data/flood" being projected to the line y=3 as follows: Code:
plot "< awk '{print $1, 3}' data/flood" with linespoints title "degree_in" |
alternatives to gnuplot
have you tried PyX, or PyXPlot?
|
All times are GMT -5. The time now is 10:21 PM. |