#!/usr/bin/env python3
# -*- coding: utf-8 -*-

"""
Descriptif du fichier
"""

# Libraries import
import numpy as np
import matplotlib.pyplot as plt
import seaborn
#seaborn.set(style='ticks')

# Constants definition
fig, ax = plt.subplots()

# Function definitions



# Main program
V = np.linspace(-0.7,0.7,100)
I = 15e-3 -(1e-3)/(np.exp(0.6/0.025)+1)*(np.exp(V/0.025)-1)
ax.plot(V,I*1e3)

ax.grid(True, which='both')
# Move left y-axis and bottim x-axis to centre, passing through (0,0)
ax.spines['left'].set_position('center')
ax.spines['bottom'].set_position('zero')

# Eliminate upper and right axes
ax.spines['right'].set_color('none')
ax.spines['top'].set_color('none')

ax.set_ylabel("I (mA)",rotation=0)


ax.set_xlabel("V$_{diode}$ (V)")
ax.xaxis.set_label_coords(1.01, 0.7)
ax.yaxis.set_label_coords(0.51, 1)

plt.show()