help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

setting patch properties


From: pantxo diribarne
Subject: setting patch properties
Date: Wed, 30 May 2012 22:26:39 +0200

Hi,

I noticed a strange behaviour of patch functions in fink's octave-3.6.1 on mac osx 10.7. 
In matlab, the two following calls lead to the same (at least on screen) patch object :

prp.vertices = [0 0; 1.2 0.5; 1 1; 0 1];
prp.faces = [1 2 3 4];

%% first way
patch (prp);

%% second way
pa = patch ();
set (pa, prp);

In octave, the first works even though the patch is green and not black.
The second way leads to an error (the same in gnuplot and fltk) *if it is the first time patch has been called in the session* :
  error: setdata: A(I): index out of bounds; value 4 out of bound 3
  error: called from:
  error:   /sw/share/octave/3.6.1/m/plot/private/__patch__.m at line 262, column 5
  error: evaluating argument list element number 2
  error:   /sw/share/octave/3.6.1/m/plot/private/__patch__.m at line 362, column 7
  error:   /sw/share/octave/3.6.1/m/plot/private/__patch__.m at line 352, column 3
  error:   /Users/pdiribarne/Documents/On/testpatch/testpatch.m at line 4, column 1

Now if I insist (we never know) "close all" and try again :
 -  with gnuplot : it does nothing (but silently this time)
 -  with fltk : it works even though the axes scales don't update

Can someone confirm this? And if so, is this a known issue, a bug or a bad way to manipulate patches?

Pantxo
 

reply via email to

[Prev in Thread] Current Thread [Next in Thread]