There was a need to create an automatically collected report and ran into a problem: in the charts under the X axis, you need to set the date value. However, simply inserting an array with the date, the error is: ValueError: could not convert string to float: 'Jan 03:00:02' If I write an explicit conversion plt.plot(str(gprs_data), gx1) then the error is: ValueError: x and y must have same first dimension, but have shapes (1,) and (2,) I watched some posts where it was proposed to replace the axis values ββwith some lines, but this is not appropriate, because the number of points and the date change. Here is a piece of code:
fig = plt.figure() # Π³ΡΠ°ΡΠΈΠΊΠΈ ΠΈΠ·ΠΌΠ΅Π½Π΅Π½ΠΈΡ ΠΏΡΠΎΠ΅ΠΊΡΠΈΠΉ ΡΡΠΊΠΎΡΠ΅Π½ΠΈΡ ΠΏΠΎ 3 ΠΎΡΡΠΌ plt.subplot(321) plt.plot(str(x), y) plt.title('ΠΠΊΡΠ΅Π»Π΅ΡΠΎΠΌΠ΅ΡΡ(x)') plt.xticks(fontsize='6',rotation= 60) plt.yticks(fontsize='10') plt.grid()