Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.graphics.apps.gnuplot > #1271
| From | Steven Du <www.clemson.edu@gmail.com> |
|---|---|
| Newsgroups | comp.graphics.apps.gnuplot |
| Subject | Plotting two files into one plot with different rows in two files |
| Date | 2012-07-14 21:45 -0700 |
| Organization | http://groups.google.com |
| Message-ID | <40efd74d-2b76-4f00-b785-e3f6f46f5fec@googlegroups.com> (permalink) |
Hello,
I browsed all topics about plotting two files into one plot. None of them mentioned with different rows problems. The scenario I met is as follows:
File A is babies standard growth file, which show babies growth chart based on history data, like 95%, 90%, 75%, 50%, 25%, 10%, and 5%. In this data file there are only a 5 rows (born, 3 month, 6 month, 9 month and 12 month) with 8 columns (month + 7 Y values).
File B is what parents input. The times they input can be any dates in the first year (365 possibilities) due to their various measuring time. I need to plot this line also onto the standard's plot.
The current code is:
plot "A.dat" using 1:2 title '95%' with lines 1, \
"" using 1:3 title '90%' with lines 2, \
"" using 1:4 title '75%' with lines 3, \
"" using 1:5 title '50%' with lines 4, \
"" using 1:6 title '25%' with lines 5, \
"" using 1:7 title '10%' with lines 6, \
"" using 1:8 title '5%' with lines 7, \
"B.dat" using 1:2 title 'your baby' with points 3
But this require rows of A is the same as rows of B.
How to handle the problems like this. Do I have to use "least common denominator" method, expanding both File A and B into 365 rows and plot? I think this is too clumsy.
Any elegant method?
Thanks in advance.
Steven.
Back to comp.graphics.apps.gnuplot | Previous | Next | Find similar
Plotting two files into one plot with different rows in two files Steven Du <www.clemson.edu@gmail.com> - 2012-07-14 21:45 -0700
csiph-web