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: anonymous
Subject: [Octave-bug-tracker] [bug #44936] stairs(x,y,'r'); omits many stairs (!) and has spikes; save as .svg introduces odd lines.
Date: Mon, 27 Apr 2015 09:01:19 +0000
User-agent: Mozilla/5.0 (Windows NT 5.1; rv:37.0) Gecko/20100101 Firefox/37.0

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

                 Summary: stairs(x,y,'r'); omits many stairs (!) and has
spikes; save as .svg introduces odd lines.
                 Project: GNU Octave
            Submitted by: None
            Submitted on: Mon 27 Apr 2015 09:01:17 UTC
                Category: Octave Function
                Severity: 3 - Normal
                Priority: 5 - Normal
              Item Group: Incorrect Result
                  Status: None
             Assigned to: None
         Originator Name: Nicky McLean
        Originator Email: address@hidden
             Open/Closed: Open
         Discussion Lock: Any
                 Release: 3.8.2
        Operating System: Microsoft Windows

    _______________________________________________________

Details:

   Originally developed for matlab and works as expected. Under Octave,
oddities, ruining the result. The data are electricity power measurements,
half-hour averages, thus each datum is to be represented as a horizontal bar
extending over its time span when just a few days are being covered - so the
"stairs" style of plot.
   Test data (Asample.csv) offers two day's worth, thus 96 values. Only 27
stairs appear. Some steps have small spikes up or down at stair boundaries,
for instance between the fifth and sixth stair as shown. The greeen dots in
the screengrab (Figure1Screengrab.jpg) are added debug stuff to show the first
dozen values: plot(xx(1:12),yy(1:12)/GnashScale,'g.'); yet only three stairs
are shown for those data.
   When on the Figure 1 window, File>Save as>Asample.svg was selected (for the
version without green dots), Inkscape shows four lines from various positions
along the stairway to near 10 on the y-axis. Further, the stairway is
different, showing 32 steps!

   The stairs command is at line 448, stairs(xx,yy/GnashScale,colour) in file
GnashPlot.m which is unfortunately rather large as it is indended to deal with
mass plotting and offer various options. Two commands suffice for this
problem:

Gnash Asample.csv
GnashPlot

   The added debugging lines to reveal the xx and yy arrays (converted for
readability into half-hour number, and megawatts rather than kilowatts - the
/GnashScale) give results that look like proper numbers: no NaN for example.
   Plot attempts for much larger data files (covering a decade of half-hourly
data, say) seem to omit classes of the plottery (classes: for each day, a bar
upper quartile to maximum, lower quartile to minimum, horizontal dash for the
median; daily averages, weekly stairs) and the .svg attempts have many more
than just four lines heading for the y-axis, but this could be due to
altogether too many plot items.
   Except for the debugging insertions, the .m files have been used via matlab
for some years, though with incremental additions as annoyances became
irksome...
   



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 27 Apr 2015 09:01:17 UTC  Name: Asample.csv  Size: 6kB   By: None
I can't find any other grumble about 'stairs', but perhaps it is not so
popular.
<http://savannah.gnu.org/bugs/download.php?file_id=33801>
-------------------------------------------------------
Date: Mon 27 Apr 2015 09:01:17 UTC  Name: Asample.svg  Size: 11kB   By: None
I can't find any other grumble about 'stairs', but perhaps it is not so
popular.
<http://savannah.gnu.org/bugs/download.php?file_id=33802>
-------------------------------------------------------
Date: Mon 27 Apr 2015 09:01:17 UTC  Name: Figure1Screengrab.jpg  Size: 64kB  
By: None
I can't find any other grumble about 'stairs', but perhaps it is not so
popular.
<http://savannah.gnu.org/bugs/download.php?file_id=33803>
-------------------------------------------------------
Date: Mon 27 Apr 2015 09:01:17 UTC  Name: GnashPlot.zip  Size: 36kB   By: None
I can't find any other grumble about 'stairs', but perhaps it is not so
popular.
<http://savannah.gnu.org/bugs/download.php?file_id=33804>

    _______________________________________________________

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]