I am trying to create a simple graph using below code.
Y = [DUPLICATE_INCIDENT_5, DUPLICATE_INCIDENT_4, DUPLICATE_INCIDENT_3, DUPLICATE_INCIDENT_2, DUPLICATE_INCIDENT]
X = ['9th', '10th', '11th', '12th', '13th']
plt.plot(X, Y, marker='o', linestyle='--', color='g')
plt.ylabel('DUPLICATE INCIDENTS')
plt.xlabel('July')
plt.show()
plt.savefig('duplicates.svg')
This just created an x-axis with the date values and y-axis with count of incidents. I want to display the graph in an order i.e. Starting from 0 - N as reference values on Y axis and plot the COUNT 8..7..13..3..0 against that.
I know this is a stupid question but I am new to matplotlib and am going to start a course on it. Just going though the official documentation to have some basic knowledge before the course starts.
EDIT 1:
DUPLICATE_INCIDENT* - these are all numbers whose values are as printed in the Y axis. [8, 7, 13, 3, 0].
EDIT 2:
My bad - I should have checked ALL the variables defined above before posting a question. One of the above variables was a string. That was causing the issue. It is working as expected now.
