octave-bug-tracker
[Top][All Lists]
Advanced

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

[Octave-bug-tracker] [bug #55707] plot(vector, scalar) is very slow


From: Pantxo Diribarne
Subject: [Octave-bug-tracker] [bug #55707] plot(vector, scalar) is very slow
Date: Wed, 13 Feb 2019 08:56:26 -0500 (EST)
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:64.0) Gecko/20100101 Firefox/64.0

Follow-up Comment #2, bug #55707 (project octave):

@Harmut: The expected behavior is properly documented in Matlab:

>> If one of X or Y is a scalar and the other is either a scalar or a vector,
then the plot function *plots discrete points*. However, to see the points you
must specify a marker symbol, for example, plot(X,Y,'o').

Now the question is whether Matlab creates as much line objects as the length
of the vector (this is what Octave currently does, but much more slowly than
acceptable), or if it simply creates one line with marker "none" (the
equivalent of "plot (x, y*size (x), 'Marker', 'none')").

What does the following do in Matlab:


x = 1:1000; % vector
y = 10;     % scalar
hlines = plot (x, y);
sprintf ('x,y-> %d line(s), marker ''%s''', numel (hlines), get (hlines(1),
'Marker'))


If there is only one line then we can easily speed up this call form.
Otherwise, we must stay ML compatible and we end up having to fix the very
slow graphics_objects creation (known bug but I can't find the number ATM). 

    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?55707>

_______________________________________________
  Message posté via Savannah
  https://savannah.gnu.org/




reply via email to

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