bugGNU Octave - Bugs: bug #46972, errorbar() example code is...

 
 

bug #46972: errorbar() example code is incorrect

Submitted by:  None
Submitted on:  Mon 25 Jan 2016 10:07:01 PM UTC  
 
Category: DocumentationSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Documentation
Status: FixedAssigned to: None
Originator Name: DoubleDeepIndentOriginator Email: -unavailable-
Open/Closed: ClosedRelease: 3.8.2
Operating System: Any

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Sat 30 Jan 2016 04:24:17 PM UTC, comment #1:

Yes, the example could be coded more clearly. I changed both the sample code in the manual and the code that generates the image in this cset (http://hg.savannah.gnu.org/hgweb/octave/rev/8b1e030d3d4f). Marking as fixed and closing report.

Rik <rik5>
Project Administrator
Mon 25 Jan 2016 10:07:01 PM UTC, original submission:

Relevant documentation page:
https://www.gnu.org/software/octave/doc/interpreter/Two_002dDimensional-Plots.html

The example code for errorbar() appears to be incorrect.

should be:

to produce the provided plot.

Per the help docs (which are correct), when plotting lower- and upper-side errors in this way, errorbars are drawn from DATA(n)-LERR(n) to DATA(n)+UERR(n) rather than DATA(n)+LERR(n) to DATA(n)+UERR(n) as the current example code assumes.

Also notice that rand(), rather than randn(), must be used to avoid random positive and negative numbers (not what we want).

Plots produced by the two versions on Octave 3.8.2 are attached.

Anonymous

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

Attached Files
file #36164:  errorbar-bad.png added by None (29KiB - image/png - error-bad.png: current documentation example code output; error-good.png: corrected code output)
file #36165:  errorbar-good.png added by None (29KiB - image/png - error-bad.png: current documentation example code output; error-good.png: corrected code output)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by rik5 (Posted a comment)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only project members can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 30 Jan 2016 04:24:17 PM UTCrik5StatusNone=>Fixed
      Open/ClosedOpen=>Closed
    Mon 25 Jan 2016 10:07:01 PM UTCNoneAttached File-=>Added errorbar-bad.png, #36164
      Attached File-=>Added errorbar-good.png, #36165

    Back to the top


    Powered by Savane 3.1-cleanup1