Skip to content

Instantly share code, notes, and snippets.

View Samshal's full-sized avatar
👨‍💻

Samuel Adeshina Samshal

👨‍💻
View GitHub Profile
import matplotlib.pyplot as plt
import numpy as np
length, width = 10, 8 # metres
fig, ax = plt.subplots(figsize=(8, 6))
ax.set_xticks(np.arange(0, length+1, 1))
ax.set_yticks(np.arange(0, width+1, 1))
ax.grid(True)
ax.plot([0, length, length, 0, 0], [0, 0, width, width, 0], linewidth=2)
ax.set_xlabel("Length (m)")