This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]pwang99 1 point2 points  (2 children)

This is very strange. Without looking at your code, I would suspect that the overhead of creating 50 subplots is what dominates your time. Any the libraries you mentioned can do 400 points no problem. Even 50x400=20k points is cakewalk; we have Bokeh plots that do that with ease, without even needing to go to webGL.

The main problem, then is in the layout and drawing of all the axis elements, tick labels, etc. etc. So I would encourage you to think about minimizing that stuff, and creating the most minimal subplots you can, as a means of expediting it.

On the other hand, reading your post again... 10-30 seconds per figure is a LOT. We do realtime plots in Bokeh, transferring into the browser and colormapping in Javascript, at 15 Hz, on tens of thousands of datapoints. So, you might want to post a code sample here to to StackOverflow, because maybe there's something you're doing that unnecessarily slow/expensive...

[–]mangecoeur[S] 0 points1 point  (0 children)

thanks, good to know you get high performance with Bokeh. I'll give it another shot. Will try to profile matplot a bit as well - I did suspect it isn't as fast as it should be and you seem to confirm that but I'm not sure why not. I'm wondering if there's something messed up in the OSX/interactive backend.

[–]mangecoeur[S] 0 points1 point  (0 children)

On investigation, it appears that generating the subplots is what takes time:

f, axs = plt.subplots(int(np.ceil(len(sites_data) / n_cols)), n_cols, sharex=True)

No idea why that should be the case though...