bugGNU Octave - Bugs: bug #49260, Differences in compare_plot_demos...


bug #49260: Differences in compare_plot_demos with gnuplot

Submitted by:  Rik <rik5>
Submitted on:  Mon 03 Oct 2016 08:53:31 PM UTC  
Category: Plotting with gnuplotSeverity: 2 - Minor
Priority: 3 - LowItem Group: Matlab Compatibility
Status: ConfirmedAssigned to: None
Originator Name: Open/Closed: Open
Release: devOperating 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)

Wed 13 Dec 2017 06:30:15 PM UTC, comment #9:

The issue with demo #7 for scatter has been fixed by cset a9be96afb39e for bug #52624.

Reviewing the remaining differences yields a much smaller list.

Rik <rik5>
Project Administrator
Thu 06 Oct 2016 09:31:18 PM UTC, comment #8:

I expanded the code to better see how scatter is getting a different color in gnuplot than in fltk.

With only three colors in the colormap, gnuplot always chooses the last one while fltk always chooses the middle one.

Rik <rik5>
Project Administrator
Thu 06 Oct 2016 09:20:19 PM UTC, comment #7:

I expanded the code in the demo for autumn to better show how gnuplot is getting the Z-depth stacking wrong between the axes object and axes children.

As you can see in the attached Postscript file, the axes layer is either on top, or maybe it is being alpha blended with the line objects from rgbplot.

The second Postscript file is after doing

(file #38679, file #38680)

Rik <rik5>
Project Administrator
Thu 06 Oct 2016 09:11:13 PM UTC, comment #6:

Since it was uncertain whether this will be the final bug fix for the error legend I pushed the cset to default (http://hg.savannah.gnu.org/hgweb/octave/rev/54332b6ddeb6).

Rik <rik5>
Project Administrator
Thu 06 Oct 2016 05:37:13 PM UTC, comment #5:

I've attached a changeset for the errorbar multiple legend entry problem, one of the bigger issues. The patch is actually not real big, but I shifted a big hunk of conditional code two spaces left which comes out jumbled. The key entries are constructed using phantom data.

The 'boxxyerrorbars' (i.e., error boxes) has no point type (see 'demo errorbar 5'), but the 'xyerrorbars' (i.e., error bars) does have a point type even though the demo does not activate it. I attempted adding a point type to error boxes, but confusion about documentation lead to object actually just being a 'boxxy', (i.e., a conventional box with x and y dimensions):


but I don't think that will happen.

So, this patch is a first step toward a satisfactory, but not complete solution I suggest applying. After that, since Octave goes to the lengths of defining a legend in terms of elementary plot objects, I will attempt some kind of hybrid that draws the legend along the lines of how current axes drawing is handled but make sure the text portion comes out reasonably balanced in terms of legend border. My intuition is that may not come out perfectly, hence the reason for applying this patch as an intermediate step.

(file #38677)

Dan Sebald <sebald>
Tue 04 Oct 2016 08:56:38 PM UTC, comment #4:

OK, I think I know what is going on. The error bars were removed:

I'm guessing because Octave plotting routines should take control of drawing the error bars rather than have gnuplot do so. I think what we should do for the key in this case is not add any entries for the lines, but instead draw some phantom lines having maybe only a NAN entry and be of the proper error bar style. Otherwise, there is no way to get a proper error bar key entry.

Dan Sebald <sebald>
Tue 04 Oct 2016 08:43:56 PM UTC, comment #3:

errorbar 3,4 Four keys in legend rather than two

Hmm, it's as if the code that set the variable 'errbars' is missing, deleted or something. All I see is an initialization:

but nothing after that. I would think that errbars should be assigned things like "xerr", "yerr", "boxxy", etc.


Tortoise HG has a convenient history search. Unfortunately, I can't COPY the table it creates and PASTE here. So, I will just list the changesets that have this type of line

They are:


The first couple (7541 and 10549) look like the addition of "xyerrorbars" and then a move of "xyerrorbars". The third (10597) looks like a removal of "xyerrorbars" by one user and then putting them back in place by another user. Could it be that some type of patch/branch wasn't merged properly or someone didn't realize they were working with an older file?

Dan Sebald <sebald>
Mon 03 Oct 2016 09:09:02 PM UTC, comment #2:

For the problems with the '@' character, if the "interpreter" property is set to "none" then they disappear. In the code, Octave replaces '@' with '\@', but this regexprep no longer works. Apparently, the replacement pattern now has to be '\\@'

I made that change here http://hg.savannah.gnu.org/hgweb/octave/rev/2bca08793651.

Rik <rik5>
Project Administrator
Mon 03 Oct 2016 08:54:37 PM UTC, comment #1:

@Dan: I added you as a CC for this report, but don't feel obligated to work on this immediately.

Rik <rik5>
Project Administrator
Mon 03 Oct 2016 08:53:31 PM UTC, original submission:

I ran dump_plot_demos today (10/31/16) to determine the state of the gnuplot toolkit. I don't think any of these are critical to the 4.2 release, but it would be good to address them, particularly the regressions, at some point.

Rik <rik5>
Project Administrator


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

Attach File(s):

Attached Files
file #38679:  cmap.ps added by rik5 (185KiB - application/postscript)
file #38680:  cmap2.ps added by rik5 (168KiB - application/postscript)


Depends on the following items: None found

   bug dependencies.


Carbon-Copy List
  • -unavailable- added by sebald (Posted a comment)
  • -unavailable- added by rik5 (Submitted the item)
  • -unavailable- added by rik5

    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
    Wed 13 Dec 2017 06:30:15 PM UTCrik5Summarygnuplot picks different color for patch when colormap is small=>Differences in compare_plot_demos with gnuplot
    Wed 16 Nov 2016 07:27:47 PM UTCrik5Severity3 - Normal=>2 - Minor
      Priority5 - Normal=>3 - Low
      Summarygnuplot visual differences to OpenGL toolkit=>gnuplot picks different color for patch when colormap is small
    Fri 14 Oct 2016 02:07:02 PM UTCrik5Dependencies-=>bugs #49341 is dependent
    Thu 06 Oct 2016 09:20:19 PM UTCrik5Attached File-=>Added cmap.ps, #38679
      Attached File-=>Added cmap2.ps, #38680
    Thu 06 Oct 2016 05:37:13 PM UTCsebaldAttached File-=>Added octave-gnuplot_key_errorbar_bug49260-djs2016oct06.patch, #38677
    Mon 03 Oct 2016 08:53:31 PM UTCrik5Carbon-Copy-=>Added sebald

    Back to the top

    Powered by Savane 3.1-cleanup1