[Top][All Lists]

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

[Octave-bug-tracker] [bug #47526] set with mixed struct and property-val

From: Markus Mützel
Subject: [Octave-bug-tracker] [bug #47526] set with mixed struct and property-value-pairs errors
Date: Thu, 24 Mar 2016 23:24:49 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:46.0) Gecko/20100101 Firefox/46.0

Follow-up Comment #5, bug #47526 (project octave):

Some more tests with Matlab:
This is working (3 patches in red, green and blue):

h_patch(1) = patch ();
h_patch(2) = patch ();
h_patch(3) = patch ();

props = {'FaceColor'};
fc ={'r', 'g', 'b'}';

set (h_patch, props, fc)

This fails:

h_patch(1) = patch ();
h_patch(2) = patch ();
h_patch(3) = patch ();

pv{1}.facecolor = 'r';
pv{2}.facecolor = 'g';
pv{3}.facecolor = 'b';

set (h_patch, pv')

The error is

Error using hg.patch/set
Only one object may be passed to set for information about
possible property values.

To sum it up: Passing a cell of structs fails. Passing an array of structs
does work. However, only the value in the last element is set.
This behavior is similar if the same property is set several times with
property value pairs. The following will produce a blue patch:

h_patch = patch ();
set (h_patch, 'FaceColor', 'r', 'FaceColor', 'g', 'FaceColor', 'b')

Octave seems to behave the same.
The only thing that does not seem to work in Octave is passing a mix of
structs and property value pairs. This case should be fixed with the patch
without breaking the other cases.


Reply to this item at:


  Nachricht gesendet von/durch Savannah

reply via email to

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