bugGNU Octave - Bugs: bug #34567, Ridges in smooth plot

 
 

bug #34567: Ridges in smooth plot

Submitter:  Peter Jeffris <jeffris>
Submitted:  Sun 16 Oct 2011 10:12:23 PM UTC
   
 
Category:  None Severity:  3 - Normal
Priority:  5 - Normal Item Group:  Inaccurate Result
Status:  Invalid / Not an Octave Bug Assigned to:  None
Originator Name:  peter Open/Closed:  * Closed
Release:  * 3.2.4 Operating System:  * GNU/Linux
Fixed Release:  None Planned Release:  None
* Mandatory Fields

Add a New Comment Rich Markup
   

Mon 17 Oct 2011 09:02:52 PM UTC, comment #3: 

You're computing the matrix exponential. Not the exponential function.


e**[1 2; 3 4]


means


expm([1 2; 3 4])


which as you know is this: http://en.wikipedia.org/wiki/Matrix_exponential

I don't think this is the function you want to plot, which happens to have a value on the diagonal of the matrix that isn't what you want.

I'm closing this bug report as invalid. If I misunderstood the situation, we may reopen it.

Jordi GutiƩrrez Hermoso <jordigh>
Group Member
Mon 17 Oct 2011 08:21:14 PM UTC, comment #2: 

"octave:7> [x,y] = meshgrid(-2*pi:.2:2*pi);
octave:8> z = e**(x).*cos(y);
octave:9> surf(x,y,z)
octave:10> print -dpng bad_figure.png"

I noticed when I looked at the code again that I forgot to use elemental exponentiation for the e^x term. The correct plot looked nice.

I don't know enough about how these are supposed to work to know if the graph I accidentally produced is right or not, so the ridges are probably just the result of some operation I don't understand. I'm sorry about that if it turns out to be a goose chase.

I still observed the bug with certain tiles on the surface being transparent to some degree. I attached two examples of this:

"octave:12> [x,y] = meshgrid(-2*pi:1:2*pi);
octave:13> z=e.**(x).*cos(y)
octave:14> surf(x,y,z)
octave:15> z=e**(x).*cos(y)
octave:16> surf(x,y,z)
octave:17> view
Display all 2138 possibilities? (y or n)
octave:17> help view
`view' is a function from the file /usr/share/octave/3.2.4/m/plot/view.m

 -- Function File:  view (AZIMUTH, ELEVATION)
 -- Function File:  view (DIMS)
 -- Function File: [AZIMUTH, ELEVATION] = view ()
     Set or get the viewpoint for the current axes.


Additional help for built-in functions and operators is
available in the on-line version of the manual.  Use the command
`doc <topic>' to search the manual index.

Help and information about Octave is also available on the WWW
at http://www.octave.org and via the -email is unavailable-
mailing list.
octave:18> view(50)
error: view: expecting single argument to be 2 or 3
error: called from:
error:   /usr/share/octave/3.2.4/m/plot/view.m at line 43, column 2
octave:18> view(50,25)
octave:19> view(40,25)
octave:20> view(30,25)
octave:21> view(20,25)
octave:22> view(-5,25)
octave:23> hold on; print -dpng bad_figure2.png
octave:24> view(53,160)

gnuplot> set view -70, 53;
                         ^
         line 0: rot_x must be in [0:180] degrees range; view unchanged

octave:25> view(160,53)
octave:26> view(160,54)
octave:27> hold on; print -dpng bad_figure3.png"



Anonymous
Mon 17 Oct 2011 06:34:52 PM UTC, comment #1: 

The code you posted was mangled by the website which interprets, for example, the multiplication symbol as meaning bold.  You might want to re-post your code sample in between '+verbatim+' and '-verbatim-' to prevent this.

Also, If you could upload an image which shows the problem that would help.  You can use something like 'print -dpng bad_figure.png' from within Octave when you have a plot showing the problem.  I tried the first plot and it looked reasonable to me.

Rik <rik5>
Group administrator
Sun 16 Oct 2011 10:12:23 PM UTC, original submission:  

When ploting ridges appear either above or below the surface which I'm pretty confident should be smooth. The  sign reflects where the slope is increasing or decreasing and they seem to follow the line y=x.
octave:22> [x,y] = meshgrid(-2*pi:.2:2*pi);
octave:23> z = e**(x).*cos(y)
octave:24> surf(x,y,z)

Increasing the size of the polygons does not help
octave:28> [x,y] = meshgrid(-2*pi:1:2*pi);
octave:29> z = e**(x).*cos(y);
octave:30> surf(x,y,z)
but another bug shows up where the tiles in the middle do not stay opaque when viewed from certain angles.

Peter Jeffris <jeffris>

 

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

Attach Files:
   
   
Comment:
   

Attached Files
file #24160:  bad_figure.png added by None (283KiB - image/png)
file #24161:  bad_figure2.png added by None (125KiB - image/png)
file #24162:  bad_figure3.png added by None (161KiB - image/png)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by jordigh (Posted a comment)
  • -email is unavailable- added by rik5 (Posted a comment)
  • -email is unavailable- added by jeffris (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 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2011-10-17 jordigh StatusNone Invalid / Not an Octave Bug
        Open/ClosedOpen Closed
    2011-10-17 None Attached File- Added bad_figure.png, #24160
        Attached File- Added bad_figure2.png, #24161
        Attached File- Added bad_figure3.png, #24162

    Back to the top

    Powered by Savane 3.13-caa5.
    Corresponding source code