Live data from Hacker News

Plotnine: A grammar of graphics for Python

github.com

21–30 of 40 posts

Re: Plotnine: A grammar of graphics for Python

#21

What is meant by "a grammar"? Is it the way we concatenate functions to create what's essentially a sentence of what we want the plot to be?

ggplot2 was inspired by: https://www.amazon.com/Grammar-Graphics-Statistics-Computing... and Hadley Wickham wrote about it in http://vita.had.co.nz/papers/layered-grammar.pdf . I'm no expert, but I think that one of the main ideas is to separate the elements of making a plot from the way that the data is presented. For example, in ggplot2, you have the data that will go into the graph, the type of plot (or "geometry"…

Aha! Thank you. So it's kind of like a declarative way of plotting.

Re: Plotnine: A grammar of graphics for Python

#22
post #5

This is nice and all, but the syntax and names are totally unintuitive. If I'm to dig in the manual, I might as well build my plots with the standard syntax of any random plotting library. Is this "grammar of graphics" any good if you invest more time in it?

There are a few concepts to learn. With a grammar, you can create plots in 5 minutes that would take an hour to create using "the standard syntax". For many people once they experience it, they do not want to go back. You could be one of them.

Re: Plotnine: A grammar of graphics for Python

#23
post #12

Earlier quoted context omitted.

It's not pointless at all. For long-term maintenance, the community strength and level of active development is just as important (and sometimes more important) than minor feature differences.

I would often rather use a decade-old project that was developed solo by a world-class expert dumping code over the wall once every 6 months than a community project being hacked on by 100 amateurs. Without additional context I find recency of last commit and number of committers to be almost impossible to draw useful conclusions from.

You are right, but we don't the proficiency of the developers. The best info we have is the repository update info. That's what you have to quickly compare the projects.

Re: Plotnine: A grammar of graphics for Python

#24
post #23

Earlier quoted context omitted.

I would often rather use a decade-old project that was developed solo by a world-class expert dumping code over the wall once every 6 months than a community project being hacked on by 100 amateurs. Without additional context I find recency of last commit and number of committers to be almost impossible to draw useful conclusions from.

You are right, but we don't the proficiency of the developers. The best info we have is the repository update info. That's what you have to quickly compare the projects.

Just look at the code.

Re: Plotnine: A grammar of graphics for Python

#25
post #19

I feel like a lot of attempts to recreate ggplot2 end up being superficial because they don't recognize / duplicate the power of the underlying Grid graphics that ggplot2 uses. I know that web technologies are all the rage these days, but at least for static, publication-ready graphics, Grid is really nice substrate, with well thought out lower-level abstractions. EDIT: I should also add that it's documented within a…

In what way does eschewing the underlying Grid graphics make a less desirable experience for a ggplot2 port?

The ports I see feel like a ggplot2 being built on top of Grid means that modestly complex stuff is easy (in ggplot2 by itself), but that it's relatively easy to drop down into the lower layer (grid) to do more.

Re: Plotnine: A grammar of graphics for Python

#26
post #12

Earlier quoted context omitted.

It's not pointless at all. For long-term maintenance, the community strength and level of active development is just as important (and sometimes more important) than minor feature differences.

I would often rather use a decade-old project that was developed solo by a world-class expert dumping code over the wall once every 6 months than a community project being hacked on by 100 amateurs. Without additional context I find recency of last commit and number of committers to be almost impossible to draw useful conclusions from.

Of course you should seek additional context if you need it. Community strength and commit activity are pretty useful to consider though.

One useful conclusion: security bugs are likely to be fixed in a timely manner that won't put your users at risk.

Re: Plotnine: A grammar of graphics for Python

#29
post #20

Surprise to see this at the top, I am the creator* of plotnine. The most common question seems to be, what to expect of plotnine? The answer; a high quality implementation of a grammar of graphics with an API that closely matches ggplot2, and more. I also want other packages to be able to build off of plotnine, e.g. a package with the functionality of Seaborn could be built off of plotnine. The only constraint should…

Looks sweet. May I ask: what did you find wanting in the other attempts (like Seaborne)?

Re: Plotnine: A grammar of graphics for Python

#30
post #24
post #23

Earlier quoted context omitted.

You are right, but we don't the proficiency of the developers. The best info we have is the repository update info. That's what you have to quickly compare the projects.

Just look at the code.

What specifically should we be looking for?
Post reply on HN