bugGNU Octave - Bugs: bug #49108, gnuplot: demo ezmeshc draws...

 
 

bug #49108: gnuplot: demo ezmeshc draws contour plot in only one color

Submitter:  Rik <rik5>
Submitted:  Fri 16 Sep 2016 09:06:00 PM UTC
   
 
Category:  Plotting with gnuplot Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Regression
Status:  Fixed Assigned to:  None
Originator Name:  Open/Closed:  * Closed
Release:  * 4.2.0-rc1 Operating System:  * Any
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Jump to the original submission

Mon 19 Sep 2016 12:42:20 AM UTC, comment #9: 

@Dan: I agree that the color interface to gnuplot probably needs a re-write.  That sounds like a job that should happen after the 4.2 release.

Rik <rik5>
Group administrator
Mon 19 Sep 2016 12:35:59 AM UTC, comment #8: 

@Dan: Thanks for the patch.  I pushed it here http://hg.savannah.gnu.org/hgweb/octave/rev/12ea89cb1237

@Avinoam: Thanks for testing.

I'm marking as fixed and closing reprot.

Rik <rik5>
Group administrator
Sun 18 Sep 2016 09:07:51 PM UTC, comment #7: 

Dan's patch solves the problem.
Checked on Win-10.

Avinoam Kalma <avinoam>
Group Member
Sun 18 Sep 2016 04:51:12 PM UTC, comment #6: 

OK, I missed the patch edgecolor case.  This meshc example is one of those hggroup configurations that uses patches.  (As a side note, I notice in the side-by-side comparison HTML page that the contour level spacing isn't consistent with Matlab.)

Attached is a fix for the ezmeshc example, but I'm not sure if everything is covered still as far as color processing.  There remains some patch-sub-marker cases in _gnuplot_draw_axes_.m that have some color-related code.  I'm reluctant to change too much just before a release, but this color processing is getting very repetitive, and there are redundant tests like:


          ## patch outline
          if (!(strcmp (obj.edgecolor, "none")
                 && (strcmp (obj.marker, "none")
                     || (strcmp (obj.markeredgecolor, "none")
                         && strcmp (obj.markerfacecolor, "none")))))
[snip]
            if (isfield (obj, "edgecolor"))


I.e., the code already uses edgecolor, so Octave interpretation would have failed by time of the "isfield" test.  Also, there are several tests that check whether the color data has three elements.  Now, I'm guessing that is meant to test that color data is an RGB triad, but it should really be direction-specific because it seems to me there could be some case where there are three elements in some graphics object.  That is,

RGB:
[0.23  0.74  0.48]

Three elements (e.g., triangle):
[0.23
0.74
0.48]

Then again, could there be a fourth entry for alpha channel?  Maybe the test should be that color data has only one row.

It feels to me that this color processing should be overhauled.  The change I made with scaled data using the palette index simplified things but there could be more simplification.  Maybe create a color processing subfunction, or perhaps move the color processing to after all the graphics object color data setup.  If anyone has an idea of conceptually where best color can be processed, please make a suggestion.  We'll aim for post 4.2 to simplify things.

(file #38542)

Dan Sebald <sebald>
Fri 16 Sep 2016 11:03:35 PM UTC, comment #5: 

Using hg bisect, the cset that introduced this regression was


The first bad revision is:
changeset:   22419:be969d43d95f
user:        Daniel J Sebald <daniel.sebald@ieee.org>
date:        Sat Aug 06 02:27:11 2016 -0500
summary:     Rework color scaling for gnuplot toolkit (bug #48664)


I'm adding Dan to the CC list for this bug.

Rik <rik5>
Group administrator
Fri 16 Sep 2016 10:40:35 PM UTC, comment #4: 

The difference between the two plots is that the contours at Z=0 are all purple for gnuplot , but change color appropriately for OpenGl toolkits.

Rik <rik5>
Group administrator
Fri 16 Sep 2016 09:17:36 PM UTC, comment #3: 

I see they are monochrome (just not gray)...

Dmitri.

Dmitri A. Sergatskov <dasergatskov>
Fri 16 Sep 2016 09:16:04 PM UTC, comment #2: 

Also  with gnuplot

Dmitri.



Dmitri A. Sergatskov <dasergatskov>
Fri 16 Sep 2016 09:13:15 PM UTC, comment #1: 

I still gets colors in bookmark:   
changeset:   22475:e511f86fb230
bookmark:    @
tag:         tip
user:        Rik <rik@octave.org>
date:        Tue Sep 13 08:35:47 2016 -0700
summary:     doc: Remove Emacs chapter from manual.

Dmitri.



Dmitri A. Sergatskov <dasergatskov>
Fri 16 Sep 2016 09:06:00 PM UTC, original submission:  

This is a fairly recent regression.  In the image for 'demo ezemshc 1' at http://josoansi.de/octave_plot_compare/compare_plot_demos_02.html the contours are colored.

Rik <rik5>
Group administrator

 

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

Attach Files:
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by avinoam (Posted a comment)
  • -email is unavailable- added by sebald (Updated the item)
  • -email is unavailable- added by rik5
  • -email is unavailable- added by dasergatskov (Updated the item)
  • -email is unavailable- added by rik5 (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only group members can vote.

     

    Follow 7 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-19 rik5 StatusPatch Submitted Fixed
        Open/ClosedOpen Closed
    2016-09-18 avinoam StatusNone Patch Submitted
    2016-09-18 sebald Attached File- Added octave-gnuplot_patch_edgecolor_bug49108-djs2016sep18.patch, #38542
    2016-09-16 rik5 Carbon-Copy- Added sebald
    2016-09-16 dasergatskov Attached File- Added Screenshot_from_2016-09-16_16-14-43.png, #38528
    2016-09-16 dasergatskov Attached File- Added Screenshot_from_2016-09-16_16-12-27.png, #38527

    Back to the top

    Powered by Savane 3.13-cf05.
    Corresponding source code