bugGNU Octave - Bugs: bug #48626, Patch with FaceColor...

 
 

bug #48626: Patch with FaceColor "flat" does not display correctly if "FaceVertexCData" is a scalar

Submitted by:  Markus Mützel <mmuetzel>
Submitted on:  Mon 25 Jul 2016 03:06:39 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: 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)

Tue 09 Aug 2016 10:11:19 PM UTC, comment #7:

@Dan: I pushed your fix for gnuplot here (http://hg.savannah.gnu.org/hgweb/octave/rev/f7b70f3a8fc1).

@Markus: I added your extra %!demo here (http://hg.savannah.gnu.org/hgweb/octave/rev/669fc8cf1fdd). We now have a primitive oct2mat converter within the dump_demos script so we no longer have to follow Matlab syntax quite so closely in %!demo blocks. I'm sorry that I led you astray with earlier advice on that subject.

Closing report.

Rik <rik5>
Project Administrator
Thu 04 Aug 2016 06:53:30 PM UTC, comment #6:

You are right: 'margin' does not seem to work. But that is probably something for a new bug report.

And also right: Lights are stationary with the axes.

Markus Mützel <mmuetzel>
Project Member
Thu 04 Aug 2016 06:20:34 PM UTC, comment #5:

The third demo is much better. I can see the difference in the fourth plot right away. The annotation text box for your note doesn't have much margin. It appears the margin doesn't work:

Perhaps I'm misunderstanding 'margin'.

The first two demos I don't understand how lighting works, but I'm not familiar with it. The light source is stationary with the plotting axes? Not the view, correct? Just something I need to get used to.

Dan Sebald <sebald>
Thu 04 Aug 2016 05:33:35 PM UTC, comment #4:

Thanks for pointing out the issues in demo isosurface 2.
The lighting was actually correct since isosurface without output arguments should display a lighted patch object. However, that was misleading here since the vertexnormals are popinting in different directions in the different subplots which made the patches appear differently when they shouldn't.

Attached, please find a changeset for isosurface.m which changes that demo in that way and uses Matlab compatible syntax as should be used in demos. I also moved the textbox a little bit more to the center of the figure and increased the font size slightly. Initially, this demo was thought as a test for the 'noshare' option and the different input types. Since tests should not display figures, I made it into a demo instead.
Additionally, a demo is added for the first example in comment #0.

(file #38107)

Markus Mützel <mmuetzel>
Project Member
Tue 02 Aug 2016 03:09:09 AM UTC, comment #3:

OK, thanks.

I'd say isosurface is good. It currently only has a couple demos, and the second demo is kind of uneventful. It looks like four dark green patches--at least until rotating the individual plots with Qt toolkit where the different color assignments can be seen. Perhaps we should choose a different viewing angle, such as in the attached screen shot. Note that when I rotate those four subplots, it appears there is still some kind of lighting effect going on. Is that a holdover from the first demo? Can't read the small font in the note in the upper left corner.

(file #38073)

Dan Sebald <sebald>
Mon 01 Aug 2016 11:39:11 AM UTC, comment #2:

I can confirm that your changeset fixes the examples for me.

Wrt new demos:
The second example is essentially what "demo surface 1" produces since hg-id e50536734855.
Should I prepare a changeset for the first example and post it here? Or should I open a new bug report for that? Should it better be added to isosurface.m as well or to patch.m like you suggested?

Markus Mützel <mmuetzel>
Project Member
Sat 30 Jul 2016 03:47:56 PM UTC, comment #1:

Nice examples. Consider adding as two separate demos to the patch routine. The mid-range color is valuable because it is easy to have the color range computation incorrect and still end up with extremal values (in this case purple and yellow).

Attached is a simple change that seems to work. I understand what the code is doing, but of course there are so many property values and scenarios that I'm not sure this covers everything. But, I too wonder why if there is a color value available why it should not be used in preference for the z-coordinates.

(file #38053)

Dan Sebald <sebald>
Mon 25 Jul 2016 03:06:39 PM UTC, original submission:

The following example produces an isosurface of a sphere with the "center color" (a blue-ish green) of the current colormap with qt and fltk and in Matlab:

With gnuplot, the sphere has no uniform color. Instead, the z-value (?) is used for coloring the patches.

The following example gives two nested spheres with qt and fltk and in Matlab. The inner one in violet the outer one in yellow (=edges of the default colormap):

Both spheres are violet with gnuplot.

Markus Mützel <mmuetzel>
Project Member

 

(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 rik5 (Posted a comment)
  • -unavailable- added by sebald (Updated the item)
  • -unavailable- added by mmuetzel (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Thu 11 Aug 2016 10:57:19 PM UTCrik5Open/ClosedOpen=>Closed
    Tue 09 Aug 2016 10:11:19 PM UTCrik5StatusNone=>Fixed
    Thu 04 Aug 2016 05:33:35 PM UTCmmuetzelAttached File-=>Added bug48626_isosurface_demos.patch, #38107
    Tue 02 Aug 2016 03:09:09 AM UTCsebaldAttached File-=>Added Screenshot from 2016-08-01 22:06:24.png, #38073
    Sat 30 Jul 2016 03:47:56 PM UTCsebaldAttached File-=>Added octave-gnuplot_patch_broadcast-djs2016jul30.patch, #38053

    Back to the top


    Powered by Savane 3.1-cleanup1