如何让 plot_geoms() 在 python 中工作?

How do I get plot_geoms() to work in python?

所以我是运行一段代码,其中包含:

from plot_geoms import *

哪个returns

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: No module named 'plot_geoms'

现在,在做

$ pip install plot_geoms

(在ubuntu) returns:

Collecting plot-geoms
  Could not find a version that satisfies the requirement plot-geoms (from versions: )
No matching distribution found for plot-geoms

这是获取包 plot-geoms 的正确方法吗? plot-geoms甚至是包裹吗?


据我所知,这在代码中称为后者,如:

plot_geom(object_1, color='red', linewidth=3) 
plot_geom(object_2, color='green', linewidth=3) 

plot_geoms 不是包。想想你在 ggplot 之后的搜索。

pip install ggplot

我假设您尝试使用 http://aonghuslawlor.com/blog/zalando-challenge.html 示例。不知道他从哪里弄来的 plot_geoms。但是你可以尝试用相应的ggplot代码替换代码。