Reginald Beardsley wrote:
> Is gnuplot able to plot date data as follows intelligently? Examining
> finance.dem suggests that it can't read dates for the X axis, but can
> label it w/ dates. The help function is completely opaque.
>
> Thanks,
> Reg
>
>
> #Date,Open,High,Low,Close,Volume,Adj Close
> 2008-10-06,10322.52,10322.52,9503.10,9955.50,7956020000,9955.50
> 2008-10-03,10483.96,10844.69,10261.75,10325.38,6716120000,10325.38
> 2008-10-02,10825.54,10843.10,10368.08,10482.85,6285640000,10482.85
> 2008-10-01,10847.40,11022.06,10495.99,10831.07,5782130000,10831.07
set xdata time
set timefmt "%Y-%m-%d"
set datafile separator ","
plot 'data' using 1:2:4:3:5 with candlesticks
If you don't like the default x-axis label format, you can change
that too:
set format x"%Y-%m-%d"
set xtics rotate by -45


|