Eric Firing wrote:
Glenn,
The slowness is almost entirely in the line
rgba = lut[xa]
where lut is a 2-D uint8 table and xa is an array of indices.
I have replaced that in svn with
rgba = lut.take(xa, axis=0)
which cuts the time in half!
This should be reduced by another
Glenn,
What version of numpy are you using? What version of matplotlib? And
what are the dimensions of your image array?
Eric
G Jones wrote:
Thank you for the suggestion.
I now have the update time down to about 70 ms.
When I run the code through the profiler, I see that each plot update
Numpy 1.0.3 and MPL 0.91.2. The image array is 256 x 1024. I found I
could speed things up a lot (~15ms update time) by setting my data to
be a 256 x 1024 x 4 array of uint8, so I guess the solution is to
handle color mapping myself. I appreciate any other suggestions.
Glenn
On 4/15/08, Eric
Glenn,
The slowness is almost entirely in the line
rgba = lut[xa]
where lut is a 2-D uint8 table and xa is an array of indices.
I have replaced that in svn with
rgba = lut.take(xa, axis=0)
which cuts the time in half!
That is still not nearly as fast as the solution you have found.
Thank you for the suggestion.
I now have the update time down to about 70 ms.
When I run the code through the profiler, I see that each plot update
requires a call to matplotlib.colors.Colormap.__call__, and each of
these calls takes 52 ms, 48 ms of which is spent inside the function
itself. This
I just use blit on imshow map, and work properly. Maybe the following code
will help you.
def ontimer()
canvas.restore_region(background)
im.set_array(Z)
ax.draw_artist(self.imList[i])
canvas.blit(ax.bbox)
canvas.gui_repaint()
--
View this message in context:
Hello,
I want to use imshow to make a real time waterfall plot. The attached
code is the core of my application, and it works, but it is quite
slow, around 200ms to update the plot. Is there a way to accelerate
this? I have seen the blitting demos, and they work well for the line
plots, but I