3 ms·
It does statistical plots and isn’t matplotlib based which is a great start. I find Plotly finicky, Altair doesn’t have great ergonomics, and bokeh is the same
by data-ottawa 3y ago
It does statistical plots and isn’t matplotlib based which is a great start.
I find Plotly finicky, Altair doesn’t have great ergonomics, and bokeh is the same imperative style as matplotlib (plus is kinda heavy weight). Seaborn is good but you’re still playing with a leaky abstraction on matplotlib which can make things hard to compose and you can’t get interactivity.
So me, I’m asking for this. I’ve tried building my own because I want good interactive charts with fast native ergonomics. Ggplot just lets you focus on what you want to plot and throw a data frame into it, which is what this appears to do.
- patrick451 3y ago> It does statistical plots and isn’t matplotlib based which is a great start. What? Matplotlib has the best, intuitive interface among the competition. Every other plotting library I have tried either leads to ridiculously verbose code or is too opinionated to be useful.
- Reventlov 3y agoThis comment is surprising. Can you remember how to do 3d scatter plots, for example, without looking at the manual ? IIRC, that's an example of a shitty interface from matplotlib, while plotly is better on this regard.
- heywhatupboys 3y ago> What? Matplotlib has the best, intuitive interface among the competition. Every other plotting library I have tried either leads to ridiculously verbose code or is too opinionated to be useful. What??? Have you ever used ggplot?? I know we all have opinions, but yikes, just look at the tutorials!
- ImaCake 3y agoThe parent comment may find matplotlib approachable because they are a programmer already. A lot of science people are not programmers. So when they have to choose between matplotlib, where you will need to understand OOP, and ggplot, where you can get away with not knowing what a class is, its pretty clear which one is more accessible.
- pama 3y agoIt’s not the programming. Every default in matplotlib is poor. You have to write about ten times more lines of code to get something clean with legible fonts and minimal, understandable aesthetics. Very few people bother and then you get presentations full of ugly, time-wasting plots. Ggplot2 makes it harder to obfuscate your intent and very easy to experiment with different aesthetics and fix up the style of your plot. Yes it is opinionated, because, thankfully, there exist a good set of useful ideas for communicating data analyses.
- ImaCake 3y agoMmmm, ggplot has better defaults but I am still impressed by how bad the plots some people produce are. Absolutely agree on ggplot's ease of use, but that is partly a consequence of not needing to know how to program to use it.
- data-ottawa 3y agoThe matplotlib defaults are poor, but you can import the style class from matplotlib and apply decent defaults > from matplotlib import style > style.use([…]) I’m on vacation away from a computer so hopefully that snippet is close enough that you can Google it.
- unnah 3y agoHave you tried plotnine? It's a faithful port of ggplot to python. It's built on top of matplotlib, so no interactivity, but I have not noticed any problems with leaky abstraction.
- a-dub 3y agomatplotlib supports interactivity if you use the qt backends.
- data-ottawa 3y agoDo those work in a notebook interface? Usually I don’t control the server my code is running on, I’m only exposed to a Google Collab style jupyter notebook.
- a-dub 3y agono, unfortunately not. it's been a while since i've looked but i think mpld3 and plotly were the best bets when i last was trying to make use of notebooks. i've personally never been a big fan of the horizontal breaks in the editor that notebook experiences provide. more recent versions of jupyter have added a side-by-side mode which is kind of an improvement but it still doesn't go where i'd fully want, which would be a full blown editor pane with a full blown document pane that sit side by side and are linked by user placed anchors with plots that can be popped out and floated.