Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

CSV, column header, line header and splot

Help
Rot Ulet
2010-10-26
2013-02-10
  • Rot Ulet
    Rot Ulet
    2010-10-26

    Hello,
    I have some difficulties to get a "simple" csv file (tab separated) to be plotted correctly. The first line of the matrix is the column headers and the first column is the line headers. I can not get the line/column header taken into account nor the date/time correctly read ! I am running gnuplot 4.4.

    Here is my data file :

    08/10/2010 00:00 09/10/2010 00:00 10/10/2010 00:00 11/10/2010 00:00 12/10/2010 00:00 13/10/2010 00:00 14/10/2010 00:00 15/10/2010 00:00 16/10/2010 00:00 17/10/2010 00:00 18/10/2010 00:00 19/10/2010 00:00 20/10/2010 00:00 21/10/2010 00:00 22/10/2010 00:00 23/10/2010 00:00 24/10/2010 00:00 25/10/2010 00:00
    3.850 60.547 45.919 36.310 17.142 18.115 20.295 10.430 19.175 13.610 15.257 15.847 11.874 13.257 17.318 13.342 16.752 24.860 0.000
    4.550 9.530 16.514 16.098 12.305 18.547 20.110 15.276 18.408 14.643 16.609 11.470 15.645 19.830 11.407 16.407 15.526 17.516 10.410
    5.250 16.305 14.630 23.265 15.826 14.773 15.480 18.097 16.170 24.970 15.007 14.277 18.212 20.130 16.180 20.832 14.327 12.305 0.000
    5.950 14.677 17.086 14.270 13.984 12.303 22.650 23.398 12.860 12.580 11.856 20.680 15.500 15.793 13.740 24.130 11.450 17.175 19.815
    6.650 13.730 31.650 13.293 18.930 16.155 12.322 13.770 12.897 12.150 20.690 15.350 14.057 18.400 14.910 11.503 18.017 12.679 0.000
    7.350 18.130 15.270 15.738 12.030 11.297 14.435 10.300 17.110 15.052 13.360 15.935 17.543 11.902 15.020 13.931 13.504 18.554 27.460
    8.050 15.373 23.675 18.130 16.763 21.035 12.598 12.411 20.007 17.223 21.650 12.263 12.918 16.545 21.853 17.863 14.388 14.362 19.360
    8.750 12.055 16.632 19.292 13.375 12.453 30.093 19.387 16.047 11.686 17.882 17.246 19.042 10.312 15.806 16.016 18.102 18.742 11.620
    9.450 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
    10.150 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000 0.000
    10.850 38.180 72.671 20.060 19.424 12.747 19.710 14.605 0.000 12.916 17.183 18.584 15.978 17.064 20.615 16.273 14.884 19.531 11.090
    11.550 67.920 102.189 43.209 15.395 15.094 18.298 14.900 16.222 13.019 20.325 16.042 15.174 16.453 14.112 19.961 15.178 22.235 18.475
    12.250 13.370 18.830 12.900 0.000 0.000 10.380 11.090 16.717 18.830 30.793 17.600 0.000 14.780 10.380 0.000 10.850 0.000 0.000
    12.950 0.000 31.670 27.450 43.020 27.450 0.000 0.000 34.603 26.215 29.210 50.910 0.000 23.230 0.000 30.970 35.190 31.437 0.000
    13.650 17.595 15.835 10.510 13.280 15.634 11.960 18.295 16.098 12.960 12.727 18.885 13.394 11.787 13.968 22.785 14.706 12.490 20.410
    14.350 9.500 26.922 18.035 27.578 12.270 12.637 14.400 16.468 15.412 16.948 21.170 20.025 18.178 11.170 27.596 13.325 15.180 15.660
    15.050 14.605 10.976 19.618 9.940 18.538 20.590 14.190 17.874 20.365 14.110 30.440 13.722 18.165 14.732 17.643 19.485 13.404 26.215
    15.750 0.000 16.450 15.438 20.525 12.080 11.960 11.375 10.380 18.208 31.052 13.756 15.893 17.590 14.460 14.954 26.426 13.269 15.480
    16.450 14.367 14.893 15.624 16.437 21.025 25.217 30.200 18.882 15.655 11.742 12.876 11.587 11.843 18.647 15.980 15.597 15.530 16.360
    17.150 12.930 14.318 12.752 16.958 15.363 14.877 14.564 11.463 18.735 28.753 15.762 14.160 17.418 15.597 31.053 25.568 21.157 20.145
    17.850 12.840 14.983 17.894 21.053 0.000 22.165 11.390 23.707 15.655 12.568 17.195 14.812 11.522 20.444 16.710 17.913 12.589 13.720
    18.550 59.817 97.446 92.675 98.435 122.519 13.896 20.003 13.927 27.445 15.907 24.105 13.105 13.985 13.235 20.347 15.340 17.626 15.480
    19.250 72.190 85.042 117.591 74.445 134.875 13.896 24.606 18.830 17.206 18.357 55.948 12.283 13.786 12.736 23.195 17.522 13.720 10.380
    19.950 14.160 12.753 21.608 21.638 14.483 18.824 15.429 27.093 13.963 30.612 41.319 17.486 10.688 20.640 13.427 17.872 20.463 12.840

    and the gnuplot script:
    set pm3d map
    set timefmt "%d/%m/%Y %H:%M"
    set xdata time
    set format x "%s"
    set key left
    #set key autotitle columnheader
    set xlabel "date/time"
    set ylabel "depth"
    set pm3d implicit at b
    set palette
    splot 'datafile.csv' matrix with pm3d

    I hope someone may help me !!

    Thanks !

     
  • Rot Ulet
    Rot Ulet
    2010-10-26

    also post on the newsgroup …