help-octave
[Top][All Lists]
Advanced

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

Re: Octave's plotting much slower than matlab


From: Michael Goffioul
Subject: Re: Octave's plotting much slower than matlab
Date: Mon, 21 Jan 2008 15:04:38 +0100

On Jan 21, 2008 2:17 PM, David Bateman <address@hidden> wrote:
> Doesn't surprise me given the way that Octave is constrained to
> communication with gnuplot for the scatter function. Each point is a
> patch object with a single point, and so Octave sends a full gnuplot
> plot command to the gnuplot process for each and every point in the
> scatter plot.. I suspect that this is one function that will be vastly
> accelerated by the change to a different graphics backend. However, it
> doesn't appear that JHandles handles the patch with a single point or
> unclosed patches, and so its no use for your case..

JHandles does support single-point patch faces (but it does not support unclosed
patch; although in the case of scatter, it does not matter, because
every face has
exactly one point). However, with the increasing number of points,
what takes most
of the time is the actual patch object creation (through __scatter__), which is
interpreted code using for-loops. Here are some numbers (Dual P4 3.2GHz, 1GB,
Intel 915G):

octave.exe:5> tic, scatter(rand(1,1000),rand(1,1000)), toc
Elapsed time is 0.813968 seconds.
octave.exe:6> close
octave.exe:8> tic, scatter(rand(1,10000),rand(1,10000)), toc
Elapsed time is 2.53856 seconds.
octave.exe:11> close
octave.exe:12> tic, scatter(rand(1,100000),rand(1,100000)), toc
Elapsed time is 21.8031 seconds.

In the last test, the actual rendering takes about 0.5s.

Michael.


reply via email to

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