python ggplot 散点强调

python ggplot scatter emphasize

我用 python 2.7 ggplot 做了一个散点图。我想要背景 steelblue 但强调一些要点但失败了。有人可以帮助我吗?

代码片段:

from ggplot import *
chart = ggplot( df_color, aes(x='x-tsne', y='y-tsne') )\
                 + geom_point(color='steelblue',size=70,alpha=0.8)\
                 + geom_point(data=df_color.loc[self.GoI,:],aes(x='x-tsne', y='y-tsne'), colour="red",size=5)\
                 + ggtitle("tSNE dimensions")

错误如下:

line 154
+ geom_point(data=df_color.loc[self.GoI,:],aes(x='x-tsne', y='y-tsne'), colour="red",size=5)\
SyntaxError: non-keyword arg after keyword arg

Python 中的一个经验法则是类型 f(a,b,c=something, d,...) 的函数调用将不起作用,因为您在关键字 ([=12] 之后调用非关键字 (d) =]).这里的顺序很重要,而关键字参数的顺序并不重要,假设您以 keyword=arg 的形式给出它们。 Python 也允许您像 arg 一样给它们,然后需要正确的顺序。

长话短说:阅读错误消息。