0

我有两个数据集合并为一个,然后我制作了一个图。在最后阶段,我得到一个重复两次的 x 值('2 小时'),第二个点(正确)和最后一个 x 值(错误)。如果我绘制单个数据集,则不会出现此问题。知道如何解决问题吗?

sns.set_context("paper", font_scale=1.5)
fig, ax = plt.subplots(constrained_layout=True)


file_1 = pd.read_excel(r'.......xlsx')
file_1['Light treatment']='Constant'
file_2 = pd.read_excel(r'.......xlsx')
file_2['Light treatment']='Sinusoidal'

frames = [file_1, file_2]
file = pd.concat(frames)


df_new = file.loc[(file['Time']==50.712336)]


ax= sns.lineplot(x="Sampling", y="NPQ", hue="Light treatment", ci=68, 
marker='s', data=df_new)
plt.show()

文件 1 中的正确数字
文件 1 中的正确数字

错误的数字

4

0 回答 0