[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Setting XTick
From: |
Andrew Hills |
Subject: |
Setting XTick |
Date: |
Tue, 18 Aug 2009 13:16:17 -0400 |
Hi all,
I'm using Octave 3.0.1 (as it's the one provided by Ubuntu, which I
use), and the dateaxis command invariably produces errors, so I set
about to write my own quick-and-dirty datetick function.
The issue I'm having is with `set(gca(),'xtick',somexticks)`. Let's
say I have equal-sized arrays t and o, t being Octave/MATLAB dates
converted from UNIX time via `datenum(1970,1,1,0,0,t)`, and o being a
measurement of clock offset in microseconds, gathered from NTP's
peerstats log. Let's say t spans a little more than a day, and I want
ticks marking the hours. Using
`set(gca(),'xtick',floor(t(1)):1/24:ceil(t(end)))` produces exactly
one tick mark. Varying the 1/24 changes its position. The command
`get(gca(),'xtick')` returns the expected array of ticks (i.e., the
one I provided). Why is it only showing one, and how can I force it to
show the ones I want?
If necessary, I can post my entire script, as well as the data.
--Andrew Hills
- Setting XTick,
Andrew Hills <=