المشاركات

عرض المشاركات من أغسطس, 2024
import matplotlib.pyplot as plt import matplotlib.patches as patches # Create figure and axis fig, ax = plt.subplots(figsize=(8, 12)) # Set the dimensions of the apartment apartment_width = 8 # in meters apartment_height = 12 # in meters # Drawing the apartment outline ax.add_patch(patches.Rectangle((0, 0), apartment_width, apartment_height, fill=None, edgecolor='black')) # Adding rooms (as rectangles) # Living Room + Dining Area (Combined) - 4x6 meters ax.add_patch(patches.Rectangle((0, 6), 8, 6, edgecolor='blue', facecolor='lightblue', label="Living Room + Dining")) # Bedroom 1 - 4x4 meters ax.add_patch(patches.Rectangle((0, 2), 4, 4, edgecolor='green', facecolor='lightgreen', label="Bedroom 1")) # Bedroom 2 - 4x4 meters ax.add_patch(patches.Rectangle((4, 2), 4, 4, edgecolor='green', facecolor='lightgreen', label="Bedroom 2")) # Kitchen - 2x4 meters ax.add_patch(patches.Rectangle((0, 0), 4...
import matplotlib.pyplot as plt import matplotlib.patches as patches # Create figure and axis fig, ax = plt.subplots(figsize=(8, 12)) # Set the dimensions of the apartment apartment_width = 8 # in meters apartment_height = 12 # in meters # Drawing the apartment outline ax.add_patch(patches.Rectangle((0, 0), apartment_width, apartment_height, fill=None, edgecolor='black')) # Adding rooms (as rectangles) # Living Room + Dining Area (Combined) - 4x6 meters ax.add_patch(patches.Rectangle((0, 6), 8, 6, edgecolor='blue', facecolor='lightblue', label="Living Room + Dining")) # Bedroom 1 - 4x4 meters ax.add_patch(patches.Rectangle((0, 2), 4, 4, edgecolor='green', facecolor='lightgreen', label="Bedroom 1")) # Bedroom 2 - 4x4 meters ax.add_patch(patches.Rectangle((4, 2), 4, 4, edgecolor='green', facecolor='lightgreen', label="Bedroom 2")) # Kitchen - 2x4 meters ax.add_patch(patches.Rectangle((0, 0), 4...