bugGNU Octave - Bugs: bug #43032, surfc does not make contours...

 
 

bug #43032: surfc does not make contours visible

Submitted by:  None
Submitted on:  Wed 20 Aug 2014 01:55:39 PM UTC  
 
Category: PlottingSeverity: 3 - Normal
Priority: 5 - NormalItem Group: Matlab Compatibility
Status: ConfirmedAssigned to: None
Originator Name: Originator Email: -unavailable-
Open/Closed: OpenRelease: 3.8.0
Operating 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)

Fri 16 Dec 2016 06:53:52 PM UTC, comment #7:

This issue is (at least partly) still present in Octave 4.2.0.

When I run the demo script (from comment #3), then I still do not see the contour lines in the plot. After adding the first code line from comment #4, I then see the contour lines. But they are not properly colored as in the Matlab figure (as in comment #3).

Hartmut <hardy>
Sun 24 Aug 2014 06:40:10 PM UTC, comment #6:

Unfortunately, I think it is going to be a long while before the 4.2 release which would include the fix. Release 4.0 is the upcoming release and it is dedicated to the GUI. The GUI will become the default interface and right now bug fixing is targeting the GUI, rather than the other parts of Octave. I think perhaps 6 months to 4.0 and maybe 1.5 years to 4.2, unless there is an uptick in funding or volunteers. The 4.2 release is going to showcase the classdef Object Oriented programming interface as its major new feature.

Rik <rik5>
Project Administrator
Sun 24 Aug 2014 06:28:28 PM UTC, comment #5:

So one can say, this problem is fixed more or less in octave 4.x. I am very excited for octave 4.
Do you have a clue when this will be (more or less) stable?
At least stable enough for debian testing or unstable?
regards,

Anonymous
Sun 24 Aug 2014 06:07:04 PM UTC, comment #4:

Octave is still not 100% compatible with Matlab and it uses a different method for setting the Z-level for contours in a surfc plot.

After the surfc call in your script, instead of using a for loop to change the zdata, use

This works fine, but it requires running a development version of Octave (4.1.X) availble only if you build from Mercurial sources. Alas, this fix is not available in the current stable release (3.8.2).

I can achieve something like it by hacking your script after the surfc call.

This sets the zlevel property manually and then changes the zdata every so slightly to force a refresh of the contours.

Rik <rik5>
Project Administrator
Sun 24 Aug 2014 03:47:45 PM UTC, comment #3:

Hi
first of all I have to apologize. The code example was incomplete.
Please find attached the full code and the Matlab result.

Here some links to the supposed behaviour:

http://www.mathworks.com/matlabcentral/newsreader/view_thread/54747
http://www.mathworks.com/matlabcentral/answers/11575-multilevel-contour-plots

(file #31950, file #31951)

Anonymous
Thu 21 Aug 2014 11:00:34 PM UTC, comment #2:

Could you also upload the code segment as a file? The input parser for the text box converted everything between two multiplication symbols to bold which makes it hard to understand.

Rik <rik5>
Project Administrator
Thu 21 Aug 2014 12:56:23 PM UTC, comment #1:

I cannt use Matlab to test. Can you please show me what Matlab does here?

Jordi GutiƩrrez Hermoso <jordigh>
Project Administrator
Wed 20 Aug 2014 01:55:39 PM UTC, original submission:

E.g. the following code:

[x,y]=meshgrid([-10:0.1:10],[-10:0.1:10]); z = exp(1-0.05(x-1).^2-0.2(y+2).^2)+sin(x).^2.sin(y).^2.exp(0.05(1-x.^2-y.^2)).y.^2;
surfc(x,y,z,'EdgeColor','none');

shows the contour plots directly under the function. So one can not see them. The plot in MATLAB is first shifted and then the contour plots are at the bottom.

Anonymous

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #31950:  plotting.png added by None (30KiB - image/png)
file #31951:  plottingExample.m added by None (277B - text/plain)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by hardy (Posted a comment)
  • -unavailable- added by rik5 (Posted a comment)
  • -unavailable- added by jordigh (Posted a comment)
  •  

    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
    Sun 24 Aug 2014 06:07:04 PM UTCrik5Item GroupInaccurate Result=>Matlab Compatibility
      StatusNeed Info=>Confirmed
    Sun 24 Aug 2014 03:47:45 PM UTCNoneAttached File-=>Added plotting.png, #31950
      Attached File-=>Added plottingExample.m, #31951
    Thu 21 Aug 2014 12:56:23 PM UTCjordighStatusNone=>Need Info
      Summary behavior of surfc=>surfc does not make contours visible

    Back to the top


    Powered by Savane 3.1-cleanup1