fast-mri/scripts/tmp.py

24 lines
779 B
Python
Raw Normal View History

import matplotlib.pyplot as plt
2022-04-21 15:27:02 +02:00
import matplotlib.ticker as tkr
import seaborn as sns
import matplotlib.ticker as tkr
2022-04-25 10:22:45 +02:00
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
2022-04-21 15:27:02 +02:00
fig1, ax1 = plt.subplots(1,1)
ax1.plot(x,y)
2022-04-25 10:22:45 +02:00
pauc = partial_auc(x,y)
print(pauc)
2022-04-21 15:27:02 +02:00
# ax.set_xticks([0,100,1500])
# ax.xaxis.set_major_locator(ticker.MultipleLocator(tick_spacing))
2022-04-25 10:22:45 +02:00
# 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]))