>>>>> "Dominique" == Dominique Orban <do@...> writes:
Dominique> Hello, I am having trouble viewing scatter plots of
Dominique> large data sets with the GTK backend. The plots are
Dominique> sparsity patterns of sparse matrices, much in the way
Dominique> of Matlab's spy function. First of all, there may be a
Dominique> conflict somewhere with my version of GTK/PyGTK;
Dominique> issuing a plot() or scatter() command often results in
Dominique> the message 'None Active' being displayed. After a
Dominique> couple of seconds, the python prompt comes back, and
Dominique> the 'scatter' command results in a huge number of
Dominique> messages of the form
Dominique> <matplotlib.patches.Circle instance at 0x4531730c>
Hi Dominique,
It looks like there is a "print" statement somewhere in your code.
It's possible that this was from a vestigial debug command I left in.
I don't get get it on my system. Are you using matplotlib-0.50? I
also don't get the "None Active" line.
I'm using this as a test script
from matplotlib.matlab import *
x = 100*rand(100000)
y = 100*rand(100000)
s = rand(100000)
scatter(x,y,s)
#plot(x,y,'o')
show()
Takes about 30s on my system. Note that plot with circles can be must
faster that scatter if you don't need to vary the size or color of the
symbols.
Dominique> begin displayed; litterally hundreds of them---it takes
Dominique> some 10 seconds. Finally, a show() opens up a Figure
Dominique> window, but no plot. The matrix has 80519 nonzero
Dominique> elements and is symmetric, so the scatter plot contains
Dominique> roughly twice as many points. I have a Gnuplot
Dominique> interface and a spy-like function which works just fine
Dominique> and displays the pattern in a matter of a fraction of a
Dominique> second.
There are several areas where matplotlib performance is subpar -
mostly for large numbers of patches (circles for scatter, rectangles
for pcolor). Fixing this is a fairly high priority and I have a good
idea how to go about it - see
http://sourceforge.net/mailarchive/message.php?msg_id=7142332 for a
recent discussion. I think in the next 3-4 weeks I can get this
fixed. Basically, the plan is to set up an additional backend method
or two that the various backends may optionally implement in extension
code for performance.
Dominique> Sometimes, a plot using the GTK backend gets stuck in
Dominique> gtk.mainloop(), and i have to interrupt it with
Dominique> Ctrl-C. I am using SuSE Linux 8.0. I have installed the
Dominique> most recent versions of GTK and PyGTK.
Are you using the default GTK that comes with SuSE or did you upgrade?
I have gotten myself into a world of pain before trying to upgraded
GTK libs on a linux box. It does look like you are getting some
unusual behavior. Make sure you are using the latest matplotlib and
try running the test script I posted above. If you still get the same
errors, something is whacked with your install or paths. Otherwise,
stay tuned for performance enhancements coming soon to theaters
everywhere.
JDH
|