- #1
abonatto
- 14
- 0
I have a dat file with multiple data sets, with the following structure:
# t = 0.0 , ...
-10.000 0.00001 1.000001 ...
-9.000 0.00002 0.900001 ...
...
10.000 0.00005 1.000001 ...
# t = 0.2 , ...
-10.000 0.00301 1.000203 ...
-9.000 0.02222 0.900043 ...
...
10.000 0.00025 1.000551 ...
What I need to do is to plot a 3d surface, where the axis are:
- the block data number; in gnuplot I do this using the index as a pseudocolumn "-2", of the data block (splot 'phi_02.dat' u -2:1:4 w l ); this axis is like the time evolution of my system (every 0.2 secs I write a data block in the dat file, for example).
- Column 1 of the dat file (every block has the same values in this column; it is the spatial coordinate, from -10 to 10, for example).
- Any of the other 6 columns (Column 4, for example; I will need to make a plot for each column).
I tried to import the file (data=Import["phi_02.dat"]), but I just could not figure out how to avoid the first "text line" (#t = 0.0, ...), before each data block, and how to plot what I need.
Any suggestions?
# t = 0.0 , ...
-10.000 0.00001 1.000001 ...
-9.000 0.00002 0.900001 ...
...
10.000 0.00005 1.000001 ...
# t = 0.2 , ...
-10.000 0.00301 1.000203 ...
-9.000 0.02222 0.900043 ...
...
10.000 0.00025 1.000551 ...
What I need to do is to plot a 3d surface, where the axis are:
- the block data number; in gnuplot I do this using the index as a pseudocolumn "-2", of the data block (splot 'phi_02.dat' u -2:1:4 w l ); this axis is like the time evolution of my system (every 0.2 secs I write a data block in the dat file, for example).
- Column 1 of the dat file (every block has the same values in this column; it is the spatial coordinate, from -10 to 10, for example).
- Any of the other 6 columns (Column 4, for example; I will need to make a plot for each column).
I tried to import the file (data=Import["phi_02.dat"]), but I just could not figure out how to avoid the first "text line" (#t = 0.0, ...), before each data block, and how to plot what I need.
Any suggestions?