octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #44936] stairs(x,y,'r'); omits many stairs (!)


From: Nicky McLean
Subject: [Octave-bug-tracker] [bug #44936] stairs(x,y,'r'); omits many stairs (!) and has spikes; save as .svg introduces odd lines.
Date: Tue, 28 Apr 2015 09:34:19 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:37.0) Gecko/20100101 Firefox/37.0

Follow-up Comment #3, bug #44936 (project octave):

After getting some sleep (and signing up), I have just tried again to see
what's happening. The x-axis is a day number, of the order 723637 for the
first of April 1982. Thus, the second day's data has x-axis values of 723638 -
both with fractional parts for the fraction of the day. If I take the x-array
and calculate xh = (x - x(1))*24 the x-values are of the order 0:48, and, the
plot comes out correctly with the right number of steps (leaving aside the
issue of the first step) and no mysterious ticks.

Thus, the suggestion that the problem is caused by single-precision arithmetic
within the plotting system looks to explain the oddities. For what it's worth,
I've always used 31/12/1899 (a Sunday) as day zero precisely so as not to
strain the precision capacity, and used double precision anyway.

I tried graphics_toolkit gnuplot (as a command to Octave; it was accepted as
such or at least, no remark was made) but there was no improvement to my test
plot.

The way ahead looks to be a recasting of the scheme for the x-axis, perhaps
indeed rebasing to 31/12/1899 or even 1/1/2000 or similar to be in the
middle(ish) of the likely time spans, plus the consequent need to attend to
the details of the annotation of the x-axis, a definite strain on the
patience. So much for just "plot(x,y)" and the like, with just "datetick" for
annotation. I've always wanted (for example) the "year" annotation to be
placed in the <b>middle</b> of its year span, not under the tick marking its
start. Perhaps now I shall grind through the requirements to achieve this, if
it is possible...

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?44936>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

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