Some remarks/questions about perceived slowness of matplotlib


    I am a regular user of matplotlib since I moved from matlab to python/numpy/scipy. Even if I find matplotlib to be a real help during the transition from matlab to python, I must confess I found it the most disappointing compare other packages ( essentially numpy/scipy/ipython). This is not a rant; I want to know if this slowness is coming from my lack of matplotlib knowledge or not; I apologize in advance if the following hurts anyone feelings :slight_smile:

    First, I must admit that whereas I took a significant amount of time to study numpy and scipy, I didn't take that same time for matplotlib. So this disappointment may just be a consequences of this laziness.

    My main problem with matplotlib is speed: I find it really annoying to use in an interactive manner. For example, when I need to display some 2d information, such as spectrogramm or correlogram, this take 1 or 2 seconds for a small signal (~4500 frames of 256 samples). My function correlogram (similar to specgram, but compute correlation instead of log spectrum) uses imshow, and this function takes 20 times more time than imagesc of matlab for the same size.
    Also, I found changing the size of the matplotlib window really 'annoying to the eye': I compared to matlab, and this may be due to the fact that the whole window is redrawn with matplotlib, including the toolbar, whereas in matlab, the top toolbar is not redrawn.
    Finally, plotting many data (using plot(X, Y) with X and Y around 1000/10000 samples) is 'slow' (the '' are because I don't know much about computer graphics, and I understand that slow in the rendering is often just a perception)

    So, is this a current limitation of matplotlib, is matplotlib optimized for good rendering for publication, and not for interactive use, or I am just misguided in my use of matplotlib ?

    Config info:

    - ubuntu edgy on a bi xeon 3.2 Ghz with 2 Gb of Ram
    - numpy SVN (post 1.0)
    - matplotlib 0.87.7
    - matplotlibrc: uses numpy for numeric, Gtk as a backend (or GtkAdd for anti aliasing, but this makes the problem worse).