Untitled

 avatar
unknown
java
a month ago
879 B
1
Indexable
import matplotlib.pyplot as plt

# Initialize the plot
fig, ax = plt.subplots(1, 2, figsize=(10, 5))

# Lakaran pandangan hadapan (front view)
ax[0].plot([0, 70, 70, 0, 0], [0, 0, 30, 30, 0], color="black")  # Base rectangle
ax[0].plot([70, 50], [30, 70], color="black")  # Slanted right
ax[0].plot([50, 0], [70, 30], color="black")  # Slanted left

# Label for Front View
ax[0].set_title("Pandangan Hadapan")
ax[0].set_xlim(-10, 80)
ax[0].set_ylim(-10, 80)
ax[0].axis("off")

# Lakaran pandangan sisi kanan (right side view)
ax[1].plot([0, 20, 20, 0, 0], [0, 0, 70, 70, 0], color="black")  # Base rectangle
ax[1].plot([20, 0], [70, 20], color="black")  # Slanted left line

# Label for Side View
ax[1].set_title("Pandangan Sisi Kanan")
ax[1].set_xlim(-10, 30)
ax[1].set_ylim(-10, 80)
ax[1].axis("off")

# Show the plot
plt.tight_layout()
plt.show()
Editor is loading...
Leave a Comment