import matplotlib.pyplot as plt import matplotlib.ticker as tkr import seaborn as sns import matplotlib.ticker as tkr from p_auc import partial_auc x = [0,0.11,0.23,0.5,0.90,1.00,1.500,3] y = [0,0.02,0.09,1,2,3,4,12] tick_spacing = 1 fig1, ax1 = plt.subplots(1,1) ax1.plot(x,y) pauc = partial_auc(x,y) print(pauc) # ax.set_xticks([0,100,1500]) # ax.xaxis.set_major_locator(ticker.MultipleLocator(tick_spacing)) # ax1.set(xscale="log") # ax1.xaxis.set_minor_locator(tkr.LogLocator(base=10, subs='all')) # ax1.xaxis.set_minor_formatter(tkr.NullFormatter()) # ax1.xaxis.set_major_formatter(tkr.ScalarFormatter()) # ax1.grid(True, which="both", ls="--", c='#d3d3d3') # ax1.set_xlim(left=0, right=150) # ax1.xaxis.set_major_locator(tkr.FixedLocator([0,1,3]))