# -*- coding: utf-8 -*-
import numpy as np
import matplotlib.pyplot as plt

import matplotlib
matplotlib.rcParams['mathtext.fontset'] = 'stix'
matplotlib.rcParams['font.family'] = 'STIXGeneral'


#%% FONCTION

def f(x): #le "C=1", il fait que si tu précises rien, genre "f(3)", il prend par défaut C=1
    
    return 1/(1-x)


#LISTE DES X
X = np.linspace(0,100,10000) #début, fin, nombre de points

#LISTE DES Y
Y1 = f(X)

#%% GRAPHE

fig = plt.figure(figsize=(6,6))
ax = fig.add_subplot(111)

ax.set_xlim(0,0.99) #Limites de l'axe X
ax.set_ylim(0,100) #Limites de l'axe Y

ax.set_xlabel(r'$p$', fontsize = 20) #Titre axe X
ax.set_ylabel(r'$Dp$', fontsize = 20) #Titre axe Y


ax.plot(X,Y1, lw=4) #label : nom dans la légende, lw : épaisseur du trait


#%% OPTIONNEL

ax.grid(True) #Grille
#ax.legend(loc=2 ,prop={'size':20}) #Legende