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

 
 

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

Submitted by:  Rik <rik5>
Submitted on:  Fri 16 Sep 2016 09:06:00 PM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Regression
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
Release: 4.2.0-rc1Operating System: Any

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)

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>
Project 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>
Project 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>
Project 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:

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

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

Rik <rik5>
Project 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 (file #38528), but change color appropriately for OpenGl toolkits.

Rik <rik5>
Project 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.

(file #38528)

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.

(file #38527)

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>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 19 Sep 2016 12:35:59 AM UTCrik5StatusPatch Submitted=>Fixed
      Open/ClosedOpen=>Closed
    Sun 18 Sep 2016 09:07:51 PM UTCavinoamStatusNone=>Patch Submitted
    Sun 18 Sep 2016 04:51:12 PM UTCsebaldAttached File-=>Added octave-gnuplot_patch_edgecolor_bug49108-djs2016sep18.patch, #38542
    Fri 16 Sep 2016 11:03:35 PM UTCrik5Carbon-Copy-=>Added sebald
    Fri 16 Sep 2016 09:16:04 PM UTCdasergatskovAttached File-=>Added Screenshot_from_2016-09-16_16-14-43.png, #38528
    Fri 16 Sep 2016 09:13:15 PM UTCdasergatskovAttached File-=>Added Screenshot_from_2016-09-16_16-12-27.png, #38527

    Back to the top


    Powered by Savane 3.1-cleanup1