octave-maintainers
[Top][All Lists]
Advanced

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

The inconcsisteny of matlab contourgroups


From: David Bateman
Subject: The inconcsisteny of matlab contourgroups
Date: Sat, 25 Oct 2008 03:20:30 +0100
User-agent: Mozilla-Thunderbird 2.0.0.16 (X11/20080724)

I find matlab's behavior wrt contour groups bizarre and inconsistent and so am asking for help in how people think that this feature should be implemented. The issue is that at the moment matlab uses two different fashions to represent contours depending on what function created them. The first representation is a set of patch much as Octave currently uses, and was the only means of representing contours in matlab V6. This format is still used by all 3D contouring like contour3, meshc, surfc even in matlab 2008a. The second means is a "contourgroup" hggroup that encapsulates the patches in a single object with callbacks to alter them.

I see no reason not to have everything as a contourgroup, and the only change to a contourgroup to support 3D contouring would be an additional pair of properties like

addproperty ("zlevel", hg, "double", 0);
addproperty ("zlevelmode", hg, "radio", "{none}|level|manual", "none");

where if zlevelmode is "none" we have a 2D plot, if its "level" the contours are plotted as the Z value of the contour itself an if "manual" then "zlevel" can be used to force a particular contour Z value.

I hesitate to make a change like this as I imagine that the reason the 3D contouring is not a contourgroup in matlab is purely that is was a dropped feature in the rush to a release and hasn't since been addressed by mathworks. So I fully believe that contour3, meshc and surfc will eventually also use contour groups instead of a set of patches in a future version of matlab. Therefore any changes we make here are certainly going to be matlab incompatible, and so that makes me hesitate to do this.

However, if we choose to keep the 3D contours in Octave to be compatible with current versions of matlab there is likely to be significant code duplication in any changes I make.

So, what do people think we should go for

1) Full matlab compatibility, accept the inconsistency of 2D vs 3D contouring and the code duplication in Octave, or

2) A matlab incompatible change that allows contourgroups to also work for 3D contours?

I have a preference for 2) as it'll probably be simpler in the end..

Cheers
David


--
David Bateman                                address@hidden
35 rue Gambetta                              +33 1 46 04 02 18 (Home)
92100 Boulogne-Billancourt FRANCE            +33 6 72 01 06 33 (Mob)


reply via email to

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