help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Setting XTick


From: John W. Eaton
Subject: Setting XTick
Date: Tue, 18 Aug 2009 13:52:55 -0400

On 18-Aug-2009, Andrew Hills wrote:

| 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?

There were many graphics improvements going from 3.0.1 to 3.2.2.  It
might be easier to upgrade first.

jwe


reply via email to

[Prev in Thread] Current Thread [Next in Thread]