5 ms·
I used to loose quite a bit of time making technical plots with Matplotlib, and set out to remove that overhead from my university projects. I got to learn some
by antonlopezr 5y ago
I used to loose quite a bit of time making technical plots with Matplotlib, and set out to remove that overhead from my university projects. I got to learn some Python along the way, and this is the result!
It saves me quite some time, so I guessed I might as well share it :)
All feedback is welcome! It's my first library so there's quite a lot of room to grow. Thanks in advance for checking it out!
- alexmcc81 5y agoI'll definitely check this out. Two questions: 1. How does it compare to seaborne? (https://seaborn.pydata.org/ https://seaborn.pydata.org/) 2. Any tips for plotting large amounts of data with matplotlib?
- fundamental 5y agoIt seems like seaborn would be a step backwards if you're looking for fast plotting. Perhaps I got the wrong impression, but this month I spent some time helping a coworker migrate to plain matplotlib as the seaborn plots were taking minutes to process while my matplotlib based code took half a second.
- icegreentea2 5y agoSeaborn can definitely take longer to render than matplotlib in some (many?) cases, but is often much much faster in actually writing out the code to generate the plots. I think when most people complain about 'matplotlib not being efficient' (or whatever), they're talking about the time it takes to hammer out the plot, not necessarily the render time (unless they're trying to do animations...)
- xapata 5y agoHow large are you talking about? Most of the time, your best option is to plot a representative sample. Datashader can handle some pretty big sets. https://datashader.org/ https://datashader.org/
- antonlopezr 5y agoHey! Thanks a lot for checking it out! TL;DR: 1. Between Seaborn and MPL Plotter, I believe it comes to taste more than anything, and (somewhat arguably), I think MPL Plotter is a bit more concise. I really like how you can expand its functionality with Matplotlib, but that applies to both! 2. I recommend Datashader (https://datashader.org/ https://datashader.org/) (HoloViz is super cool) and Vispy (https://vispy.org/ https://vispy.org/). I found Vispy's documentation a bit lacking some time ago, but they probably have improved it since then, and it's very capable. Lastly, check Taichi (https://taichi.graphics/ https://taichi.graphics/), might not be a conventional data representation library (or rather, not only), but it's amazing and worth a look. To add some more depth to the Seaborn comparison, and not being an expert Seaborn user, I'd say: 1. MPL Plotter is lighter (but also with less wide-ranging plot options) 2. In my experience, MPL Plotter's presets (most importantly, the defaults from which you build your plots up) are more suitable for technical papers than Seaborn's. And perhaps a bit more arguably (again, I'm not a Seaborn expert, please do correct me if you think otherwise): 3. I believe MPL Plotter gives you more fine-grained control over your plot. That's is for you to plot and customize as far as Matplotlib will take you in one line, while most Seaborn examples I've seen use pyplot snippets. 4. And following with the above, I believe the syntax is a little more concise. Personally I like that MPL Plotter is fundamentally Matplotlib, so I can use any Matplotlib customization I might need seamlessly, and, if useful enough, add it later on as a method in MPL Plotter itself, which would be a bit harder on such an established project as Seaborn. It's just tastes at that point, and the flexibility of being a small project. Cheers!
- antonlopezr 5y agoOh and also check the MPL Plotter custom preset functions! Editing your plots from a dictionary with all modifiable parameters visible for you to uncomment and tune is one of the nicer things the library has to offer.