Boxplot : Outliers Labels Python

房东的猫 提交于 2019-12-08 03:27:49

问题


I'm making a time series boxplot using seaborn package but I can't put a label on my outliers.

My data is a dataFrame of 3 columns : [Month , Id , Value]that we can fake like that :

### Sample Data ###
Month = numpy.repeat(numpy.arange(1,11),10)
Id = numpy.arange(1,101)
Value = numpy.random.randn(100)

### As a pandas DataFrame ###
Ts = pandas.DataFrame({'Value' : Value,'Month':Month, 'Id': Id})

### Time series boxplot ###
ax = seaborn.boxplot(x="Month",y="Value",data=Ts)

I have one boxplot for each month and I'm trying to put the Id as a label of the three outliers on the plot here (1).

来源:https://stackoverflow.com/questions/40470175/boxplot-outliers-labels-python

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!