获取Python的ggplot以制作条形图

获取Python的ggplot以制作条形图,python,python-ggplot,Python,Python Ggplot,接下来,我尝试使用yhat的ggplot python模块制作一个非常简单的条形图。以下是: 但我有一个错误: Out[1]: <repr(<ggplot.ggplot.ggplot at 0x104b18ad0>) failed: UnboundLocalError: local variable 'ax' referenced before assignment> Out[1]: 这适用于较新版本的ggplot python。它没有那么漂亮(x轴标签),我们真的必须

接下来,我尝试使用yhat的ggplot python模块制作一个非常简单的条形图。以下是:

但我有一个错误:

Out[1]:
<repr(<ggplot.ggplot.ggplot at 0x104b18ad0>) failed: UnboundLocalError: local variable 'ax' referenced before assignment>
Out[1]:

这适用于较新版本的ggplot python。它没有那么漂亮(x轴标签),我们真的必须在这方面下功夫:-(

python ggplot的问题是它还处于开发阶段。您可以尝试升级到最新版本,它似乎输出类似条形图的内容,但它似乎仍然不太正确。
Out[1]:
<repr(<ggplot.ggplot.ggplot at 0x104b18ad0>) failed: UnboundLocalError: local variable 'ax' referenced before assignment>