You could do something like this using axhline
:
import pandas as pd
import seaborn as sns
import matplotlib.pyplot as plt
dataset = {
'A': [23,53,23,52,52,78],
'B': [45,78,68,68,79,79],
'C': [3,46,24,57,76,13]
}
df = pd.DataFrame(dataset)
graph = sns.swarmplot(x="variable", y="value", data=df.melt())
graph.axhline(50, xmin=0.065, xmax=0.265)
graph.axhline(30, xmin=0.40, xmax=0.60)
graph.axhline(70, xmin=0.735, xmax=0.935)
plt.show()
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.