bugGNU Octave - Bugs: bug #37328, errorbar default is to connects...

 
 

bug #37328: errorbar default is to connects points

Submitted by:  Aqeel Akber <aeqel>
Submitted on:  Tue 11 Sep 2012 11:08:34 AM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: Wont FixAssigned to: None
Originator Name: Open/Closed: Closed
Release: 3.6.3Operating System: GNU/Linux

Add a New Comment(Rich Markup)
   

You are not logged in

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

 

(Jump to the original submission Jump to the original submission)

Thu 29 Aug 2013 03:38:04 PM UTC, comment #6:

Re-titling report to reflect that the remaining issue here is that Octave follows Matlab in connecting points in an errorbar plot with a line. This may be undesirable from the average practitioner's perspective, but a strong case would need to be made to change it since this could break existing scripts.

Rik <rik5>
Project Administrator
Wed 12 Sep 2012 06:13:23 PM UTC, comment #5:

The issue turns out to be complex. There is a very long discussion in this bug report (bug #29057) about all the difficulties in errorbar plots. Some of the things that came up are that connecting the points is Matlab-compatible behavior and that cycling through markers could be done through the LineStyleOrder property.

I agree that connecting the points is not a sensible default. If you have the energy, I would ask you to politely submit your request that the default be changed to the octave-maintainers mailing list. You can reference this bug report and lay out the case for why breaking with Matlab compatibility makes sense in this instance. Octave generally strives for compatibility, but we also go our own way if we think the Mathworks decision wasn't great.

In the mean time, I would just add your own format codes to your errorbar plot line to get what you want.

The trouble with legends is real and is unrelated to errorbars. I opened a a separate bug report for that (bug #37337).

Rik <rik5>
Project Administrator
Wed 12 Sep 2012 03:23:56 AM UTC, comment #4:

Hi Rik, thanks for your participation.

I should clarify that all the plots attached were made with the same script. Using your first test case provides no difference.

(3.2.4): The errorbar bug in 3.2.4 after downgrading is identical to that of bug #30998 and Simon's proposed fix works. It is a ugly hack but works well. I'm not sure why the behaviour changed with the same package from the debian repo's.

(3.6.3):
Using the code

Works as intended with gnuplot 4.6.0.
Sorry, it's just a change in syntax I did not pick up which changed in versions. This bug can be considered closed.

I must say though, the implementation of errorbar in 3.6.3 is poorer than in 3.2.4.
If I may add some suggestions here? As I am a very heavy user of Octave. (I also have found another problem)
Firstly, it is important to understand Error bar plots ordinarily don't have lines connecting the points.

1. Do not have errorbar lines connected by default instead make it an option.
2. In 3.2.4 the marker style of the error bar changes for multiple plots by default. This is great.
3. (PROBLEM WITH 3.6.3): When a legend is created in 3.6.3 of error bar plots it does not show the marker style. If the plot is printed in monochrome it will be impossible to differentiate the plots. In 3.2.4 there is not this issue. I have attached two images as png files showing the difference.

In fact, after applying fix to the bug #30998 of 3.2.4's errorbar function it is perfect and 3.6.3's should be identical to this.

(file #26538, file #26539)

Aqeel Akber <aeqel>
Tue 11 Sep 2012 06:17:55 PM UTC, comment #3:

You might try this simple test case and see whether it works.

If this works then I would take a look at your invocation of errorbar. The documentation says that different data sets need to be separated by a FMT specifier such as '~'. Perhaps that isn't being done. The docs also say that any line styles or color choices must occur after the errorbar FMT specifier. For example,

To have red 'X' marks for the plot points. Maybe the FMT string isn't being handled correctly.

Incidentally, I am running gnuplot 4.4.0 in case it matters.

Rik <rik5>
Project Administrator
Tue 11 Sep 2012 05:14:14 PM UTC, comment #2:

A very peculiar thing occurred. I downgraded from 3.6.2 to 3.2.4 on my desktop in order to create an errorbar plot and the errorbar plot shows the same problem.

I have created 3 identical plots and placed them in a PDF file:

Figure 1: errorbar plot working as intended using Octave 3.2.4 I made a few weeks ago. Looking absolutely beautiful!

Figure 2: The same plot made with Octave 3.2.4 after I downgraded from 3.6.2 on my Desktop computer (from the Debian repos) showing the bug.

Figure 3: The same plot made with Octave 3.6.3 using my Laptop (Debian Squeeze).

(file #26535)

Aqeel Akber <aeqel>
Tue 11 Sep 2012 04:03:22 PM UTC, comment #1:

Could you attach two images, one from 3.2.4 without the issue and the second from 3.6.3 with the issue, so that I can directly compare them.

Rik <rik5>
Project Administrator
Tue 11 Sep 2012 11:08:34 AM UTC, original submission:

The errorbar function in 3.6.2 and 3.6.3 connects the plotted points with lines.
I did not have this issue using Octave 3.2.4 from the Debian squeeze repositories; it only appeared along with other bugs after upgrading Octave.

OS: Debian Squeeze 64-bit.

Code to repeat problem:

Aqeel Akber <aeqel>

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #26538:  errorbar324.png added by aeqel (20KiB - image/png - errorbar problem in legend.)
file #26539:  errorbar363.png added by aeqel (20KiB - image/png - errorbar problem in legend.)
file #26535:  octave_errorbar_bug.pdf added by aeqel (95KiB - application/pdf - 3 plots highlighting the bug.)

 

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)
  • -unavailable- added by aeqel (Submitted the item)
  • -unavailable- added by aeqel
  •  

    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 10 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 29 Aug 2013 03:38:04 PM UTCrik5CategoryPlotting with gnuplot=>Plotting
      Item GroupInaccurate Result=>Matlab Compatibility
      StatusNeed Info=>Wont Fix
      Open/ClosedOpen=>Closed
      Summaryerrorbar incorrectly connects points=>errorbar default is to connects points
    Wed 12 Sep 2012 03:23:56 AM UTCaeqelAttached File-=>Added errorbar324.png, #26538
      Attached File-=>Added errorbar363.png, #26539
    Tue 11 Sep 2012 05:14:14 PM UTCaeqelAttached File-=>Added octave_errorbar_bug.pdf, #26535
    Tue 11 Sep 2012 04:03:22 PM UTCrik5StatusNone=>Need Info
    Tue 11 Sep 2012 11:08:34 AM UTCaeqelCarbon-Copy-=>Added aeqel

    Back to the top


    Powered by Savane 3.1-cleanup1