I want to plot multiple graphs using python... but I get some issues with x-axis values that are not ordered in a correct way.
I used this code:
df=pd.read_csv('C:/Userscsv_grouped.csv',sep=';')
for col in df.columns:
if col != 'JOUR(PSDATE)' and col != 'GNODEB':
plt.style.use('seaborn')
pivoted_df=df.pivot(index='JOUR(PSDATE)',columns='GNODEB', values='RACH_MSG2_SR')
fig, ax = plt.subplots()
pivoted_df.plot(ax=ax, kind='line', legend=True)
ax.set_xlabel('JOUR(PSDATE)')
ax.set_ylabel(col)
ax.set_title(f'Evolution of {col} by GNODEB')
plt.legend(title='GNODEB', bbox_to_anchor=(1.05, 1), loc='upper left')
plt.show()
break
Here is the result I get: