Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- plt.figure(figsize=(12,6))
- linestyles = [(0,()),
- (0,(1,1,5,3)),
- (0,(4,1)),
- (0,(5,1,1,3)),
- (0,(1,1)),
- (0,(1,1,1,1,5,5)),
- (0,(5,1,1,1,1,5))]
- linewidth = 3
- for j, p in enumerate(reliabilities):
- confidence_of_catching_p_reliable_failures = [frequency_of_catching_subpar_samples[p][n_s] for n_s in n_samples]
- plt.plot(n_samples, confidence_of_catching_p_reliable_failures, label="R = {}".format(p),
- linestyle=linestyles[j], linewidth=linewidth)
- plt.plot(n_samples, 1-p**n_samples, linestyle='-', linewidth=0.5, color='black')
- plt.grid()
- plt.xlim([0,100])
- plt.ylim([0,1])
- fontsize = 'x-large'
- plt.legend(loc='best', fontsize=fontsize)
- plt.title("Numerical simulation vs analytical $C = 1 - R^{n_s}$ (thin black lines)", fontsize=fontsize)
- plt.xlabel("Number of samples tested (-)", fontsize=fontsize)
- plt.ylabel("Confidence level (-)", fontsize=fontsize)
- plt.xticks(np.arange(0,101,10))
- plt.yticks(np.linspace(0,1,11))
- plt.tight_layout()
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment