import matplotlib.pyplot as plt
import numpy as np
def plot_plaque_fissure(L=10e-3, a=1e-3):
bg = (40/255, 43/255, 48/255, 1.0)
fig, ax = plt.subplots(figsize=(8, 8))
fig.patch.set_facecolor(bg); ax.set_facecolor(bg)
plaque = plt.Rectangle((0, 0), L, L, facecolor="lightgrey", edgecolor="grey", linewidth=2)
ax.add_patch(plaque)
# Axe x
ax.annotate(
'',
xy=(L/3, 0),
xytext=(0, 0),
arrowprops=dict(
arrowstyle='-|>',
color='grey',
lw=1.5,
mutation_scale=20
)
)
# Axe y
ax.annotate(
'',
xy=(0, L/3),
xytext=(0, 0),
arrowprops=dict(
arrowstyle='-|>',
color='grey',
lw=1.5,
mutation_scale=20
)
)
ax.plot([0, a], [0, 0], 'r-', linewidth=3)
ax.text(0.1e-3, -0.5e-3, "lèvre", color='red', fontsize=12)
ax.plot([a, L], [0, 0], 'g-', linewidth=3)
ax.text((a+L)/2, -0.3e-3, "ligament", color='green', fontsize=12)
ax.text(-0.3e-3, -0.3e-3, "A", color='white', fontsize=12, fontweight='bold')
ax.text(a-0.1e-3, -0.3e-3, "B", color='white', fontsize=12, fontweight='bold')
ax.text(L-0.3e-3, -0.3e-3, "B'", color='white', fontsize=12, fontweight='bold')
ax.text(L/3+0.5e-3, -0.5e-3, "x", color='grey', fontsize=14)
ax.text(-0.5e-3, L/3+0.5e-3, "y", color='grey', fontsize=14)
ax.text(-1.2e-3, L/2, r"$u_x = 0$", color='lightblue', fontsize=11, rotation=90)
ax.text(L/2, -1.2e-3, r"$u_y = 0$ (ligament)", color='lightgreen', fontsize=11)
for xp in [L/4, L/2, 3*L/4]:
ax.annotate(
'',
xy=(xp, L+1.3e-3), # pointe
xytext=(xp, L), # base
arrowprops=dict(
arrowstyle='-|>',
color='dodgerblue',
lw=1.5, # épaisseur du corps
mutation_scale=20 # taille de la tête
)
)
ax.text(L-1e-3, L+0.5e-3, r"$\sigma$", color='dodgerblue', fontsize=14)
ax.set_xlim(-1.5e-3, L+1.5e-3); ax.set_ylim(-1.5e-3, L+1.5e-3)
ax.set_aspect("equal"); ax.axis("off")
plt.tight_layout(); plt.show()
plot_plaque_fissure()