Hello, I am having trouble viewing scatter plots of
> large data sets with the GTK backend. The plots are
> sparsity patterns of sparse matrices, much in the way
> of Matlab's spy function. First of all, there may be a
> conflict somewhere with my version of GTK/PyGTK;
> issuing a plot() or scatter() command often results in
> the message 'None Active' being displayed. After a
> couple of seconds, the python prompt comes back, and
> the 'scatter' command results in a huge number of
> messages of the form
> <matplotlib.patches.Circle instance at 0x4531730c>
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)
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
> begin displayed; litterally hundreds of them---it takes
> some 10 seconds. Finally, a show() opens up a Figure
> window, but no plot. The matrix has 80519 nonzero
> elements and is symmetric, so the scatter plot contains
> roughly twice as many points. I have a Gnuplot
> interface and a spy-like function which works just fine
> and displays the pattern in a matter of a fraction of a
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.
> Sometimes, a plot using the GTK backend gets stuck in
> gtk.mainloop(), and i have to interrupt it with
> Ctrl-C. I am using SuSE Linux 8.0. I have installed the
> 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