[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Octave's plotting much slower than matlab
From: |
Thomas Ilnseher |
Subject: |
Re: Octave's plotting much slower than matlab |
Date: |
Mon, 21 Jan 2008 14:56:06 +0100 |
Am Montag, den 21.01.2008, 14:17 +0100 schrieb David Bateman:
>
> 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.. All I can offer
> is,
> we're working on it..
Well ...
I changed the function to this:
f=fopen('scatter.txt', 'r');
[v c] = fscanf(f, '%d', [2, inf]);
fclose(f);
%scatter(v(1,:), v(2,:));
figure(1);
hold('on');
legend('off');
grid('on');
plot(v(1,:), v(2,:), 'ob');
now the stuff is even _faster_ than matlab, as I pointed out before.
the output is roughly the same as with scatter (except that all circles
have the same color). by doing some tricks with "hold('on');" and
sub-ranges, I can even get the same picture as with scatter.
I definitely do not need to access specific points as patch objects.
So I'm fine (and might write myself a fscatter.m file).
--
Thomas Ilnseher <address@hidden>