Hey everyone,
I am trying to plot data contained in an Excel file on a graph (also in the Excel file) with the panda library.
The x-axis from those datas is dates (the y-axis is not important here). These dates range from 22_07_26 07:21:46.229 to 22_07_26 07:43:58.946 (so I’m trying to plot data over a 3 minute interval.
The problem is that my graph looks like this :
and I would like it to look like this : (image below, new users cannot link two images)
(I got the second image by changing a few things in Excel, but it’s a bit of a cheat).
Does anyone know how to solve this little problem (with the panda library) ?
Here is my part of code that plots datas :
chart = workbook.add_chart({'type': 'line'}) #creating chart
chart.add_series({
'categories': '=Data!$A$2:$A$'+str(len(data)-1), #x-datas
'values': '=Data!$B$2:$B$'+str(len(data)-1), #y-datas
})
chart.set_x_axis({'name': "Temps de l'essai", #name of x-axis
})
Thank you all !