4 ms·
Matplotlib is terrible (once you get to the point that you need to do non trivial things with it), that's why you use the excellent plotting library for python
by Der_Einzige 6y ago
Matplotlib is terrible (once you get to the point that you need to do non trivial things with it), that's why you use the excellent plotting library for python called "Bokeh"
- kergonath 6y agoNever really looked into it; I'll have a closer look. What do you think is its strengths?
- Der_Einzige 6y agoFor me? I care mainly about 2D and 3D scatter plots of large datasets. The GPU acceleration and automatic subsampling means that animated or interactive scatter plots of large amounts of data (for me it's language vectors) is super easy and fast rather than slow and crappy with matplotlib... (I think matplotlib has an openGL backend that slightly improves but doesn't fix the issues with matplotlibs handling of large datasets)
- pletnes 6y agoBokeh is also made to create embeddable, interactive plots for html/js. You can create quite sophisticated graphics with it from the backend alone. (We use it for web apps at $WORK)
- heyitsme 6y agocould you give an example of an "non-trivial" thing you're talking about (i.e a few lines of code)? And how you solve it with "Bokeh"? I agree that matplotlib's functional interface is somewhat messy, but that is somewhat historical, and stems from wanting to mimic how matlab works. I personally find matplotlib's OO interface both very powerful, and somewhat intuitive, once one gets a hang of it, hence I'm curious of specific cases where it fails for you.
- Der_Einzige 6y agoSee my other post in this comment chain. Matplotlib is not good with handling large (e.g. more than 100K) datapoints in 2D or 3D if you want interactivity or animations. Bokeh handles it like a champ!