Re: Handle Graphics Properties v0.1
Bill Denney <[email protected]> Sat, 25 Feb 2006 08:54:56 -0500 (EST)
| Newsgroups | gmane.comp.gnu.octave.graphics |
|---|---|
| Message-ID | <[email protected]> |
On Sat, 25 Feb 2006, Shai Ayal wrote:
> Bill,
>
> Thanks for the effort. I have a few major comments:
>
> 1. Legends: I find legend functionality lacking in matlab. IMHO the
> legend is a major part of the plot, not something to be added
> afterwards -- in this respect gnuplot has it right. I implemented this
> by adding the line.label property. This allows for label definitions
> in the plot command linespec ( e.g. plot(x,y,"r+;line;") ) which I
> find very useful. Since this is not on matlab I think it should be
> discussed further.
I thought that this was a great feature. It makes it easier to manage the
legend which is something I've always disliked in matlab. I think that
the general use needs a bit more fleshing out. First, every type that can
have a legend (patchs, surfaces, etc.) should have a label. This could be
handled by changing the legend.line property name (I think at minimum it
should be legend.lines because it is generally not a single line) to
something like legend.objects that can hold handles to patches, lines,
etc.
> 2. Movie & Legend objects do not exist in matlab. Legend is
> implemented in octplot as a design decision by me -- it is in fact a
> "compound" object consisting of a patch + lines + text. Movie -- I
> have no idea where this came from. As I understand this is
> effectively a container for frames, frames being actually figures? So
> Movie is a collection of figures with some formatting info?
Generally, yes it's a collection of figures (though it would be good to
make it possible to be either a collection of figures or images) with
formatting info for the movie type.
The movie was actually inspiration from what I was typing up yesterday.
I've never really like matlab's method of making movies (create the movie
object, add frames, and generate the movie). I always felt that it was
rather inflexible. Movies to me make sense as a handle graphics object to
me (though I realize that may not be the case for everyone). I'm not
really thinking that movie would be implemented by every (or likely even
most) backends. To enable some backends to handle some types and other to
not, I think that the following functions should be created:
ishandletype and ishandleprop that would work something like
ishandletype('movie')
should return 1 or 0 depending on if the backend provides a movie type,
and
ishandleprop('movie', 'children')
should return 1 or 0 depending on if the backend provides the children
property (i.e. titling).
Every backend would need to then implement something like __ishandletype__
and __ishandleprop__, but that would be relatively trivial. This also
raises the question of when and how should we notify the user of an error
that a type or property is not supported?
> 3. Handle numbering convention: is the [figure].[object] convention
> really a requirement? does anyone actually look at the values of
> handles? I always think of the as pointers -- I don't care about their
> value as long as they point to something useful.
I don't really think it's a requirement, it mostly came from me being
tired last night and at the moment I didn't think of a good way to do it.
I do like there being some deterministic way to find the handle to a
particular figure number without having to save the handle from the
beginning which is why I thought [figure].[object] was a good method
because it allows for 1.0 to be figure 1 and within that there could be a
logical structure. I don't really think that the sub-objects need to be
deterministic, but I generally think that determinism is good for handle
naming (as opposed to just "what is the next free number/handle"
assignment).
> p.s. sadly I commute by driving myself, so I cannot do much actual
> work these days ...
I actually really like the train. It's a good time to get things done and
to break up my work time from my home time.
I have many more thoughts on the matter, but this is getting long and I
want people to actually read it; so, I'll stop now.
Bill
--
"Taking a new step, uttering a new word, is what people fear the most."
-- Dostoyevsky