TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Plotnine: A grammar of graphics for Python

170 点作者 carlosgg将近 8 年前

9 条评论

peatmoss将近 8 年前
I feel like a lot of attempts to recreate ggplot2 end up being superficial because they don&#x27;t recognize &#x2F; duplicate the power of the underlying Grid graphics that ggplot2 uses.<p>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.<p>EDIT: I should also add that it&#x27;s documented within an inch of its life should anyone feel that it&#x27;s worth recreating: <a href="https:&#x2F;&#x2F;stat.ethz.ch&#x2F;R-manual&#x2F;R-devel&#x2F;library&#x2F;grid&#x2F;html&#x2F;grid-package.html" rel="nofollow">https:&#x2F;&#x2F;stat.ethz.ch&#x2F;R-manual&#x2F;R-devel&#x2F;library&#x2F;grid&#x2F;html&#x2F;grid...</a>
评论 #14431520 未加载
has2k1将近 8 年前
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.<p>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 be whether the backend -- in this case Matplotlib -- does stand in the way. Matplotlib is evolving (though slowly) and has a very receptive community so there is lots of hope.<p>* - Many people contributed to its history.
评论 #14432504 未加载
评论 #14432303 未加载
sirrice将近 8 年前
Recreating and keeping up with Hadley&#x27;s hard work is challenging, particularly because ggplot2&#x27;s layout and extensions are really nice and continue to evolve.<p>As an alternative that preserves the full power of Wickham&#x27;s implementation, pygg[1] is a Python wrapper that provides R&#x27;s ggplot2 syntax in Python and runs everything in R.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;sirrice&#x2F;pygg" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;sirrice&#x2F;pygg</a>
skierscott将近 8 年前
Another grammar of graphics: altair[1]. The altair are simpler and easier to read, i.e.<p><pre><code> Chart(df).mark_point().encode( x=&#x27;age&#x27;, y=&#x27;height&#x27;, color=&#x27;sex&#x27;) </code></pre> Also, see Jake Vaderplas&#x27;s talk on an overview of Python visualization tools at <a href="https:&#x2F;&#x2F;youtube.com&#x2F;watch?v=FytuB8nFHPQ" rel="nofollow">https:&#x2F;&#x2F;youtube.com&#x2F;watch?v=FytuB8nFHPQ</a><p>[1]:<a href="https:&#x2F;&#x2F;altair-viz.github.io" rel="nofollow">https:&#x2F;&#x2F;altair-viz.github.io</a>
vignesh_m将近 8 年前
If this is an implementation of ggplot2, what does it offer over <a href="http:&#x2F;&#x2F;ggplot.yhathq.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;ggplot.yhathq.com&#x2F;</a>?<p>I don&#x27;t mean to undermine your project, just wanted to know about significant differences.
评论 #14430662 未加载
评论 #14432511 未加载
评论 #14430686 未加载
评论 #14431390 未加载
Waterluvian将近 8 年前
What is meant by &quot;a grammar&quot;?<p>Is it the way we concatenate functions to create what&#x27;s essentially a sentence of what we want the plot to be?
评论 #14431396 未加载
评论 #14431298 未加载
stared将近 8 年前
I get it is ggplot-based, by as it is Python, why not being more idiomatic and using chaining instead of adding?
coldtea将近 8 年前
This is nice and all, but the syntax and names are totally unintuitive.<p>If I&#x27;m to dig in the manual, I might as well build my plots with the standard syntax of any random plotting library.<p>Is this &quot;grammar of graphics&quot; any good if you invest more time in it?
评论 #14430785 未加载
评论 #14430782 未加载
评论 #14431595 未加载
评论 #14431062 未加载
lorenzfx将近 8 年前
This looks interesting, but I find the documentation somewhat lacking. Is the user supposed to know ggplot?