octave-maintainers
[Top][All Lists]
Advanced

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

Re: [OctDev] Java/OpenGL-based graphics package for octave


From: John W. Eaton
Subject: Re: [OctDev] Java/OpenGL-based graphics package for octave
Date: Wed, 25 Apr 2007 13:57:00 -0400

On 24-Apr-2007, Shai Ayal wrote:

| On 4/24/07, Michael Goffioul <address@hidden> wrote:
| > On 4/24/07, Daniel J Sebald <address@hidden> wrote:
| > > John W. Eaton wrote:
| > > > It's not quite that easy.  If you look at the object that Matlab's
| > > > stem function returns, it only says hggroup for the type.  I don't see
| > > > anywhere that it says "stemseries" or how that is determined.  Maybe
| > > > it is a hidden property?  Maybe it is magic?
| > >
| > > I'll guess the latter.  Well, I assume hggroup is just a bunch of handles
| > > grouped together.  The children would be all the individual stems.  I'm 
guessing.
| >
| > In Matlab, a stemseries object has 2 children:
| > - a line object for all stems: the key here is that the original x/y data 
are
| > converted into [x0 x0 NaN x1 x1 NaN...] [B y0 NaN B y1 NaN...] where B is
| > the base value; line segments containing NaN are not drawn by Matlab
| > - a line object for the markers
| >
| > The base line is a (extended) line object that is a child of the axes and
| > shared by all stemseries objects within the same plot.
| 
| What do you mean by extended line object? Is it a line object with a
| special tag, or does it have some additional properties (which is
| equivalent to saying it is a "new" object, not a line object)

It seems unfortunate that there are multiple objects that have the
same type ("line", "hggroup", etc) that are very similar but have
slightly different property lists.  It seems it would have been better
to have some property in the object that indicates its actual type
rather than just setting "type" to the name of what is apparently a
sort of base class for the object.

Note that the baseline and line objects do appear to be distinct
objects as the following works

  hs = stem (1:10);
  hbl = get (hs, 'baseline');
  set (hbl, 'basevalue', 10);

but the following fails

  hl = line (1:10);
  set (hl, 'basevalue', 10);

I suppose we can add a baseline object that contains a
baseline_properties object and have the baseline_properties object
inherit from the line_properties object to avoid some duplication.
However, given the current implementation, I don't see how the
baseline object can inherit from the line object.  If that causes
trouble, maybe the overall design can be tweaked a bit.

jwe


reply via email to

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