[Top][All Lists]

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

Re: problem plotting "N-d object"

From: CdeMills
Subject: Re: problem plotting "N-d object"
Date: Mon, 20 Feb 2012 00:39:33 -0800 (PST)

Sergei Steshenko-2 wrote
> I have just replied Ben and you - the object is 1-d, no size reduction is
> necessary, the root cause/problem is that Octave wrongly considers the
> object to be N-d.
> Not dealing with the root cause is losing track IMO.
OK. I looked at the other side of the Force:
x=randn(3, 3, 5);
y = x(2, 3, :);
ans =

     1     1     5
??? Error using ==> plot
Data may not have more than 2 dimensions

This is ML2011A. The consensus about Octave is to maintain a good amount of
compatibility between both, to ease transitions.

At this stage I agree that you're right on the ideas, but we should be
carefull to avoid a scenario as
1) B. Abbott implements plotting for N-D objects where N-1 dims are
2) people start using this new interface
3) The MathWorsk implement their own N-D plotting  in a incompatible way
with Ben's approach
4) Octave maintainers must once again change their interface without
breaking the "legacy " code written between steps two and three.

This is why I would be more in favor of a "squeezable" class. By only
overloading the "isvector" method, the previous scenario would became:
x=squezable(randn(3, 3, 5));
y = x(2, 3, :);
ans =
1 1 5

This way, we follow your arguments that things with only one non-singleton
dimension are vectors, but without introducing changes with ML. And when ML
will implement a change in their 'plot' function, we may reflect his change,
and keep the code written around the squeezable class working. 



View this message in context:
Sent from the Octave - General mailing list archive at

reply via email to

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