Hi,
I am attempting to create an image plot of 3-dimensional matrix data in
which the x-axis is date/time data. I have had success doing this using 'set
timefmt "%s"', but this seems to fail in certain scenarios. To see what I
mean, observe the following simplified examples.
Example 1:
The plot appears to function properly here.
testdat.csv:
4,20000001,20000002,20000003,20000004
0.265,10,8,5,30000
0.290,110,7,6,5000
0.320,1200,8,7,600
0.375,13000,9,8,70
0.450,230,25,765,4
1.000,45,1000,20,1500
http://old.nabble.com/file/p34241078/testplot1.png
Example 2:
Simply adding a zero to each date/time observation causes the image plot to
plot along a diagonal.
Interestingly enough, if you add yet another zero to these values, the plot
will function properly again. Can anyone explain what is going on here?
testdat.csv:
4,200000010,200000020,200000030,200000040
0.265,10,8,5,30000
0.290,110,7,6,5000
0.320,1200,8,7,600
0.375,13000,9,8,70
0.450,230,25,765,4
1.000,45,1000,20,1500
http://old.nabble.com/file/p34241078/testplot2.png
Example 3:
Finally, this example gives me the error that I am trying to resolve:
Warning: empty x range [2e+008:2e+008], adjusting to [1.98e+008:2.02e+008]
"nonuniform_matrix.p", line 31: warning: Image grid must be at
least 2x2.
What is causing this error and how can I fix it?
testdat.csv:
4,200000001,200000002,200000003,200000004
0.265,10,8,5,30000
0.290,110,7,6,5000
0.320,1200,8,7,600
0.375,13000,9,8,70
0.450,230,25,765,4
1.000,45,1000,20,1500
http://old.nabble.com/file/p34241078/testplot3.png
Script (nonuniform_matrix.p):
set terminal png size 1024,768
set datafile separator ","
set output "testplot.png"
set xlabel "Date/Time"
set ylabel "Counts (Median Bin Diameter [µm])"
set xdata time
set timefmt "%s"
set format x "%Y-%m-%d\n%H:%M:%S"
set yrange[0.1915:1.0735]
set ytics("0.265" 0.265, "0.290" 0.412, "0.320" 0.559, "0.375" 0.706,
"0.450" 0.853, "1.000" 1)
set palette rgbformulae 0, 13, 10
set palette negative
set logscale cb
set cbrange [1:100000]
set view map
splot "testdat.csv" nonuniform matrix with image failsafe
--
View this message in context: http://old.nabble.com/Matrix-Time-Format-tp34241078p34241078.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|