阅读背景:

在熊猫/Pyplot中散布图:如何按类别划分。

来源:互联网 

I am trying to make a simple scatter plot in pyplot using a Pandas DataFrame object, but want an efficient way of plotting two variables but have the symbols dictated by a third column (key). I have tried various ways using df.groupby, but not successfully. A sample df script is below. This colours the markers according to 'key1', but Id like to see a legend with 'key1' categories. Am I close? Thanks.I am trying to make a simple scatter plot in py




你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: