I have a csv that looks like this:
2 1111
4 926
8 914
16 933
32 911
64 912
128 1010
256 1010
512 1013
1024 1070
1025 921
1026 921
1027 920
1028 918
1029 917
1030 916
1031 922
1032 927
1033 929
1034 924
2048 1048
The first column is the X and the second column is the Y.
When I try to plot it, matplotlib will treat it as numbers thus giving interval.
I prefer to treat the first column as categorical (2, 4, 8, ..., 2048) with the same distance between each x values.
I tried converting X into categorical, but matplotlib still treat it as number:
x = pd.Series(line_data["element"]).astype("category")
plt.scatter(x, line_data["time"])
I also tried converting X into string, but it got sorted thus making the graph wrong.
What is the best approach for this problem?
Many Thanks!
