changed x-axis froc
This commit is contained in:
parent
ee0a672f0b
commit
1042bf3145
@ -2,6 +2,7 @@ from pickle import TRUE
|
||||
from sfransen.utils_quintin import *
|
||||
import matplotlib.pyplot as plt
|
||||
import argparse
|
||||
import matplotlib.ticker as tkr
|
||||
|
||||
parser = argparse.ArgumentParser(
|
||||
description='Visualise froc results')
|
||||
@ -32,8 +33,15 @@ for idx in range(len(args.experiment)):
|
||||
experiment_metrics = read_yaml_to_dict(experiment_path)
|
||||
auroc.append(round(experiment_metrics['auroc'],3))
|
||||
|
||||
plt.figure(1)
|
||||
plt.plot(experiment_metrics["FP_per_case"], experiment_metrics["sensitivity"],color=colors[idx],linestyle=plot_type[idx])
|
||||
fig1, ax1 = plt.subplots(1,1)
|
||||
ax1.plot(experiment_metrics["FP_per_case"], experiment_metrics["sensitivity"],color=colors[idx],linestyle=plot_type[idx])
|
||||
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=3)
|
||||
ax1.xaxis.set_major_locator(tkr.FixedLocator([0,0.1,1,3]))
|
||||
|
||||
plt.figure(2)
|
||||
plt.plot(experiment_metrics["fpr"], experiment_metrics["tpr"],color=colors[idx],linestyle=plot_type[idx])
|
||||
|
@ -1,13 +1,34 @@
|
||||
import matplotlib.pyplot as plt
|
||||
import matplotlib.ticker as ticker
|
||||
import matplotlib.ticker as tkr
|
||||
import seaborn as sns
|
||||
import matplotlib.ticker as tkr
|
||||
|
||||
x = [0,5,9,10,15]
|
||||
y = [0,1,2,3,4]
|
||||
x = [0,1.1,2.3,5,90,100,1500]
|
||||
y = [0,0.02,0.09,1,2,3,4]
|
||||
|
||||
tick_spacing = 1
|
||||
|
||||
fig, ax = plt.subplots(1,1)
|
||||
ax.plot(x,y)
|
||||
ax.set_xticks([0,1,2,5,8,9,10,11,20])
|
||||
ax.xaxis.set_major_locator(ticker.MultipleLocator(tick_spacing))
|
||||
plt.show()
|
||||
fig1, ax1 = plt.subplots(1,1)
|
||||
ax1.plot(x,y)
|
||||
# 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]))
|
||||
|
||||
fig2, ax2 = plt.subplots(1,1)
|
||||
ax2.plot(x,y)
|
||||
# ax.set_xticks([0,100,1500])
|
||||
# ax.xaxis.set_major_locator(ticker.MultipleLocator(tick_spacing))
|
||||
ax2.set(xscale="log")
|
||||
ax2.xaxis.set_minor_locator(tkr.LogLocator(base=10, subs='all'))
|
||||
ax2.xaxis.set_minor_formatter(tkr.NullFormatter())
|
||||
ax2.xaxis.set_major_formatter(tkr.ScalarFormatter())
|
||||
ax2.grid(True, which="both", ls="--", c='#d3d3d3')
|
||||
ax2.set_xlim(left=0, right=150)
|
||||
ax2.xaxis.set_major_locator(tkr.FixedLocator([0,1,30,500]))
|
||||
plt.show()
|
||||
|
Loading…
Reference in New Issue
Block a user