3 ms·
ggplot2 is the primary reason to use R. Not that Python's modern charting libraries like bokeh/seaborn are bad, but ggplot2 is so robust and customizable while
by minimaxir 9y ago
ggplot2 is the primary reason to use R. Not that Python's modern charting libraries like bokeh/seaborn are bad, but ggplot2 is so robust and customizable while requiring very little LOC. And that doesn't even include external libraries which extended ggplot2, including pairs plots (https://rdrr.io/cran/GGally/man/ggpairs.html https://rdrr.io/cran/GGally/man/ggpairs.html) and automatic interactive charts with plotly (https://plot.ly/ggplot2/ https://plot.ly/ggplot2/)
ggplot 2.2.0 added a lot of customization features which make it easier to make a plot look more unique than the stereotypical ggplot2 chart, which I plan to cover in a tutorial soon. (here's an older ggplot2 tutorial of mine which still holds up: http://minimaxir.com/2015/02/ggplot-tutorial/ http://minimaxir.com/2015/02/ggplot-tutorial/ )
- thearn4 9y agoI think the biggest issue with matplotlib is it's straddling of the fence between MATLAB and pythonic syntax throughout the library. It makes it actually pretty hard to predict what the syntax/call signature of a particular method is if you don't use it fairly regularly.
- Godel_unicode 9y agoThis. Matplotlib is easily the most jarring library I use on anything like a regular basis. I really want a requests-for-charting, which has a more pythonic syntax.
- thearn4 9y agoseaborn is actually pretty nice, though not as diverse.
- skierscott 9y agoThere's also altair[1], which also has a grammar of graphics. Most visualizations need one line of code, and it integrates nicely with pandas: Chart(df).mark_point().encode( x='year', y='horsepower', color='brand') [1]:https://altair-viz.github.io https://altair-viz.github.io
- j88439h84 9y agoplotnine is an excellent port of ggplot2 to python. https://plotnine.readthedocs.io/en/latest/index.html https://plotnine.readthedocs.io/en/latest/index.html