Forums | Admin

Discussion Forums: help

Start New Thread Start New Thread

 

By: Jess ______
RE: Error "Need full using spec for x time da [ reply ]  
2006-06-29 15:21
I was having the same problem. Gnuplot needs to know how many columns of data you have, so:

plot.data<<Gnuplot::DataSet.new([x,y]) do |ds|.
ds.using = "1:2"
ds.width = "impulses ls 1"
end

if you have time data as well,
x = ['20.04.2006 12:00'] then
ds.using = "1:3"


By: Mirko Stocker
Error "Need full using spec for x time data" [ reply ]  
2006-04-24 06:03
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