Live data from Hacker News

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

github.com

51–60 of 62 posts

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

#51

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 th…

[deleted]

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

#52

Earlier quoted context omitted.

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...

Fantastic

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

#53

Earlier quoted context omitted.

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

R some very lispy meta-programming features. Very briefly, if I'm a function (go with me here) `foo http://adv-r.had.co.nz/Computing-on-the-language.html

Great

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

#54

Earlier quoted context omitted.

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

R gives you the ability to capture un-evaluated expressions, manipulate them, and then evaluate the manipulated versions. This ability lets you construct some fairly powerful DSLs and language extensions.

Thanks for the succinct explanation

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

#55
post #9

Earlier quoted context omitted.

From a cursory glance at both projects, it looks like plotnine doesn't do interactivity, for a start?

I wonder why they decided to start from scratch in Kotlin rather than just add the interactivity feature to plotnine. Now we have two competing projects...

I'm a big fan of Plotnine and recommend it to anyone who will listen.

My (wildly speculative) guess for the motivations behind this library would be that Kotlin, as a base, is usable in the other JetBrains IDE's, e.g. reusing the same library and grammar when developing in Java or Ruby.

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

#56
post #27

Earlier quoted context omitted.

Same and I have to disagree with basically everything you’ve said, save the DSL bit and the R package bit. In particular, I don’t see how the tidyverse is at all ‘magical’ - take the two most popular tidy libs, dplyr and ggplot2. The api for dplyr is very explicit, intuitive, and based on long-standing precedence (sql). The api for ggplot2 is admittedly less intuitive, but is itself an implementation of widely known…

The dplyr team is genuinely working hard to make the tabular data manipulation tool. IIRC versions 0.5, 0.7, and 1.0 all brought major enhancements. The basic structure has remained consistent but the advanced API keeps getting refactored, usually for the better I think. (I know some people swear by data.table, but I find it gets ugly fast if you want to do anything more than simple joins or split-apply-combine)

Data.table's join syntax is literal insanity to me. That said I used dtplyr to generate data.table code recently and it worked well, except for one edge case.

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

#57

Looks interesting but it feels like this space is a bit crowded with all of the plotting libraries out there for python.

And yet none has filled the “enjoyable to use” space ;)

Ya true. I usually end up jumping around depending on use case. Matplotlib ,seaborn, plotly to name a few.

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

#58
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)

Honestly, I've definitely seen at least 3-4 attempts hit HN over the past nine years or so.

Plotnine is the only one another human has told me about, though.

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

#59

Earlier quoted context omitted.

Tidyverse is much, much harder to write functions for, which is pretty bad for beginners. The API is lovely, but the non-standard evaluation causes real problems for people. True story: writing tidyverse functions is so hard that I once worked for a company with business critical code running in incredibly long R-scripts with almost no functions, and 100 line pipes. While that may be an extreme example, base-R is muc…

As a huge fan of tidyverse, I have to agree. Tidy eval is anything but. However, once they get that right, then tidyverse is close to perfection I think the newish “interpolation” syntax with double braces {{ }} is getting there.

See, it's changed again!

Damnit Hadley, why must you do this to me?

(Really I'm bitter because I know that I'll end up maintaining a bunch of important code in version N-2 of Hadley's NSE adventures at some point in the future).

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

#60
post #31

Is this an official JetBrains project? Will it be supported?

Yes. You can see it in the url: https://github.com/JetBrains/lets-plot/

But does it means that it is a corporate project. Something that won't die when its leader get a better job?
Post reply on HN