Live data from Hacker News

Lets-plot: An interactive Python plotting library using ggplot's API

github.com

31–40 of 62 posts

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#32

I've been using R professionally for 4 years. I've been a Python programmer for 6 years. I've shipped large scale applications built on both languages to production. Findings: I honestly don't get the hype around R's plotting capabilities. ggplot2 is nice, but far too magical to be easily understood by beginners. Python offers more intuitive memory management than R (which is really more a statement on how bad R is a…

But I want ggplot to do magic. Rendering things is extremely tedious and boring. I don't want to spend hours on stackoverflow searching for the special obscure incantations that will shift the legend and margins this way because matplotlib did an ugly job while constantly adapting boilerplate back and forth between the declarative and object-oriented API, I want it to just do what I mean!

Is there any coincidence that there are literally tens of different (and concurrent) rendering libraries for Python while the R world more or less settled for ggplot2? Writing matplotlib is such a pain in the ass that people go to great lengths to actually avoid using matplotlib (while still not having the expressivity, features and ease of use of ggplot2).

Magic is bad when you're shipping production code that's shared among multiple people who have to then spend a lot of time assimilating the mental model of the magic. It's perfect when you just want to plot stuff and draw nice figures.

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#33
post #10
post #6

I've been a Python lover for decades. I dislike a lot of characteristics of the R language, but the ggplot2 package is superior to anything in Python visualization space. It is really excellent.

Depends, it does not do interactive 3D-plots. For that, Plotly is the only performant lib I know.

3D plots are usually bad :-) Your vision system can't compare volume very well.

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#34
post #6

I've been a Python lover for decades. I dislike a lot of characteristics of the R language, but the ggplot2 package is superior to anything in Python visualization space. It is really excellent.

I was honestly blown out of the water discovering ggplot2 after years of matplotlib, and a bit infuriated that I didn't make the effort to get into R sooner.

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#35
post #6

I've been a Python lover for decades. I dislike a lot of characteristics of the R language, but the ggplot2 package is superior to anything in Python visualization space. It is really excellent.

This thing can become really big, if this is a JetBrains supported lib, instead of just an employee side project

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#36

I've been using R professionally for 4 years. I've been a Python programmer for 6 years. I've shipped large scale applications built on both languages to production. Findings: I honestly don't get the hype around R's plotting capabilities. ggplot2 is nice, but far too magical to be easily understood by beginners. Python offers more intuitive memory management than R (which is really more a statement on how bad R is a…

Genuinely curious: what do you mean with respect to "R's non-standard evaluation" and its relationship to DSLs? Thanks in advance.

I wrote a summary that goes into some detail:

http://blog.moertel.com/posts/2006-01-20-wondrous-oddities-r...

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#37

I've been using R professionally for 4 years. I've been a Python programmer for 6 years. I've shipped large scale applications built on both languages to production. Findings: I honestly don't get the hype around R's plotting capabilities. ggplot2 is nice, but far too magical to be easily understood by beginners. Python offers more intuitive memory management than R (which is really more a statement on how bad R is a…

The Tidyverse is under development and it can be tough to keep up with the changes or know where to start (e.g., plyr vs dplyr, melt vs pivot_longer). However, ggplot2 is based on a pretty solid theory of graphics (Bertin's visual variables and Wilkinson's grammar of graphics). These can take some time to get into but it's not magic once you get the idea that you're mapping data variables to visual variables.

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#38

Earlier quoted context omitted.

Wickham was really on to something with ggplot and it's graphical grammar concept for plots. That and Tidyverse in general, I believe, has saved R from irrelevance. I wish more projects would use that way of thinking but it seems that in the jupyter/julia/python world there's too many choices and they all attempt a "kitchen-sink" approach for visualization.

Honestly, R will be fine, even apart from tidyverse. There's a huge shadow universe of scientists running particular R packages for these analyses, which never gets seen from HN/programmers. While Python is definitely (sadly, IMO) a better language for building ML systems (because more people know it, and it's harder to write impenetrable code), R is definitely a better DSL for statistical analysis, modelling and gra…

I agree R would have been "fine" without Tidyverse-- in the sense that it would keep a persistent survivable niche base.

I suspect, however, that it would not be anywhere near the top 10 of the TIOBE index like it is now and that it's userbase would consist of mostly of statistics practitioners rather than huge swathes of people that need to perform any basic data analysis.

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#39
post #6

I've been a Python lover for decades. I dislike a lot of characteristics of the R language, but the ggplot2 package is superior to anything in Python visualization space. It is really excellent.

Wickham was really on to something with ggplot and it's graphical grammar concept for plots. That and Tidyverse in general, I believe, has saved R from irrelevance. I wish more projects would use that way of thinking but it seems that in the jupyter/julia/python world there's too many choices and they all attempt a "kitchen-sink" approach for visualization.

R has always been relevant and isn't going away any time soon. The language is ugly and flawed and has a bunch of quirks and gotchas but there are just too many libs.

Also for a lot of people R is going to be the first and often only language they're going to learn because they have no use for programming outside of statistical analyses and it's damn practical for that single use. Right now generations of students are being taught in R, right now bioconductor is booming and being added to everyday. That stupid arrow assignment operator has plenty of good years ahead of it.

Re: Lets-plot: An interactive Python plotting library using ggplot's API

#40
post #28

Earlier quoted context omitted.

I'm pretty sure that there have been multiple attempts to recreate ggplot in python. I can think of 3-4 off the top of my head.

AFAIK plotnine is the only one with substantial adoption (2.3k stars on github) and active development for several years. Would be curious to hear which ones you're thinking of (since I wouldn't be surprised if the are others, but also am guessing no others hit both points)

Altair does Grammar of Graphics and interactivity, and has ~6k stars.
Post reply on HN