Hi!
I'd like to print a diagram with dates as x-values, but i always get this error: "Need full using spec for x time data"
This is my code:
require 'gnuplot'
Gnuplot.open do |gp|
Gnuplot::Plot.new( gp ) do |plot|
plot.terminal 'postscript eps enhanced color "Helvetica" 12'
plot.output 'demo1.eps'
plot.xdata 'time'
plot.style 'line 1 lt 1 lw 5'
plot.timefmt '"%d.%m.%Y"'
plot.format 'x "%d.%m"'
plot.xrange '["01.04.2006":"31.04.2006"]'
x = ['20.04.2006']
y = ['10']
plot.data << Gnuplot::DataSet.new([x, y]) do |ds|
ds.with = "impulses ls 1"
end
end
end
It works if i use the same commands on gnuplot directly.
Thanks for your help!
Mirko
|