help-octave
[Top][All Lists]
Advanced

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

Re: Using dateaxis to format x-axis


From: dbateman
Subject: Re: Using dateaxis to format x-axis
Date: Tue, 16 Sep 2008 19:35:42 -0700 (PDT)



rmcd wrote:
> 
> I must be misunderstanding the use of Dateaxis (in the financial package).
> I'm using 3.0.2, Cygwin.
> 

No you misunderstood nothing. In Octave 3.0.x the tick position are
calculated when they are drawn. Therefore the get(gca(),'xtick') command
return [] which of course has no zero index. This might be fixed in dateaxis
with

x = get (gca(), strcat (ax, "tick);
if (isempty (x))
  # Must be 3.0.x. Force drawnow to get the ticks right
  drawnow ();
   x = get (gca(), strcat (ax, "tick);
endif

the workaround for you is

x=732000:732010;
plot(x,x);
drawnow();
dateaxis("x"); % I get the same result with and without "x".
ticks=get(gca(), "xtick") % this is a diagnostic, returning [](0x0)

D.
-- 
View this message in context: 
http://www.nabble.com/Using-dateaxis-to-format-x-axis-tp19523725p19524384.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

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