I have the following data frame:
df1_Relax_Pulse_Melted.head()
Task Pulse Time Pulse Measure
0 Language PRE_RELAX_PULSE 90.0
1 Language PRE_RELAX_PULSE 94.0
2 Language PRE_RELAX_PULSE 52.0
3 Language PRE_RELAX_PULSE 70.0
4 Language PRE_RELAX_PULSE 84.0
When I attempt a barplot of this data, I get the following:
ax = sns.barplot(x="Pulse Time", y="Pulse Measure", hue="Task", data=df1_Relax_Pulse_Melted)
However, when I try to use a line plot, I get the following:
ax = sns.lineplot(x="Pulse Time", y="Pulse Measure", hue="Task", data=df1_Relax_Pulse_Melted)
As can be seen in the image, the order of the x-axis labels is in a different order from the barplot. Is it possible to change the order of the x-axis in the lineplot? I tried to use the "order" function within the sns.lineplot as follows:
ax = sns.lineplot(x="Pulse Time", y="Pulse Measure", hue="Task", data=df1_Relax_Pulse_Melted, order='PRE_RELAX_PULSE','30S_RELAX_PULSE','POST_RELAX_PULSE')
However, that produces an error.
``AttributeError: 'Line2D' object has no property 'order'


