|
From: mikeincousa <mik...@gm...> - 2013-03-23 19:07:21
|
Very very beginner with gnuplot.
Simply seeking to graph stock series.
Where am I going wrong?
*Data:* (short span to avoid the blank line issue with nonconsecutive
dates--for now).
2013-03-11 68.81
2013-03-12 68.56
2013-03-13 68.47
2013-03-14 68.70
2013-03-15 68.51
#QQQ
*
Code*
set xdata time
set timefmt "%Y/%m/%d"
set xrange ["2013-03-11":"2013-03-15"]
set format x "%Y/%m/%d"
plot "/home/mike/QQQ2.txt" using1:2 [# or using1:3-see below]
*
Tests*
gnuplot> show xdata
x is set to time
gnuplot> show timefmt
read format for time on x axis is "%Y/%m/%d"
read format for time on t axis is "%Y/%m/%d"
read format for time on u axis is "%Y/%m/%d"
gnuplot> show xrange
set xdata time
set xrange [ "2013/01/01" : "2013/01/01" ] noreverse nowriteback
gnuplot> show format
tic format is:
x-axis: "%Y/%m/%d"
y-axis: "% g"
x2-axis: "% g"
y2-axis: "% g"
z-axis: "% g"
cb-axis: "% g"
>>>>>>>>>>
gnuplot> *plot* "/home/mike/QQQ2.txt" using1:2
Need full using spec for x time data
gnuplot> plot "/home/mike/QQQ2.txt" using1:3
Need full using spec for x time data
-------->>/adding a space/ after using..
gnuplot> plot "/home/mike/QQQ2.txt" using 1:3
warning: Skipping data file with no valid points
^
Can't plot with an empty x range!
>>>>>*Reference*
Confusing, as are the others hits in response to the error msg.
http://gnuplot.10905.n7.nabble.com/Histograms-amp-co-td5731.html#a573
--
View this message in context: http://gnuplot.10905.n7.nabble.com/Error-Need-full-using-spec-for-x-time-data-tp17207.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: mikeincousa <mik...@gm...> - 2013-03-23 20:18:19
|
"Can't plot" might have been a more accurate subject line. I ran the same code with and without a space delimiter after "using" I ran various combinations of "using" and various combinations of "1" and "2" and "3." All runs generated error messages. -- View this message in context: http://gnuplot.10905.n7.nabble.com/Error-Need-full-using-spec-for-x-time-data-tp17207p17208.html Sent from the Gnuplot - User mailing list archive at Nabble.com. |
|
From: BBands <bb...@gm...> - 2013-03-23 23:52:24
|
http://gnuplot.sourceforge.net/docs_4.6/gnuplot.pdf page 113 John |
|
From: mikeincousa <mik...@gm...> - 2013-03-24 01:38:33
|
I found the page in the book , but still I cannot see the errors in my ways.
Could you be more specific?
Does the file or the code contain typos?
I just noticed I am also getting a illegal month error.
I modeled my code from gnuplot> help time/date
====
Suppose the file "data" contains records like
03/21/95 10:00 6.02e23
This file can be plotted by
set xdata time
set timefmt "%m/%d/%y"
Press return for more:
set xrange ["03/21/95":"03/22/95"]
set format x "%m/%d"
set timefmt "%m/%d/%y %H:%M"
plot "data" using 1:3
which will produce xtic labels that look like "03/21".
--
View this message in context: http://gnuplot.10905.n7.nabble.com/Error-Need-full-using-spec-for-x-time-data-tp17207p17210.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: BBands <bb...@gm...> - 2013-03-24 17:18:54
|
Try: set timefmt "%Y-%m-%d" as your data file uses '-' not '/'.
Also try the simplest plot command first and then add the formatting
stuff as needed.
John
On Sat, Mar 23, 2013 at 6:38 PM, mikeincousa <mik...@gm...> wrote:
> I found the page in the book , but still I cannot see the errors in my ways.
|
|
From: mikeincousa <mik...@gm...> - 2013-03-24 03:38:03
|
The fact that caret points to the y-values indicates a problem with the
y-data?
======
set xdata time
unset tics
set timefmt "%Y-%m-%d"
set xrange ["2013-03-11":"2013-03-15"]
set yrange ["65.00":"70.00"]
set timefmt "%m-%d-%y"
gnuplot> plot "/home/mike/QQQ2.txt" using 1:3
^
warning: Skipping data file with no valid point.
--
View this message in context: http://gnuplot.10905.n7.nabble.com/Error-Need-full-using-spec-for-x-time-data-tp17207p17211.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: mikeincousa <mik...@gm...> - 2013-03-24 17:06:29
|
posted the wrong block..
Right one...
set xdata time
unset tics
set timefmt "%Y-%m-%d"
set xrange ["2013-03-11":"2013-03-15"]
set yrange ["65.00":"70.00"]
gnuplot> plot "/home/mike/QQQ2.txt" using 1:3
^
warning: Skipping data file with no valid point.
--
View this message in context: http://gnuplot.10905.n7.nabble.com/Error-Need-full-using-spec-for-x-time-data-tp17207p17212.html
Sent from the Gnuplot - User mailing list archive at Nabble.com.
|
|
From: BBands <bb...@gm...> - 2013-03-24 17:29:37
|
Your example data file had two columns, do 'using 1:2' might work better.
go slowly
only use essentials
elaborate later
Trouble shooting hint: 'using 0:n' invokes a special case where x
equals the line number of the data file.
John
On Sun, Mar 24, 2013 at 10:06 AM, mikeincousa <mik...@gm...> wrote:
> posted the wrong block..
>
> Right one...
>
> set xdata time
> unset tics
> set timefmt "%Y-%m-%d"
> set xrange ["2013-03-11":"2013-03-15"]
> set yrange ["65.00":"70.00"]
> gnuplot> plot "/home/mike/QQQ2.txt" using 1:3
> ^
> warning: Skipping data file with no valid point.
|