使用用户定义的刻度从 tsv 文件中的数据绘制二维散点图

Plotting 2D scatter plot from data in tsv file with ticks defined by user

我想绘制具有以下详细信息的二维散点图:

X轴刻度值为:

x = [0,30,60,90,120,150,180,210,240,270,300,330,359]

Y 轴刻度值为:

y = [0,10,20,30,40]

现在,我在 tsv 文件中有以下数据,我想根据 X 轴绘制这些数据,以便 A、B、C、D 列具有不同的配色方案。

A              B               C              D
0           
21.55741404    0        
41.2249925     52.96216168     0    
39.96376049    25.70840987     47.54439749    0
54.9600295     37.72928195     59.73455641    15.57652354
66.82671436    72.50071181     27.44853361    55.92679682
74.29259814    69.56620872     46.19494779    45.41791225

A values should lie where y = 10
B values should lie where y = 20
C values should lie where y = 30
D values should lie where y = 40

输出应该如下所示:

非常感谢任何帮助。谢谢

IIUC,我认为你需要 sns.stripplotmelt

import seaborn as sns
dfm = df.melt()
sns.stripplot(dfm['variable'], dfm['value'])

输出: