你可以用一个
parallel coodinates plot
import pandas as pd
import numpy as np
df = pd.DataFrame({'depth':[300, 301, 302, 303, 304, 306],
'feat[0]':[0.3, 0.3, 0.3, 0.3, 0.3, 0.3],
'feat[1]':[0.2, 0.2, 0.2, 0.2, 0.2, 0.2],
'feat[2]':[0.3, 0.3, 0.3, 0.3, 0.3, 0.3],
'feat[3]':[0.2, 0.2, 0.2, 0.2, 0.2, 0.2]})
offset = .01
offsets = np.linspace(0, offset*len(df), len(df), endpoint=False)
legend = [f'{d} (+{x})' if x > 0 else f'{d}' for d,x in zip(df.depth, offsets)]
pd.plotting.parallel_coordinates((df.iloc[:,1:]+offsets[None].T).assign(depth=legend), 'depth')
您可能需要根据需要调整偏移。