bugGNU Octave - Bugs: bug #49017, drawing grid uses RGBA color...

 
 

bug #49017: drawing grid uses RGBA color syntax incompatible with gnuplot 4.4

Submitted by:  Mike Miller <mtmiller>
Submitted on:  Tue 06 Sep 2016 09:23:00 PM UTC  
 
Category: Plotting with gnuplotSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Incorrect Result
Status: FixedAssigned to: None
Originator Name: Open/Closed: Closed
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)

Thu 08 Sep 2016 06:42:29 PM UTC, comment #10:

Yes this looks like it's working for me now with gnuplot 4.4 and 4.6.

Please closed as fixed if you think this is resolved.

Mike Miller <mtmiller>
Project Administrator
Thu 08 Sep 2016 03:59:23 AM UTC, comment #9:

OK, let's consider the uint8() a temporary fix then.

I started placing uint8() throughout for all the color processing, but then I thought maybe it best to go back and check what the Octave property processing is doing first with color because there don't seem to be any errors, yet so many uses of color.

Dan Sebald <sebald>
Thu 08 Sep 2016 03:21:48 AM UTC, comment #8:

For the color problems with trimesh, see bug #42561.

Rik <rik5>
Project Administrator
Thu 08 Sep 2016 03:20:23 AM UTC, comment #7:

@Dan: I checked in your change here (http://hg.savannah.gnu.org/hgweb/octave/rev/25122f114a24).

Instead of

I used

The uint8 function automatically does a round operation. It might be useful to replace round() with uint8() more generally in _gnuplot_draw_axes_.

This is Ready for Test.

Rik <rik5>
Project Administrator
Wed 07 Sep 2016 09:44:48 PM UTC, comment #6:

Something like the following:

Seems to solve the functional issues. Although the uint8() keeps the values within a valid range, the color scaling/translation is obviously off for "trimesh 1" demo (the negative numbers are a strong indicator). I think this comment suggests that the code needs to be revisited:

Should we treat the trimesh example as a separate bug?

Dan Sebald <sebald>
Wed 07 Sep 2016 08:06:45 PM UTC, comment #5:

I'll have a look. The has-feature test is the right idea, but obviously Octave gnuplot toolkit isn't constructing the 8-bit field properly in some cases. It should first limit between 0 and 255, and not treat numbers as signed as a couple examples herein indicate.

Dan Sebald <sebald>
Wed 07 Sep 2016 03:31:54 PM UTC, comment #4:

Indeed, setting alphastr to an empty string unconditionally gets rid of the error for me.

There is a similar error, but not due to the same cause, in "demo trimesh 1". This error occurs with gnuplot 4.4 but not with gnuplot 4.6:

I see several instances of what look to me like bad color specs throughout the gnuplot input:

Mike Miller <mtmiller>
Project Administrator
Tue 06 Sep 2016 10:48:57 PM UTC, comment #3:

Okay, this makes sense then. In _gnuplot_draw_axes_.m, do_linestyle_command ()

I guess there should be a _gnuplot_has_feature_ test for whether the RGBA syntax is accepted. If it isn't then alphastr should be the null string.

Just guessing, something like

Dan will know about this.

Rik <rik5>
Project Administrator
Tue 06 Sep 2016 10:33:43 PM UTC, comment #2:

Ack. In addition, running "grid off" and "grid on" repeatedly shows the same error each time the grid lines are drawn. Same error with a line plot with "grid on".

Updating summary description to reflect the more accurate symptom.

Mike Miller <mtmiller>
Project Administrator
Tue 06 Sep 2016 10:29:30 PM UTC, comment #1:

Offhand, it looks like the difference between RGB and RGBA with alhpa channel. The grid is black with an opacity of 0.15. 0.15*255 = 38, which is 0x26, which is what I see in the color specification.

As a test, try

This should have the grid turned off and it may work. If it does, then it is clearly in the grid drawing routine.

Rik <rik5>
Project Administrator
Tue 06 Sep 2016 09:23:00 PM UTC, original submission:

Plotting any 3D plot with gnuplot 4.4 results in the following error message from gnuplot

A plot is shown and the colors look equivalent to later versions of gnuplot, but the surface is transparent. The same error message and the same color string is shown for any 3D plot.

Adding sebald in cc.

Mike Miller <mtmiller>
Project Administrator

 

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

Attach File(s):
   
   
Comment:
   

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

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

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 08 Sep 2016 07:14:48 PM UTCrik5StatusReady For Test=>Fixed
      Open/ClosedOpen=>Closed
    Thu 08 Sep 2016 03:20:23 AM UTCrik5StatusConfirmed=>Ready For Test
    Tue 06 Sep 2016 10:33:43 PM UTCmtmillerStatusNone=>Confirmed
      Summary3d plotting uses colors incompatible with gnuplot 4.4=>drawing grid uses RGBA color syntax incompatible with gnuplot 4.4
    Tue 06 Sep 2016 09:23:00 PM UTCmtmillerCarbon-Copy-=>Added sebald

    Back to the top


    Powered by Savane 3.1-cleanup1