import numpy as np
import math
from sklearn.metrics import adjusted_rand_score, adjusted_mutual_info_score, normalized_mutual_info_score
from matplotlib import pyplot as plt

# Finding top-k distance of a few points
import sys
import math
import numpy as np
from matplotlib import pyplot as plt

def plot_sOptics():
    
    soptics = np.loadtxt('y_optics_sigma_2600_L2_Eps_1800000_MinPts_50_NumEmbed_1024_NumProjection_1024_TopM_50_TopK_5')

    idx = np.where(soptics[:, 1] < 0)
    soptics[idx, 1] = math.inf
    approx_reachDist = np.take(soptics[:, 1], soptics[:, 0].astype(int))

    plt.plot(approx_reachDist)
    plt.show()


# main
plot_sOptics()

# sOptics_sngOptics()

