我想知道我怎么能在同一个条形图上得到多个标记。在
tips = sns.load_dataset("tips")
coldict={'Sun':'red','Thur':'blue','Sat':'yellow','Fri':'green'}
markdict={'Sun':'x','Thur':'o','Sat':'o','Fri':'o'}
tips['color']=tips.day.apply(lambda x: coldict[x])
tips['marker']=tips.day.apply(lambda x: markdict[x])
m=sns.stripplot('size','total_bill',hue='color',\
marker='marker',data=tips, jitter=0.1, palette="Set1",\
split=True,linewidth=2,edgecolor="gray")
这似乎不起作用,因为标记只接受一个值。在
也最好我想使相应的'太阳'值作为透明的红色三角形。你知道怎么做到吗?在
谢谢。在
编辑: 所以更好的方法是声明一个myax=plt.轴() 把我的斧头传给每一个条纹图(ax=我的斧头)。我认为这是应该这样做的。在
小心,这有点老套,但你可以:
相关问题 更多 >
编程相关推荐