4 ms·
tl;dr: I'm new to Seaborn and matplotlib in general, but Seaborn is a wrapper on top of matplotlib, and from what I can tell, was borne partly out of frustrati
by danso 12y ago
tl;dr:
I'm new to Seaborn and matplotlib in general, but Seaborn is a wrapper on top of matplotlib, and from what I can tell, was borne partly out of frustration with how hard it is to get matplotlib graphics to look decent out-of-the-box. Which makes it, in one sense, kind of like what ggplot2 was to R's standard plotting tools.
However, Seaborn has a more object-oriented API, among other things:
http://stanford.edu/~mwaskom/software/seaborn/introduction.html http://stanford.edu/~mwaskom/software/seaborn/introduction.h...
> Seaborn’s goals are similar to those of R’s ggplot, but it takes a different approach with an imperative and object-oriented style that tries to make it straightforward to construct sophisticated plots. If matplotlib “tries to make easy things easy and hard things possible”, seaborn aims to make a well-defined set of hard things easy too.
There already is an attempt to port ggplot over to Python, and its authors' opinion is that its API should look like R's ggplot2, which means the syntax is not Pythonic: http://ggplot.yhathq.com/ http://ggplot.yhathq.com/
- acadien 12y agoAlso matplotlib recently added stylesheets http://matplotlib.org/users/style_sheets.html http://matplotlib.org/users/style_sheets.html which gets you ~75% of the way there to ggplot style plots. I've found a number of edge cases where the plots don't turn out right when using the ggplot sheet. BUT the important part is you can set your own default plotting style with a single line of code and keep everything nice and pythonic (well kind of pythonic since you're using matplotlib...)