[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
## Re: timescale as x-axis

**From**: |
Dmitri A. Sergatskov |

**Subject**: |
Re: timescale as x-axis |

**Date**: |
Fri, 26 Aug 2005 08:44:03 -0600 |

**User-agent**: |
Mozilla Thunderbird 1.0.6-1.1.fc4 (X11/20050720) |

Markus SchlĂ¶sser wrote:

Hi,
i'm having problems plotting data against a time-scaled x-axis.
x=[1:1:365];
y=[1:1:365];
plot (x,y);
gives me a straight line, as expected. But continuing with
__gnuplot_set__ xdata time
replot
gives me a wired zig-zagged line across the screen.
Octave version is 2.1.71
gnuplot version is 4.0 (same as with 3.7)
Any hints?

You need to tell gnuplot what is the format of your time data.
__gnuplot_set__ timefmt "%j"
sets it to "day of the year" (1 -- 365).
So all together
x=[1:1:365];
y=[1:1:365];
__gnuplot_set__ xdata time
__gnuplot_set__ timefmt "%j"
plot (x,y)
works for me.
(see "help timfmt" and related in gnuplot)

cu
Markus

Regards,
Dmitri.
--
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------

**timescale as x-axis**, *Markus SchlĂ¶sser*, `2005/08/26`
**Re: timescale as x-axis**,
*Dmitri A. Sergatskov* **<=**