I am working on my dataset and I have to plot the cdf of it. I already did but due to large number of data the x-axis showing some overwritten values. Could anyone help me in this regard. my code is
import csv
import os
import numpy as np
import matplotlib.pyplot as plt
from collections import Counter
import collection
x = []
y=[]
row=[]
with open('SCPS-ADAPTIVE-1e8.csv', 'r') as file:
reader = csv.reader(file)
for row in reader:
y.append(row[1])
N=len(y)
data = np.sort(y)
P = np.arange(N) / float(N)
plt.plot(data, P, marker='o')
plt.show (
source https://stackoverflow.com/questions/71896250/x-axis-get-over-written-in-matplot
Comments
Post a Comment